@spatial-elements/core 0.1.0-beta.2 → 1.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -13
- package/dist/catalog/CarouselDeviceCamera.d.ts +20 -0
- package/dist/catalog/CarouselDeviceCamera.d.ts.map +1 -0
- package/dist/catalog/CarouselDeviceCamera.js +58 -0
- package/dist/catalog/CarouselDeviceCamera.js.map +1 -0
- package/dist/catalog/CarouselGlassCompositor.d.ts +14 -3
- package/dist/catalog/CarouselGlassCompositor.d.ts.map +1 -1
- package/dist/catalog/CarouselGlassCompositor.js +164 -28
- package/dist/catalog/CarouselGlassCompositor.js.map +1 -1
- package/dist/catalog/CarouselGround.d.ts +43 -0
- package/dist/catalog/CarouselGround.d.ts.map +1 -0
- package/dist/catalog/CarouselGround.js +270 -0
- package/dist/catalog/CarouselGround.js.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts +10 -0
- package/dist/catalog/CarouselSectionSurfaces.d.ts.map +1 -0
- package/dist/catalog/CarouselSectionSurfaces.js +55 -0
- package/dist/catalog/CarouselSectionSurfaces.js.map +1 -0
- package/dist/catalog/CatalogDepthBlur.d.ts +45 -0
- package/dist/catalog/CatalogDepthBlur.d.ts.map +1 -0
- package/dist/catalog/CatalogDepthBlur.js +190 -0
- package/dist/catalog/CatalogDepthBlur.js.map +1 -0
- package/dist/catalog/CatalogEndpointRegistry.d.ts +4 -2
- package/dist/catalog/CatalogEndpointRegistry.d.ts.map +1 -1
- package/dist/catalog/CatalogEndpointRegistry.js +2 -0
- package/dist/catalog/CatalogEndpointRegistry.js.map +1 -1
- package/dist/catalog/CatalogGeometryFade.d.ts +5 -1
- package/dist/catalog/CatalogGeometryFade.d.ts.map +1 -1
- package/dist/catalog/CatalogGeometryFade.js +45 -9
- package/dist/catalog/CatalogGeometryFade.js.map +1 -1
- package/dist/catalog/CatalogModelOutline.d.ts +33 -0
- package/dist/catalog/CatalogModelOutline.d.ts.map +1 -0
- package/dist/catalog/CatalogModelOutline.js +144 -0
- package/dist/catalog/CatalogModelOutline.js.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts +44 -0
- package/dist/catalog/CatalogNavigationRegistry.d.ts.map +1 -0
- package/dist/catalog/CatalogNavigationRegistry.js +66 -0
- package/dist/catalog/CatalogNavigationRegistry.js.map +1 -0
- package/dist/catalog/CatalogPreparation.d.ts +3 -3
- package/dist/catalog/CatalogPreparation.d.ts.map +1 -1
- package/dist/catalog/CatalogPreparation.js +10 -7
- package/dist/catalog/CatalogPreparation.js.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.d.ts +175 -5
- package/dist/catalog/CatalogSpatialElementLayer.d.ts.map +1 -1
- package/dist/catalog/CatalogSpatialElementLayer.js +739 -121
- package/dist/catalog/CatalogSpatialElementLayer.js.map +1 -1
- package/dist/catalog/CatalogTransition.d.ts +5 -3
- package/dist/catalog/CatalogTransition.d.ts.map +1 -1
- package/dist/catalog/CatalogTransition.js +207 -91
- package/dist/catalog/CatalogTransition.js.map +1 -1
- package/dist/catalog/CatalogWarmOutputContext.d.ts +39 -0
- package/dist/catalog/CatalogWarmOutputContext.d.ts.map +1 -0
- package/dist/catalog/CatalogWarmOutputContext.js +159 -0
- package/dist/catalog/CatalogWarmOutputContext.js.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts +35 -0
- package/dist/catalog/EarlyNavigationCoordinator.d.ts.map +1 -0
- package/dist/catalog/EarlyNavigationCoordinator.js +103 -0
- package/dist/catalog/EarlyNavigationCoordinator.js.map +1 -0
- package/dist/catalog/NavigationFeedback.d.ts +12 -0
- package/dist/catalog/NavigationFeedback.d.ts.map +1 -0
- package/dist/catalog/NavigationFeedback.js +40 -0
- package/dist/catalog/NavigationFeedback.js.map +1 -0
- package/dist/catalog/PreparationGate.d.ts +4 -0
- package/dist/catalog/PreparationGate.d.ts.map +1 -1
- package/dist/catalog/PreparationGate.js +1 -0
- package/dist/catalog/PreparationGate.js.map +1 -1
- package/dist/catalog/SourceDomClipping.d.ts +8 -0
- package/dist/catalog/SourceDomClipping.d.ts.map +1 -0
- package/dist/catalog/SourceDomClipping.js +74 -0
- package/dist/catalog/SourceDomClipping.js.map +1 -0
- package/dist/catalog/SourceDomMotion.d.ts +28 -0
- package/dist/catalog/SourceDomMotion.d.ts.map +1 -0
- package/dist/catalog/SourceDomMotion.js +111 -0
- package/dist/catalog/SourceDomMotion.js.map +1 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts +9 -0
- package/dist/catalog/SpatialGeometryCapture.d.ts.map +1 -1
- package/dist/catalog/SpatialGeometryCapture.js +11 -1
- package/dist/catalog/SpatialGeometryCapture.js.map +1 -1
- package/dist/catalog/SpatialPageRegistry.d.ts +18 -0
- package/dist/catalog/SpatialPageRegistry.d.ts.map +1 -0
- package/dist/catalog/SpatialPageRegistry.js +21 -0
- package/dist/catalog/SpatialPageRegistry.js.map +1 -0
- package/dist/catalog/StagedCatalogTransition.d.ts +74 -0
- package/dist/catalog/StagedCatalogTransition.d.ts.map +1 -0
- package/dist/catalog/StagedCatalogTransition.js +270 -0
- package/dist/catalog/StagedCatalogTransition.js.map +1 -0
- package/dist/catalog/cardModelFit.d.ts +7 -0
- package/dist/catalog/cardModelFit.d.ts.map +1 -0
- package/dist/catalog/cardModelFit.js +16 -0
- package/dist/catalog/cardModelFit.js.map +1 -0
- package/dist/catalog/cardProjection.d.ts +39 -0
- package/dist/catalog/cardProjection.d.ts.map +1 -0
- package/dist/catalog/cardProjection.js +110 -0
- package/dist/catalog/cardProjection.js.map +1 -0
- package/dist/catalog/carouselMotion.d.ts +74 -0
- package/dist/catalog/carouselMotion.d.ts.map +1 -0
- package/dist/catalog/carouselMotion.js +185 -0
- package/dist/catalog/carouselMotion.js.map +1 -0
- package/dist/catalog/carouselPanelProjection.d.ts.map +1 -1
- package/dist/catalog/carouselPanelProjection.js +48 -11
- package/dist/catalog/carouselPanelProjection.js.map +1 -1
- package/dist/catalog/carouselProximity.d.ts +11 -0
- package/dist/catalog/carouselProximity.d.ts.map +1 -0
- package/dist/catalog/carouselProximity.js +13 -0
- package/dist/catalog/carouselProximity.js.map +1 -0
- package/dist/catalog/carouselSupport.d.ts +4 -0
- package/dist/catalog/carouselSupport.d.ts.map +1 -0
- package/dist/catalog/carouselSupport.js +30 -0
- package/dist/catalog/carouselSupport.js.map +1 -0
- package/dist/catalog/catalogActivationFocus.d.ts +5 -0
- package/dist/catalog/catalogActivationFocus.d.ts.map +1 -0
- package/dist/catalog/catalogActivationFocus.js +39 -0
- package/dist/catalog/catalogActivationFocus.js.map +1 -0
- package/dist/catalog/catalogDomSnapshot.d.ts +18 -0
- package/dist/catalog/catalogDomSnapshot.d.ts.map +1 -0
- package/dist/catalog/catalogDomSnapshot.js +51 -0
- package/dist/catalog/catalogDomSnapshot.js.map +1 -0
- package/dist/catalog/catalogJourney.d.ts +4 -1
- package/dist/catalog/catalogJourney.d.ts.map +1 -1
- package/dist/catalog/catalogJourney.js +7 -15
- package/dist/catalog/catalogJourney.js.map +1 -1
- package/dist/catalog/catalogPage.d.ts +7 -3
- package/dist/catalog/catalogPage.d.ts.map +1 -1
- package/dist/catalog/catalogPage.js.map +1 -1
- package/dist/catalog/catalogPose.d.ts +54 -6
- package/dist/catalog/catalogPose.d.ts.map +1 -1
- package/dist/catalog/catalogPose.js +100 -23
- package/dist/catalog/catalogPose.js.map +1 -1
- package/dist/catalog/catalogRecipes.d.ts +3 -2
- package/dist/catalog/catalogRecipes.d.ts.map +1 -1
- package/dist/catalog/catalogRecipes.js +12 -27
- package/dist/catalog/catalogRecipes.js.map +1 -1
- package/dist/catalog/catalogTransitionViewport.d.ts +9 -0
- package/dist/catalog/catalogTransitionViewport.d.ts.map +1 -0
- package/dist/catalog/catalogTransitionViewport.js +13 -0
- package/dist/catalog/catalogTransitionViewport.js.map +1 -0
- package/dist/catalog/catalogViewLink.d.ts +2 -0
- package/dist/catalog/catalogViewLink.d.ts.map +1 -1
- package/dist/catalog/catalogViewLink.js +10 -2
- package/dist/catalog/catalogViewLink.js.map +1 -1
- package/dist/catalog/deviceYaw.d.ts +21 -0
- package/dist/catalog/deviceYaw.d.ts.map +1 -0
- package/dist/catalog/deviceYaw.js +87 -0
- package/dist/catalog/deviceYaw.js.map +1 -0
- package/dist/catalog/listDeviceOrientation.d.ts +20 -0
- package/dist/catalog/listDeviceOrientation.d.ts.map +1 -0
- package/dist/catalog/listDeviceOrientation.js +273 -0
- package/dist/catalog/listDeviceOrientation.js.map +1 -0
- package/dist/catalog/spatialElementAssets.d.ts +5 -5
- package/dist/catalog/spatialElementAssets.d.ts.map +1 -1
- package/dist/catalog/spatialElementAssets.js.map +1 -1
- package/dist/catalog/spatialElementLodPair.d.ts +2 -1
- package/dist/catalog/spatialElementLodPair.d.ts.map +1 -1
- package/dist/catalog/spatialElementLodPair.js.map +1 -1
- package/dist/catalog/stagedDetailGeometry.d.ts +37 -0
- package/dist/catalog/stagedDetailGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDetailGeometry.js +55 -0
- package/dist/catalog/stagedDetailGeometry.js.map +1 -0
- package/dist/catalog/stagedDockGeometry.d.ts +66 -0
- package/dist/catalog/stagedDockGeometry.d.ts.map +1 -0
- package/dist/catalog/stagedDockGeometry.js +66 -0
- package/dist/catalog/stagedDockGeometry.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts +18 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.d.ts.map +1 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js +68 -0
- package/dist/spatial-element/ResponsiveViewportMetrics.js.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.d.ts.map +1 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js +2 -0
- package/dist/spatial-element/SectionSurfaceRegistry.js.map +1 -0
- package/dist/spatial-element/SpatialElementDockController.d.ts +23 -11
- package/dist/spatial-element/SpatialElementDockController.d.ts.map +1 -1
- package/dist/spatial-element/SpatialElementDockController.js +228 -96
- package/dist/spatial-element/SpatialElementDockController.js.map +1 -1
- package/dist/spatial-element/SpatialElementPaneController.d.ts +67 -0
- package/dist/spatial-element/SpatialElementPaneController.d.ts.map +1 -0
- package/dist/spatial-element/SpatialElementPaneController.js +246 -0
- package/dist/spatial-element/SpatialElementPaneController.js.map +1 -0
- package/dist/spatial-element/activeDetailSection.d.ts +8 -0
- package/dist/spatial-element/activeDetailSection.d.ts.map +1 -0
- package/dist/spatial-element/activeDetailSection.js +19 -0
- package/dist/spatial-element/activeDetailSection.js.map +1 -0
- package/dist/spatial-element/layoutTokens.json +228 -0
- package/dist/spatial-element/messages.d.ts +46 -0
- package/dist/spatial-element/messages.d.ts.map +1 -0
- package/dist/spatial-element/messages.js +46 -0
- package/dist/spatial-element/messages.js.map +1 -0
- package/dist/spatial-element/responsiveLayout.d.ts +1353 -0
- package/dist/spatial-element/responsiveLayout.d.ts.map +1 -0
- package/dist/spatial-element/responsiveLayout.js +210 -0
- package/dist/spatial-element/responsiveLayout.js.map +1 -0
- package/dist/spatial-element/sectionBackground.d.ts +3 -0
- package/dist/spatial-element/sectionBackground.d.ts.map +1 -0
- package/dist/spatial-element/sectionBackground.js +2 -0
- package/dist/spatial-element/sectionBackground.js.map +1 -0
- package/dist/spatial-element/spatialElement.d.ts +17 -12
- package/dist/spatial-element/spatialElement.d.ts.map +1 -1
- package/dist/spatial-element/spatialElement.js +33 -6
- package/dist/spatial-element/spatialElement.js.map +1 -1
- package/dist/spatial-element/spatialElementDock.d.ts +15 -0
- package/dist/spatial-element/spatialElementDock.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementDock.js +22 -0
- package/dist/spatial-element/spatialElementDock.js.map +1 -1
- package/dist/spatial-element/spatialElementGeometry.d.ts +22 -0
- package/dist/spatial-element/spatialElementGeometry.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementGeometry.js +40 -0
- package/dist/spatial-element/spatialElementGeometry.js.map +1 -0
- package/dist/spatial-element/spatialElementMedia.d.ts +16 -0
- package/dist/spatial-element/spatialElementMedia.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementMedia.js +29 -0
- package/dist/spatial-element/spatialElementMedia.js.map +1 -0
- package/dist/spatial-element/spatialElementScene.d.ts +16 -0
- package/dist/spatial-element/spatialElementScene.d.ts.map +1 -0
- package/dist/spatial-element/spatialElementScene.js +22 -0
- package/dist/spatial-element/spatialElementScene.js.map +1 -0
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts +6 -25
- package/dist/spatial-element/spatialElementSectionRegistry.d.ts.map +1 -1
- package/dist/spatial-element/spatialElementSectionRegistry.js +6 -63
- package/dist/spatial-element/spatialElementSectionRegistry.js.map +1 -1
- package/dist/spatial-element/spatialTheme.d.ts +27 -0
- package/dist/spatial-element/spatialTheme.d.ts.map +1 -0
- package/dist/spatial-element/spatialTheme.js +83 -0
- package/dist/spatial-element/spatialTheme.js.map +1 -0
- package/dist/spatial-element/types.d.ts +117 -36
- package/dist/spatial-element/types.d.ts.map +1 -1
- package/dist/spatial-element/types.js.map +1 -1
- package/dist/stage/BackgroundLayerOutput.d.ts +76 -0
- package/dist/stage/BackgroundLayerOutput.d.ts.map +1 -0
- package/dist/stage/BackgroundLayerOutput.js +333 -0
- package/dist/stage/BackgroundLayerOutput.js.map +1 -0
- package/dist/stage/DeviceGeometryMotion.d.ts +13 -0
- package/dist/stage/DeviceGeometryMotion.d.ts.map +1 -0
- package/dist/stage/DeviceGeometryMotion.js +37 -0
- package/dist/stage/DeviceGeometryMotion.js.map +1 -0
- package/dist/stage/LiquidGlassPanel.d.ts +7 -0
- package/dist/stage/LiquidGlassPanel.d.ts.map +1 -1
- package/dist/stage/LiquidGlassPanel.js +51 -7
- package/dist/stage/LiquidGlassPanel.js.map +1 -1
- package/dist/stage/MinimapController.d.ts +4 -1
- package/dist/stage/MinimapController.d.ts.map +1 -1
- package/dist/stage/MinimapController.js +62 -71
- package/dist/stage/MinimapController.js.map +1 -1
- package/dist/stage/ModelPointerPreview.d.ts +22 -0
- package/dist/stage/ModelPointerPreview.d.ts.map +1 -0
- package/dist/stage/ModelPointerPreview.js +71 -0
- package/dist/stage/ModelPointerPreview.js.map +1 -0
- package/dist/stage/PageBindingController.d.ts +10 -0
- package/dist/stage/PageBindingController.d.ts.map +1 -1
- package/dist/stage/PageBindingController.js +45 -5
- package/dist/stage/PageBindingController.js.map +1 -1
- package/dist/stage/PanelPresentationController.d.ts +21 -1
- package/dist/stage/PanelPresentationController.d.ts.map +1 -1
- package/dist/stage/PanelPresentationController.js +190 -31
- package/dist/stage/PanelPresentationController.js.map +1 -1
- package/dist/stage/SpaceMouseAdapter.d.ts +10 -2
- package/dist/stage/SpaceMouseAdapter.d.ts.map +1 -1
- package/dist/stage/SpaceMouseAdapter.js +50 -8
- package/dist/stage/SpaceMouseAdapter.js.map +1 -1
- package/dist/stage/SpatialElementInteractionController.d.ts +24 -2
- package/dist/stage/SpatialElementInteractionController.d.ts.map +1 -1
- package/dist/stage/SpatialElementInteractionController.js +198 -45
- package/dist/stage/SpatialElementInteractionController.js.map +1 -1
- package/dist/stage/SpatialElementPresentationController.d.ts +14 -2
- package/dist/stage/SpatialElementPresentationController.d.ts.map +1 -1
- package/dist/stage/SpatialElementPresentationController.js +47 -2
- package/dist/stage/SpatialElementPresentationController.js.map +1 -1
- package/dist/stage/SpatialElementRefinement.d.ts +34 -1
- package/dist/stage/SpatialElementRefinement.d.ts.map +1 -1
- package/dist/stage/SpatialElementRefinement.js +175 -37
- package/dist/stage/SpatialElementRefinement.js.map +1 -1
- package/dist/stage/StageExperience.d.ts +266 -11
- package/dist/stage/StageExperience.d.ts.map +1 -1
- package/dist/stage/StageExperience.js +673 -126
- package/dist/stage/StageExperience.js.map +1 -1
- package/dist/stage/StageFullscreenController.d.ts +17 -0
- package/dist/stage/StageFullscreenController.d.ts.map +1 -0
- package/dist/stage/StageFullscreenController.js +90 -0
- package/dist/stage/StageFullscreenController.js.map +1 -0
- package/dist/stage/StagePanelRuntime.d.ts +2 -1
- package/dist/stage/StagePanelRuntime.d.ts.map +1 -1
- package/dist/stage/StagePanelRuntime.js.map +1 -1
- package/dist/stage/StageRenderPipeline.d.ts +90 -2
- package/dist/stage/StageRenderPipeline.d.ts.map +1 -1
- package/dist/stage/StageRenderPipeline.js +494 -120
- package/dist/stage/StageRenderPipeline.js.map +1 -1
- package/dist/stage/VirtualScrollController.d.ts +7 -0
- package/dist/stage/VirtualScrollController.d.ts.map +1 -1
- package/dist/stage/VirtualScrollController.js +63 -6
- package/dist/stage/VirtualScrollController.js.map +1 -1
- package/dist/stage/inertLease.d.ts +2 -0
- package/dist/stage/inertLease.d.ts.map +1 -0
- package/dist/stage/inertLease.js +18 -0
- package/dist/stage/inertLease.js.map +1 -0
- package/dist/stage/interactionGuidance.d.ts +22 -0
- package/dist/stage/interactionGuidance.d.ts.map +1 -0
- package/dist/stage/interactionGuidance.js +53 -0
- package/dist/stage/interactionGuidance.js.map +1 -0
- package/dist/stage/interactionOutline.d.ts +14 -0
- package/dist/stage/interactionOutline.d.ts.map +1 -0
- package/dist/stage/interactionOutline.js +59 -0
- package/dist/stage/interactionOutline.js.map +1 -0
- package/dist/stage/minimap/MinimapGeometry.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapGeometry.js +29 -0
- package/dist/stage/minimap/MinimapGeometry.js.map +1 -1
- package/dist/stage/minimap/MinimapModel.d.ts +2 -1
- package/dist/stage/minimap/MinimapModel.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapModel.js +34 -4
- package/dist/stage/minimap/MinimapModel.js.map +1 -1
- package/dist/stage/minimap/MinimapModelGeometry.d.ts +21 -0
- package/dist/stage/minimap/MinimapModelGeometry.d.ts.map +1 -0
- package/dist/stage/minimap/MinimapModelGeometry.js +68 -0
- package/dist/stage/minimap/MinimapModelGeometry.js.map +1 -0
- package/dist/stage/minimap/MinimapProjection.d.ts +7 -0
- package/dist/stage/minimap/MinimapProjection.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapProjection.js +14 -13
- package/dist/stage/minimap/MinimapProjection.js.map +1 -1
- package/dist/stage/minimap/MinimapState.d.ts +6 -11
- package/dist/stage/minimap/MinimapState.d.ts.map +1 -1
- package/dist/stage/minimap/MinimapState.js.map +1 -1
- package/dist/stage/mouseHover.d.ts +9 -0
- package/dist/stage/mouseHover.d.ts.map +1 -0
- package/dist/stage/mouseHover.js +55 -0
- package/dist/stage/mouseHover.js.map +1 -0
- package/dist/stage/panelContext.d.ts +33 -2
- package/dist/stage/panelContext.d.ts.map +1 -1
- package/dist/stage/panelContext.js.map +1 -1
- package/dist/stage/panelFocusMath.d.ts +34 -0
- package/dist/stage/panelFocusMath.d.ts.map +1 -0
- package/dist/stage/panelFocusMath.js +79 -0
- package/dist/stage/panelFocusMath.js.map +1 -0
- package/dist/stage/renderSettings.d.ts +10 -0
- package/dist/stage/renderSettings.d.ts.map +1 -0
- package/dist/stage/renderSettings.js +27 -0
- package/dist/stage/renderSettings.js.map +1 -0
- package/dist/stage/renderTargetInventory.d.ts +1 -1
- package/dist/stage/renderTargetInventory.js +1 -1
- package/dist/stage/renderTargetInventory.js.map +1 -1
- package/dist/stage/rendererState.d.ts +2 -0
- package/dist/stage/rendererState.d.ts.map +1 -1
- package/dist/stage/rendererState.js +13 -0
- package/dist/stage/rendererState.js.map +1 -1
- package/dist/stage/scalarMath.d.ts +6 -0
- package/dist/stage/scalarMath.d.ts.map +1 -0
- package/dist/stage/scalarMath.js +6 -0
- package/dist/stage/scalarMath.js.map +1 -0
- package/dist/stage/sceneEndpointEligibility.d.ts +20 -0
- package/dist/stage/sceneEndpointEligibility.d.ts.map +1 -0
- package/dist/stage/sceneEndpointEligibility.js +363 -0
- package/dist/stage/sceneEndpointEligibility.js.map +1 -0
- package/dist/stage/scrollFrame.d.ts +2 -0
- package/dist/stage/scrollFrame.d.ts.map +1 -1
- package/dist/stage/scrollFrame.js +18 -5
- package/dist/stage/scrollFrame.js.map +1 -1
- package/dist/stage/spaceMousePermission.d.ts +11 -0
- package/dist/stage/spaceMousePermission.d.ts.map +1 -0
- package/dist/stage/spaceMousePermission.js +63 -0
- package/dist/stage/spaceMousePermission.js.map +1 -0
- package/dist/stage/spaceMousePlatform.d.ts +12 -0
- package/dist/stage/spaceMousePlatform.d.ts.map +1 -0
- package/dist/stage/spaceMousePlatform.js +13 -0
- package/dist/stage/spaceMousePlatform.js.map +1 -0
- package/dist/stage/spatialElementFrame.d.ts.map +1 -1
- package/dist/stage/spatialElementFrame.js +5 -1
- package/dist/stage/spatialElementFrame.js.map +1 -1
- package/dist/stage/stageConstants.d.ts +3 -3
- package/dist/stage/stageConstants.d.ts.map +1 -1
- package/dist/stage/stageConstants.js +10 -10
- package/dist/stage/stageConstants.js.map +1 -1
- package/dist/stage/stageDom.d.ts +2 -0
- package/dist/stage/stageDom.d.ts.map +1 -1
- package/dist/stage/stageDom.js +10 -1
- package/dist/stage/stageDom.js.map +1 -1
- package/dist/stage/stageMath.d.ts +4 -33
- package/dist/stage/stageMath.d.ts.map +1 -1
- package/dist/stage/stageMath.js +39 -110
- package/dist/stage/stageMath.js.map +1 -1
- package/dist/stage/stageTypes.d.ts +32 -4
- package/dist/stage/stageTypes.d.ts.map +1 -1
- package/dist/stage/stageTypes.js.map +1 -1
- package/dist/stage/stageVisualTest.d.ts +24 -1
- package/dist/stage/stageVisualTest.d.ts.map +1 -1
- package/dist/stage/stageVisualTest.js.map +1 -1
- package/dist/stage/webgpuSupport.d.ts +3 -0
- package/dist/stage/webgpuSupport.d.ts.map +1 -0
- package/dist/stage/webgpuSupport.js +14 -0
- package/dist/stage/webgpuSupport.js.map +1 -0
- package/logo.svg +225 -0
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CatalogTransition.js","sourceRoot":"","sources":["../../src/catalog/CatalogT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CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,IAAI,CAAC;YACJ,IAAI,CAAC;gBACJ,IAAI,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;oBAAS,CAAC;gBACV,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;gBAC5B,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;YACzB,CAAC;QACF,CAAC;QAAC,MAAM,CAAC;YACR,iFAAiF;QAClF,CAAC;gBAAS,CAAC;YACV,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QACrB,CAAC;IACF,CAAC;CACD","sourcesContent":["import {\n\tgeometryEndpoint,\n\ttype CatalogGeometryEndpoint,\n\ttype CatalogGeometryDestination\n} from './catalogGeometryRequest.js';\nimport {\n\tresolveCatalogJourney,\n\tplanCatalogParticipants,\n\ttype CatalogParticipantEndpoint,\n\ttype CatalogParticipantPair,\n\ttype CatalogViewContext\n} from './catalogJourney.js';\nimport { readCatalogViewContext } from './catalogViewLink.js';\nimport { captureCarouselElement } from './carouselPanelProjection.js';\nimport type { CatalogTransitionPresentation } from './catalogPresentation.js';\nimport { PresentationLease } from './PresentationLease.js';\nimport { rebasePresentation } from './rebasePresentation.js';\nimport { getProjectiveCssMatrix3d, type CssProjectionQuad } from '../stage/cssProjection.js';\nimport type { CatalogSurfaceCapture } from './catalogSurfaceCapture.js';\nimport {\n\tcatalogSharedKey,\n\ttype CatalogIdentity,\n\ttype CatalogSharedRole,\n\ttype CatalogEndpointRegistry\n} from './CatalogEndpointRegistry.js';\nimport { resolveCatalogIntent, selectCatalogRecipe, type CatalogRecipe } from './catalogRecipes.js';\nexport { catalogSharedKey } from './CatalogEndpointRegistry.js';\nexport type { CatalogSharedRole } from './CatalogEndpointRegistry.js';\nimport {\n\tMOTION_DURATION as DURATION,\n\ttransitionTiming,\n\ttype TransitionMode\n} from './transitionTiming.js';\n\nexport type CatalogTransitionIdentity = CatalogIdentity;\n\nfunction isReturnRecipe(recipe: CatalogRecipe) {\n\treturn recipe.source.startsWith('detail.');\n}\nfunction isRichRole(role: CatalogSharedRole) {\n\treturn role === 'features' || role === 'primary-action';\n}\n\n/** Full summaries retain authored row/icon layout; temporary controls never become interactive. */\nfunction copyRichContent(target: HTMLElement, source: HTMLElement) {\n\tconst copy = source.cloneNode(true) as HTMLElement;\n\tconst originals = [source, ...source.querySelectorAll<HTMLElement | SVGElement>('*')];\n\tconst copies = [copy, ...copy.querySelectorAll<HTMLElement | SVGElement>('*')];\n\tfor (let index = 0; index < originals.length; index++) {\n\t\tconst style = getComputedStyle(originals[index]);\n\t\tfor (const property of style)\n\t\t\tcopies[index].style.setProperty(property, style.getPropertyValue(property));\n\t\tcopies[index].style.visibility = 'visible';\n\t\tcopies[index].removeAttribute('id');\n\t\tfor (const attribute of [...copies[index].attributes])\n\t\t\tif (attribute.name.startsWith('data-')) copies[index].removeAttribute(attribute.name);\n\t}\n\tObject.assign(copy.style, {\n\t\tposition: 'relative',\n\t\tleft: '0',\n\t\ttop: '0',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tmargin: '0',\n\t\ttransform: 'none',\n\t\tpointerEvents: 'none'\n\t});\n\tcopy.inert = true;\n\tcopy.setAttribute('aria-hidden', 'true');\n\ttarget.append(copy);\n}\n\n/** Only the forward list-to-hero edge is part of the first vertical slice. */\nexport function resolveCatalogTransition(\n\tfrom: URL,\n\tto: URL,\n\ttype: string\n): CatalogTransitionIdentity | undefined {\n\tif (\n\t\ttype === 'popstate' ||\n\t\tto.hash ||\n\t\t!from.pathname.replace(/\\/$/, '').endsWith('/categories/list')\n\t)\n\t\treturn;\n\treturn selectCatalogRecipe(resolveCatalogIntent(from, to, type), 'list', 'hero')?.identity;\n}\n\n/** A stale animation completion cannot settle a newer navigation. */\nexport class CatalogTransitionSequence {\n\tprivate generation = 0;\n\tprivate current?: { token: number; phase: 'captured' | 'animating' };\n\n\tget active() {\n\t\treturn this.current !== undefined;\n\t}\n\n\tget phase() {\n\t\treturn this.current?.phase ?? 'idle';\n\t}\n\n\tbegin() {\n\t\tconst token = ++this.generation;\n\t\tthis.current = { token, phase: 'captured' };\n\t\treturn token;\n\t}\n\n\tstart(token: number) {\n\t\tif (!this.current || this.current.token !== token || this.current.phase !== 'captured') {\n\t\t\treturn false;\n\t\t}\n\t\tthis.current.phase = 'animating';\n\t\treturn true;\n\t}\n\n\tisCurrent(token: number) {\n\t\treturn this.current?.token === token;\n\t}\n\n\tfinish(token: number) {\n\t\tif (!this.isCurrent(token)) return false;\n\t\tthis.current = undefined;\n\t\treturn true;\n\t}\n\n\tcancel() {\n\t\tthis.generation += 1;\n\t\tthis.current = undefined;\n\t}\n}\n\ninterface CatalogTransitionHooks {\n\tcaptureContentGeometry?(\n\t\tendpoint: CatalogParticipantEndpoint,\n\t\tsecondary: CatalogParticipantEndpoint[]\n\t): boolean;\n\tprepareContentParticipants?(\n\t\tpairs: CatalogParticipantPair[]\n\t): CatalogParticipantPair[] | undefined;\n\tadoptContentParticipants?(pairs: CatalogParticipantPair[]): void;\n\tpromoteContentParticipant?(source: CatalogParticipantEndpoint): boolean;\n\tbackgroundPrepared?(): boolean;\n\tcaptureElement?(\n\t\telement: HTMLElement\n\t): { width: number; height: number; corners: CssProjectionQuad } | undefined;\n\tadoptGeometry?(destination: CatalogGeometryDestination): boolean;\n\tgeometryPoint?(): { x: number; y: number } | null;\n\tbeginMotion?(): TransitionMode;\n\tcaptureGeometry(source: CatalogGeometryEndpoint): boolean;\n\tprepareDestination?(destination: CatalogGeometryDestination): boolean;\n\tsetGeometryProgress(progress: number): void;\n\tflushFrame(): void;\n\tfinishGeometry(): void;\n\tresolveSurface(element: HTMLElement): HTMLElement;\n\tcaptureSurface?(element: HTMLElement): CatalogSurfaceCapture;\n\tsetPresentation(presentation: CatalogTransitionPresentation): void;\n}\n\ninterface TransitionActor {\n\tsemantic?: string;\n\tlayoutWidth?: number;\n\tlayoutHeight?: number;\n\tcorners?: CssProjectionQuad;\n\tsourceOnly?: boolean;\n\tbaseOpacity?: number;\n\trebased?: boolean;\n\trole: CatalogSharedRole;\n\telement: HTMLDivElement;\n\tfrom: DOMRect;\n\tfontSize: number;\n\tto?: DOMRect;\n\tfontScale?: number;\n\tdestinationCopy?: HTMLDivElement;\n}\n\ninterface TransitionCapture {\n\tview?: {\n\t\tsource: CatalogParticipantEndpoint;\n\t\tsources: CatalogParticipantEndpoint[];\n\t\tpairs?: CatalogParticipantPair[];\n\t\talternates?: Map<string, TransitionActor[]>;\n\t\tcontext: CatalogViewContext;\n\t};\n\tpanelContent?: { element: HTMLElement; rect: DOMRect; panel: DOMRect; incoming: boolean }[];\n\tbackgroundPrepared?: boolean;\n\tretarget?: boolean;\n\tcaptureShell?: boolean;\n\tsuspendedPose?: { surface: DOMRect; geometry: { x: number; y: number } | null };\n\tlease?: PresentationLease<TransitionCapture>;\n\towner?: ReturnType<PresentationLease<TransitionCapture>['claim']>;\n\tpaused?: boolean;\n\telapsed: number;\n\tmode?: TransitionMode;\n\ttoken: number;\n\tidentity: CatalogTransitionIdentity;\n\trecipe: CatalogRecipe;\n\thost: HTMLDivElement;\n\tactors: TransitionActor[];\n\texiting: HTMLElement[];\n\trestore: (() => void)[];\n\tframe: number;\n\ttimeout: ReturnType<typeof setTimeout>;\n\tresolve?: () => void;\n\tobserver?: MutationObserver;\n\tlayoutObserver?: ResizeObserver;\n\tinert: Map<HTMLElement, boolean>;\n\tcontent?: HTMLElement;\n\tfocus?: HTMLElement;\n}\n\nfunction hasSize(rect: DOMRect) {\n\treturn rect.width > 0 && rect.height > 0;\n}\n\nfunction intersectsViewport(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\treturn (\n\t\thasSize(rect) &&\n\t\trect.right > 0 &&\n\t\trect.bottom > 0 &&\n\t\trect.left < innerWidth &&\n\t\trect.top < innerHeight\n\t);\n}\n\n/** A partial endpoint needs an explicit clip representation; otherwise use semantic navigation. */\nfunction fullyPresented(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\tif (\n\t\t!hasSize(rect) ||\n\t\trect.left < 0 ||\n\t\trect.top < 0 ||\n\t\trect.right > innerWidth ||\n\t\trect.bottom > innerHeight\n\t)\n\t\treturn false;\n\tfor (let ancestor = element.parentElement; ancestor; ancestor = ancestor.parentElement) {\n\t\tconst style = getComputedStyle(ancestor);\n\t\tconst clip = ancestor.getBoundingClientRect();\n\t\tif (\n\t\t\t/(hidden|clip|scroll|auto)/.test(style.overflowX) &&\n\t\t\t(rect.left < clip.left - 1 || rect.right > clip.right + 1)\n\t\t)\n\t\t\treturn false;\n\t\tif (\n\t\t\t/(hidden|clip|scroll|auto)/.test(style.overflowY) &&\n\t\t\t(rect.top < clip.top - 1 || rect.bottom > clip.bottom + 1)\n\t\t)\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction visiblyPresented(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\tif (!hasSize(rect) || rect.bottom <= 0 || rect.top >= innerHeight) return false;\n\tfor (let node: HTMLElement | null = element; node; node = node.parentElement) {\n\t\tconst style = getComputedStyle(node);\n\t\tif (style.visibility === 'hidden' || style.display === 'none' || Number(style.opacity) < 0.01)\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction copyTypography(element: HTMLElement, style: CSSStyleDeclaration) {\n\tfor (const property of [\n\t\t'font-family',\n\t\t'font-size',\n\t\t'font-weight',\n\t\t'font-style',\n\t\t'line-height',\n\t\t'letter-spacing',\n\t\t'text-transform',\n\t\t'text-align',\n\t\t'white-space',\n\t\t'overflow',\n\t\t'text-overflow',\n\t\t'color',\n\t\t'text-shadow'\n\t])\n\t\telement.style.setProperty(property, style.getPropertyValue(property));\n}\n\nfunction preserveStyle(element: HTMLElement, property: string, restore: (() => void)[]) {\n\tconst value = element.style.getPropertyValue(property);\n\tconst priority = element.style.getPropertyPriority(property);\n\tconst reset = () => {\n\t\tif (value) element.style.setProperty(property, value, priority);\n\t\telse element.style.removeProperty(property);\n\t};\n\trestore.push(reset);\n\treturn reset;\n}\n\n/** Owns decorative DOM only. Semantic pages and element geometry keep their respective owners. */\nexport class CatalogTransition {\n\tprivate readonly sequence = new CatalogTransitionSequence();\n\tprivate captureState?: TransitionCapture;\n\tprivate readonly interrupt = () => this.cancel();\n\tprivate readonly keydown = (event: KeyboardEvent) => {\n\t\tif (event.key === 'Escape') this.cancel();\n\t};\n\n\tconstructor(\n\t\tprivate readonly root: HTMLElement,\n\t\tprivate readonly endpoints: CatalogEndpointRegistry,\n\t\tprivate readonly hooks: CatalogTransitionHooks\n\t) {}\n\n\tget active() {\n\t\treturn this.sequence.active;\n\t}\n\n\t/** Pause at the last submitted DOM/GPU frame while a compatible navigation resolves. */\n\tsupersede(destination: URL) {\n\t\tconst capture = this.captureState;\n\t\tconst path = destination.pathname.replace(/\\/$/, '');\n\t\tconst compatible =\n\t\t\tcapture &&\n\t\t\tdestination.origin === location.origin &&\n\t\t\t(Boolean(\n\t\t\t\tresolveCatalogIntent(\n\t\t\t\t\tnew URL(\n\t\t\t\t\t\t`/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`,\n\t\t\t\t\t\tlocation.href\n\t\t\t\t\t),\n\t\t\t\t\tdestination,\n\t\t\t\t\t'link'\n\t\t\t\t)\n\t\t\t) ||\n\t\t\t\tpath ===\n\t\t\t\t\t`/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`);\n\t\tif (!capture || !compatible) {\n\t\t\tthis.cancel();\n\t\t\treturn;\n\t\t}\n\t\tcancelAnimationFrame(capture.frame);\n\t\t// The old destination can unmount while the successor binds asynchronously.\n\t\t// Its observer must not cancel the new owner when those old bounds disappear.\n\t\tcapture.layoutObserver?.disconnect();\n\t\tcapture.layoutObserver = undefined;\n\t\tcapture.suspendedPose = {\n\t\t\tsurface: capture.actors[0]?.element.getBoundingClientRect() ?? new DOMRect(),\n\t\t\tgeometry: this.hooks.geometryPoint?.() ?? null\n\t\t};\n\t\tcapture.paused = true;\n\t\tcapture.resolve?.();\n\t\tcapture.resolve = undefined;\n\t\tconst reverse = /\\/categories\\/(?:list|carousel|mixed)$/.test(path);\n\t\tif (\n\t\t\tcapture.view ||\n\t\t\tcapture.retarget ||\n\t\t\treverse !== isReturnRecipe(capture.recipe) ||\n\t\t\tdestination.hash\n\t\t) {\n\t\t\tif (\n\t\t\t\t!this.hooks.adoptGeometry?.({\n\t\t\t\t\tspatialElementId: capture.identity.spatialElementId,\n\t\t\t\t\tkind: reverse ? 'content' : destination.hash ? 'dock' : 'hero'\n\t\t\t\t})\n\t\t\t) {\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcapture.retarget = true;\n\t\t\tconst panelRect = capture.actors\n\t\t\t\t.find((actor) => actor.role === 'summary-surface')\n\t\t\t\t?.element.getBoundingClientRect();\n\t\t\tif (panelRect)\n\t\t\t\tfor (const copy of capture.panelContent ?? []) {\n\t\t\t\t\tconst rect = copy.element.getBoundingClientRect();\n\t\t\t\t\tconst wrapper = rebasePresentation([copy.element], rect, 'summary-surface');\n\t\t\t\t\tdelete wrapper.dataset.catalogActorRole;\n\t\t\t\t\twrapper.dataset.catalogPanelContent = '';\n\t\t\t\t\tcapture.host.appendChild(wrapper);\n\t\t\t\t\tconst index = capture.exiting.indexOf(copy.element);\n\t\t\t\t\tif (index >= 0) capture.exiting[index] = wrapper;\n\t\t\t\t\telse capture.exiting.push(wrapper);\n\t\t\t\t\tcopy.element = wrapper;\n\t\t\t\t\tcopy.rect = rect;\n\t\t\t\t\tcopy.panel = panelRect;\n\t\t\t\t\tcopy.incoming = false;\n\t\t\t\t}\n\t\t\tconst extra: TransitionActor[] = [];\n\t\t\tconst opacity = Number(this.root.style.getPropertyValue('--catalog-shared-opacity')) || 0;\n\t\t\tfor (const actor of capture.actors) {\n\t\t\t\tconst rect = actor.element.getBoundingClientRect();\n\t\t\t\tif (!actor.sourceOnly && opacity > 0) {\n\t\t\t\t\tconst real = this.endpoints.resolve({\n\t\t\t\t\t\t...capture.identity,\n\t\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\t\trole: actor.role\n\t\t\t\t\t});\n\t\t\t\t\tif (real) {\n\t\t\t\t\t\tconst bounds = (\n\t\t\t\t\t\t\tactor.role === 'summary-surface' ? this.hooks.resolveSurface(real) : real\n\t\t\t\t\t\t).getBoundingClientRect();\n\t\t\t\t\t\tconst copy = document.createElement('div');\n\t\t\t\t\t\tcopy.style.cssText = actor.element.style.cssText;\n\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\tleft: `${bounds.left}px`,\n\t\t\t\t\t\t\ttop: `${bounds.top}px`,\n\t\t\t\t\t\t\twidth: `${bounds.width}px`,\n\t\t\t\t\t\t\theight: `${bounds.height}px`,\n\t\t\t\t\t\t\ttransform: 'none',\n\t\t\t\t\t\t\tclipPath: 'none',\n\t\t\t\t\t\t\topacity: String(opacity)\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\t\tcopy.textContent = real.textContent;\n\t\t\t\t\t\t\tcopyTypography(copy, getComputedStyle(real));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcapture.host.appendChild(copy);\n\t\t\t\t\t\textra.push({\n\t\t\t\t\t\t\trole: actor.role,\n\t\t\t\t\t\t\telement: copy,\n\t\t\t\t\t\t\tfrom: bounds,\n\t\t\t\t\t\t\tfontSize: Number.parseFloat(getComputedStyle(real).fontSize),\n\t\t\t\t\t\t\tsourceOnly: true,\n\t\t\t\t\t\t\tbaseOpacity: opacity\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\t\tpreserveStyle(real, 'visibility', capture.restore);\n\t\t\t\t\t\t\treal.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst layers = [actor.element, ...(actor.destinationCopy ? [actor.destinationCopy] : [])];\n\t\t\t\tconst wrapper = rebasePresentation(layers, rect, actor.role);\n\t\t\t\tcapture.host.appendChild(wrapper);\n\t\t\t\tactor.fontSize *= rect.width / actor.from.width;\n\t\t\t\tactor.element = wrapper;\n\t\t\t\tactor.corners = undefined;\n\t\t\t\tactor.from = rect;\n\t\t\t\tactor.to = undefined;\n\t\t\t\tactor.destinationCopy = undefined;\n\t\t\t\tactor.rebased = true;\n\t\t\t\tactor.baseOpacity = 1;\n\t\t\t}\n\t\t\tcapture.actors.push(...extra);\n\t\t\t// Retain visible secondary content before hiding its shared parent or awaiting route data.\n\t\t\tconst previousRecipe = capture.recipe;\n\t\t\tcapture.recipe = {\n\t\t\t\t...previousRecipe,\n\t\t\t\tsource: this.root.querySelector('[data-catalog-list]') ? 'catalog.card' : 'detail.summary'\n\t\t\t};\n\t\t\tthis.captureExitingContent(capture);\n\t\t\tcapture.recipe = previousRecipe;\n\t\t\tconst surface = this.endpoints.resolve({\n\t\t\t\t...capture.identity,\n\t\t\t\tslot: previousRecipe.targetShared,\n\t\t\t\trole: 'summary-surface'\n\t\t\t});\n\t\t\tif (surface) {\n\t\t\t\tpreserveStyle(surface, 'visibility', capture.restore);\n\t\t\t\tsurface.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t}\n\t\t\tfor (const copy of capture.exiting)\n\t\t\t\tcopy.dataset.catalogBaseOpacity = copy.style.opacity || '1';\n\t\t}\n\t}\n\n\tgetOwnership() {\n\t\tconst capture = this.captureState;\n\t\treturn capture\n\t\t\t? {\n\t\t\t\t\trevision: capture.lease?.revision,\n\t\t\t\t\telapsed: capture.elapsed,\n\t\t\t\t\tidentity: capture.identity,\n\t\t\t\t\tsource: capture.recipe.source,\n\t\t\t\t\ttarget: capture.recipe.targetShared,\n\t\t\t\t\tsuspendedPose: capture.suspendedPose\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tsurface: capture.suspendedPose.surface.toJSON(),\n\t\t\t\t\t\t\t\tgeometry: capture.suspendedPose.geometry\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t: null;\n\t}\n\n\tprivate matchesDestination(capture: TransitionCapture, destination: URL) {\n\t\treturn (\n\t\t\tdestination.origin === location.origin &&\n\t\t\t!destination.hash &&\n\t\t\tdestination.pathname.replace(/\\/$/, '') ===\n\t\t\t\t`/${encodeURIComponent(capture.identity.brandId)}/elements/${encodeURIComponent(capture.identity.spatialElementId)}`\n\t\t);\n\t}\n\n\tprivate createActor(\n\t\tidentity: CatalogIdentity,\n\t\tsource: HTMLElement,\n\t\trole: CatalogSharedRole,\n\t\treverse: boolean\n\t): TransitionActor {\n\t\tconst paint =\n\t\t\trole === 'summary-surface' && reverse ? this.hooks.captureSurface?.(source) : undefined;\n\t\tconst projection =\n\t\t\tcaptureCarouselElement(source) ??\n\t\t\t(role !== 'summary-surface' && reverse ? this.hooks.captureElement?.(source) : undefined);\n\t\tconst bounds =\n\t\t\tpaint?.bounds ?? (role === 'summary-surface' ? this.hooks.resolveSurface(source) : source);\n\t\tconst from = bounds.getBoundingClientRect();\n\t\tconst style = getComputedStyle(\n\t\t\trole === 'summary-surface' && reverse ? bounds : source,\n\t\t\trole === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null\n\t\t);\n\t\tconst element = document.createElement('div');\n\t\telement.dataset.catalogSharedKey = catalogSharedKey(identity, role);\n\t\telement.dataset.catalogActorRole = role;\n\t\tObject.assign(element.style, {\n\t\t\tposition: 'fixed',\n\t\t\tleft: `${from.left}px`,\n\t\t\ttop: `${from.top}px`,\n\t\t\twidth: `${from.width}px`,\n\t\t\theight: `${from.height}px`,\n\t\t\tmargin: '0',\n\t\t\tboxSizing: 'border-box',\n\t\t\tpointerEvents: 'none',\n\t\t\ttransformOrigin: 'top left',\n\t\t\tzIndex: role === 'summary-surface' ? '20' : '22',\n\t\t\twillChange: 'transform, opacity'\n\t\t});\n\t\tif (role === 'summary-surface') {\n\t\t\tObject.assign(element.style, {\n\t\t\t\tbackground: paint?.background ?? style.backgroundColor,\n\t\t\t\tborder: paint?.border ?? style.border,\n\t\t\t\tborderRadius: paint?.borderRadius ?? style.borderRadius,\n\t\t\t\tboxShadow: paint?.boxShadow ?? style.boxShadow\n\t\t\t});\n\t\t} else {\n\t\t\tif (isRichRole(role)) copyRichContent(element, source);\n\t\t\telse element.textContent = source.textContent;\n\t\t\tcopyTypography(element, style);\n\t\t\tObject.assign(element.style, {\n\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\tfontSize: style.fontSize,\n\t\t\t\tfontWeight: style.fontWeight,\n\t\t\t\tfontStyle: style.fontStyle,\n\t\t\t\tlineHeight: style.lineHeight,\n\t\t\t\tletterSpacing: style.letterSpacing,\n\t\t\t\ttextTransform: style.textTransform,\n\t\t\t\ttextAlign: style.textAlign,\n\t\t\t\tcolor: style.color\n\t\t\t});\n\t\t}\n\t\tconst actor: TransitionActor = {\n\t\t\tsemantic: source.dataset.catalogSemantic,\n\t\t\trole,\n\t\t\telement,\n\t\t\tfrom,\n\t\t\tfontSize: Number.parseFloat(style.fontSize),\n\t\t\tcorners: projection?.corners ?? paint?.corners,\n\t\t\tlayoutWidth: projection?.width,\n\t\t\tlayoutHeight: projection?.height\n\t\t};\n\t\tconst corners = projection?.corners ?? paint?.corners;\n\t\tif (corners) {\n\t\t\tconst local = corners.map((point) => ({\n\t\t\t\tx: point.x - from.left,\n\t\t\t\ty: point.y - from.top\n\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\tconst width = projection?.width ?? from.width;\n\t\t\tconst height = projection?.height ?? from.height;\n\t\t\telement.style.width = `${width}px`;\n\t\t\telement.style.height = `${height}px`;\n\t\t\telement.style.transform = getProjectiveCssMatrix3d(local, width, height) ?? '';\n\t\t}\n\t\treturn actor;\n\t}\n\n\tprivate contentEndpoints(brandId: string, requireSubmitted = true): CatalogParticipantEndpoint[] {\n\t\treturn this.endpoints\n\t\t\t.getContentEndpoints()\n\t\t\t.filter((entry) => entry.address.brandId === brandId)\n\t\t\t.map(({ address, element }) => {\n\t\t\t\tlet sectionId: string | undefined;\n\t\t\t\ttry {\n\t\t\t\t\tsectionId = JSON.parse(address.occurrence ?? '[]')[0];\n\t\t\t\t} catch {\n\t\t\t\t\t/* Legacy occurrence. */\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...address,\n\t\t\t\t\trole: 'geometry',\n\t\t\t\t\tsectionId,\n\t\t\t\t\torder: Number(element.dataset.catalogOrder ?? 0),\n\t\t\t\t\teligible:\n\t\t\t\t\t\taddress.slot === 'catalog.card' ? fullyPresented(element) : intersectsViewport(element),\n\t\t\t\t\tprepared: !requireSubmitted || element.hasAttribute('data-catalog-model-ready'),\n\t\t\t\t\tselected: address.slot === 'carousel.front',\n\t\t\t\t\tfocused: element.contains(document.activeElement)\n\t\t\t\t};\n\t\t\t});\n\t}\n\tcapture(fromURL: URL, toURL: URL, type: string) {\n\t\tconst retained = this.captureState;\n\n\t\tif (retained?.paused && retained.retarget) {\n\t\t\tconst journey = resolveCatalogJourney(fromURL, toURL, type);\n\t\t\tif (journey?.kind === 'content-view') {\n\t\t\t\tconst context = type === 'popstate' ? {} : readCatalogViewContext(toURL);\n\t\t\t\tconst previousPairs = retained.view?.pairs ?? [];\n\t\t\t\tconst candidates = previousPairs.length\n\t\t\t\t\t? previousPairs.map((pair) => pair.target)\n\t\t\t\t\t: this.contentEndpoints(journey.brandId, false);\n\t\t\t\tconst source = candidates.find(\n\t\t\t\t\t(p) =>\n\t\t\t\t\t\tp.spatialElementId === retained.identity.spatialElementId && p.slot === retained.recipe.targetShared\n\t\t\t\t);\n\t\t\t\tif (source && (!context.spatialElementId || context.spatialElementId === retained.identity.spatialElementId)) {\n\t\t\t\t\tthis.hooks.adoptContentParticipants?.(previousPairs);\n\t\t\t\t\tretained.view = {\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tsources: candidates.filter((p) => p.sectionId === source.sectionId),\n\t\t\t\t\t\tcontext: {\n\t\t\t\t\t\t\t...context,\n\t\t\t\t\t\t\tspatialElementId: retained.identity.spatialElementId,\n\t\t\t\t\t\t\ttargetSection: journey.section ?? context.targetSection\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tretained.recipe = {\n\t\t\t\t\t\t...retained.recipe,\n\t\t\t\t\t\tsource: source.slot,\n\t\t\t\t\t\tid: source.slot === 'catalog.card' ? 'list-to-carousel' : 'carousel-to-list'\n\t\t\t\t\t};\n\t\t\t\t\tretained.owner = retained.lease!.claim();\n\t\t\t\t\tretained.token = this.sequence.begin();\n\t\t\t\t\tretained.elapsed = 0;\n\t\t\t\t\tretained.mode = undefined;\n\t\t\t\t\tretained.backgroundPrepared = undefined;\n\t\t\t\t\tretained.paused = false;\n\t\t\t\t\tretained.retarget = false;\n\t\t\t\t\tthis.captureExitingContent(retained);\n\t\t\t\t\tthis.root.dataset.catalogDirection = 'return';\n\t\t\t\t\tthis.root.dataset.catalogRecipe = retained.recipe.id;\n\t\t\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst intent = resolveCatalogIntent(fromURL, toURL, type);\n\t\t\tconst reverse = intent?.direction === 'detail-to-list';\n\t\t\tconst content =\n\t\t\t\tretained.recipe.source.startsWith('carousel.') ||\n\t\t\t\tretained.recipe.targetShared.startsWith('carousel.')\n\t\t\t\t\t? 'carousel'\n\t\t\t\t\t: 'list';\n\t\t\tconst recipe = selectCatalogRecipe(\n\t\t\t\tintent,\n\t\t\t\treverse ? (retained.recipe.targetShared === 'detail.dock' ? 'dock' : 'hero') : content,\n\t\t\t\treverse ? content : 'hero'\n\t\t\t);\n\t\t\tif (recipe) {\n\t\t\t\tretained.view = undefined;\n\t\t\t\tthis.hooks.adoptContentParticipants?.([]);\n\t\t\t\tretained.owner = retained.lease!.claim();\n\t\t\t\tretained.token = this.sequence.begin();\n\t\t\t\tretained.recipe = recipe;\n\t\t\t\tretained.elapsed = 0;\n\t\t\t\tretained.mode = undefined;\n\t\t\t\tretained.backgroundPrepared = undefined;\n\t\t\t\tretained.paused = false;\n\t\t\t\tretained.retarget = false;\n\t\t\t\tthis.captureExitingContent(retained);\n\t\t\t\tthis.root.dataset.catalogDirection = reverse ? 'return' : 'forward';\n\t\t\t\tthis.root.dataset.catalogRecipe = recipe.id;\n\t\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tretained?.paused &&\n\t\t\tretained.mode &&\n\t\t\ttype !== 'popstate' &&\n\t\t\tthis.matchesDestination(retained, toURL)\n\t\t) {\n\t\t\tretained.token = this.sequence.begin();\n\t\t\tretained.owner = retained.lease!.claim();\n\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\treturn true;\n\t\t}\n\t\tthis.cancel();\n\t\tconst journey = resolveCatalogJourney(fromURL, toURL, type);\n\t\tconst context = type === 'popstate' ? {} : readCatalogViewContext(toURL);\n\t\tconst inventory =\n\t\t\tjourney?.kind === 'content-view' ? this.contentEndpoints(journey.brandId) : [];\n\t\tconst sourcePairs = planCatalogParticipants(\n\t\t\tinventory,\n\t\t\tinventory,\n\t\t\t{\n\t\t\t\tspatialElementId: context.spatialElementId,\n\t\t\t\tsourceSection: context.sourceSection,\n\t\t\t\tsourceOccurrence: context.sourceOccurrence\n\t\t\t},\n\t\t\t5\n\t\t);\n\t\tconst primary = sourcePairs[0];\n\t\tconst view =\n\t\t\tjourney?.kind === 'content-view' && primary\n\t\t\t\t? {\n\t\t\t\t\t\tsource: primary.source,\n\t\t\t\t\t\tsources: sourcePairs.map((pair) => pair.source),\n\t\t\t\t\t\tcontext: { ...context, targetSection: journey.section ?? context.targetSection }\n\t\t\t\t\t}\n\t\t\t\t: undefined;\n\t\tif (journey?.kind === 'content-view' && !view) return;\n\t\tif (view)\n\t\t\tthis.endpoints.prefer(\n\t\t\t\tview.source.brandId,\n\t\t\t\tview.source.spatialElementId,\n\t\t\t\tview.source.occurrence!,\n\t\t\t\tview.source.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t);\n\t\tconst intent = view\n\t\t\t? {\n\t\t\t\t\tidentity: primary!.identity,\n\t\t\t\t\tdirection: 'list-to-detail' as const,\n\t\t\t\t\thistory: type === 'popstate',\n\t\t\t\t\ttarget: 'hero' as const\n\t\t\t\t}\n\t\t\t: resolveCatalogIntent(fromURL, toURL, type);\n\t\tconst reverse = intent?.direction === 'detail-to-list';\n\t\tconst contentSlot = intent\n\t\t\t? reverse\n\t\t\t\t? this.endpoints.getPreferredContentSlot(intent.identity)\n\t\t\t\t: this.endpoints.getContentSlot(intent.identity)\n\t\t\t: undefined;\n\t\tconst composition =\n\t\t\treverse && intent\n\t\t\t\t? this.endpoints.getComposition(intent.identity)\n\t\t\t\t: contentSlot?.startsWith('carousel.')\n\t\t\t\t\t? 'carousel'\n\t\t\t\t\t: contentSlot === 'catalog.card'\n\t\t\t\t\t\t? 'list'\n\t\t\t\t\t\t: 'unavailable';\n\t\tconst recipe: CatalogRecipe | undefined = view\n\t\t\t? {\n\t\t\t\t\tid: view.source.slot === 'catalog.card' ? 'list-to-carousel' : 'carousel-to-list',\n\t\t\t\t\tidentity: primary!.identity,\n\t\t\t\t\tsource: view.source.slot,\n\t\t\t\t\ttargetGeometry: view.source.slot === 'catalog.card' ? 'carousel.front' : 'catalog.card',\n\t\t\t\t\ttargetShared: view.source.slot === 'catalog.card' ? 'carousel.front' : 'catalog.card',\n\t\t\t\t\troles: ['summary-surface', 'eyebrow', 'title']\n\t\t\t\t}\n\t\t\t: selectCatalogRecipe(\n\t\t\t\t\tintent,\n\t\t\t\t\tcomposition,\n\t\t\t\t\treverse ? (contentSlot?.startsWith('carousel.') ? 'carousel' : 'list') : 'hero'\n\t\t\t\t);\n\t\tif (recipe && !reverse && contentSlot === 'carousel.neighbour') {\n\t\t\trecipe.source = contentSlot;\n\t\t\trecipe.roles = [];\n\t\t}\n\t\tif (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches) return;\n\t\tconst identity = recipe.identity;\n\t\tconst dock = recipe.source === 'detail.dock';\n\t\tconst source = { ...identity, slot: recipe.source };\n\t\tconst card = this.endpoints.resolve({\n\t\t\t...source,\n\t\t\trole: reverse ? 'summary-surface' : 'container'\n\t\t});\n\t\tif (\n\t\t\t!card ||\n\t\t\t!this.endpoints.resolve({\n\t\t\t\t...source,\n\t\t\t\tslot: reverse && !dock ? 'detail.hero' : source.slot,\n\t\t\t\trole: 'geometry'\n\t\t\t})\n\t\t)\n\t\t\treturn;\n\t\tif (reverse)\n\t\t\trecipe.roles = recipe.roles.filter((role) => {\n\t\t\t\tconst element = this.endpoints.resolve({ ...source, role });\n\t\t\t\t// During docking the hero remains the geometry source. Do not resurrect\n\t\t\t\t// already clipped summary pieces just to retain their semantic roles.\n\t\t\t\treturn (\n\t\t\t\t\telement &&\n\t\t\t\t\tvisiblyPresented(element) &&\n\t\t\t\t\t(composition !== 'intermediate' || fullyPresented(element))\n\t\t\t\t);\n\t\t\t});\n\t\trecipe.roles = recipe.roles.filter(\n\t\t\t(role) => !isRichRole(role) || this.endpoints.resolve({ ...source, role })\n\t\t);\n\t\tconst sources = recipe.roles.map((role) => this.endpoints.resolve({ ...source, role }));\n\t\tif (sources.some((element) => !element || !hasSize(element.getBoundingClientRect()))) return;\n\t\tif (!reverse && !(composition === 'carousel' ? visiblyPresented(card) : fullyPresented(card)))\n\t\t\treturn;\n\t\tif (reverse && sources.some((element) => element && !fullyPresented(element))) return;\n\n\t\ttry {\n\t\t\tconst endpoint = geometryEndpoint({\n\t\t\t\t...source,\n\t\t\t\tslot: reverse && !dock ? 'detail.hero' : source.slot\n\t\t\t});\n\t\t\tif (\n\t\t\t\tview\n\t\t\t\t\t? !this.hooks.captureContentGeometry?.(view.source, view.sources.slice(1))\n\t\t\t\t\t: !this.hooks.captureGeometry(endpoint)\n\t\t\t)\n\t\t\t\treturn;\n\t\t\tconst token = this.sequence.begin();\n\t\t\tconst host = document.createElement('div');\n\t\t\thost.dataset.catalogTransitionActors = '';\n\t\t\thost.setAttribute('aria-hidden', 'true');\n\t\t\thost.inert = true;\n\t\t\t// The host must not form a stacking context: surface < GPU overlay < text.\n\t\t\thost.style.pointerEvents = 'none';\n\t\t\tconst capture: TransitionCapture = {\n\t\t\t\tview,\n\t\t\t\tcaptureShell: !reverse && (intent?.history || intent?.target === 'section'),\n\t\t\t\telapsed: 0,\n\t\t\t\ttoken,\n\t\t\t\tidentity,\n\t\t\t\trecipe,\n\t\t\t\thost,\n\t\t\t\tactors: [],\n\t\t\t\texiting: [],\n\t\t\t\trestore: [],\n\t\t\t\tframe: 0,\n\t\t\t\tinert: new Map(),\n\t\t\t\ttimeout: setTimeout(() => {\n\t\t\t\t\tif (this.captureState === capture) this.cancel();\n\t\t\t\t}, 5000)\n\t\t\t};\n\t\t\tthis.captureState = capture;\n\t\t\tcapture.lease = new PresentationLease(capture, () => this.cleanup());\n\t\t\tcapture.owner = capture.lease.claim();\n\t\t\tfor (let index = 0; index < recipe.roles.length; index++) {\n\t\t\t\tconst actor = this.createActor(identity, sources[index]!, recipe.roles[index], reverse);\n\t\t\t\tcapture.actors.push(actor);\n\t\t\t\thost.appendChild(actor.element);\n\t\t\t}\n\t\t\tif (capture.view && !capture.view.context.spatialElementId) {\n\t\t\t\tcapture.view.alternates = new Map();\n\t\t\t\tfor (const endpoint of capture.view.sources.slice(1)) {\n\t\t\t\t\tconst actors: TransitionActor[] = [];\n\t\t\t\t\tfor (const role of ['summary-surface', 'eyebrow', 'title'] as const) {\n\t\t\t\t\t\tconst element = this.endpoints.resolve({ ...endpoint, role });\n\t\t\t\t\t\tif (element && visiblyPresented(element))\n\t\t\t\t\t\t\tactors.push(this.createActor(endpoint, element, role, false));\n\t\t\t\t\t}\n\t\t\t\t\tcapture.view.alternates.set(endpoint.occurrence!, actors);\n\t\t\t\t}\n\t\t\t\tthis.endpoints.prefer(\n\t\t\t\t\tidentity.brandId,\n\t\t\t\t\tidentity.spatialElementId,\n\t\t\t\t\tcapture.view.source.occurrence!,\n\t\t\t\t\tcapture.view.source.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(host);\n\t\t\tif (reverse) {\n\t\t\t\tfor (const source of sources) {\n\t\t\t\t\tif (source === card) continue;\n\t\t\t\t\tpreserveStyle(source!, 'visibility', capture.restore);\n\t\t\t\t\tsource!.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t\tthis.captureExitingContent(capture);\n\t\t\t}\n\t\t\tpreserveStyle(card, 'visibility', capture.restore);\n\t\t\tcard.style.setProperty('visibility', 'hidden', 'important');\n\t\t\tif (!reverse) this.captureExitingContent(capture);\n\t\t\tthis.root.dataset.catalogDirection = reverse || view ? 'return' : 'forward';\n\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\tthis.root.dataset.catalogTransition = 'captured';\n\t\t\tthis.root.dataset.catalogRecipe = recipe.id;\n\t\t\tthis.root.dataset.catalogOwnershipRevision = String(capture.lease.revision);\n\t\t\tthis.lockParticipants(capture);\n\t\t\tcapture.observer = new MutationObserver(() => this.lockParticipants(capture));\n\t\t\tcapture.observer.observe(this.root, { childList: true, subtree: true });\n\t\t\twindow.addEventListener('resize', this.interrupt, { passive: true });\n\t\t\twindow.addEventListener('wheel', this.interrupt, { passive: true, capture: true });\n\t\t\twindow.addEventListener('touchmove', this.interrupt, { passive: true, capture: true });\n\t\t\twindow.addEventListener('keydown', this.keydown);\n\t\t} catch {\n\t\t\tthis.cancel();\n\t\t}\n\t}\n\n\t/** Keep only decorative outgoing DOM; Kit can mount and measure the real destination now. */\n\tprivate captureExitingContent(capture: TransitionCapture) {\n\t\tconst selector = isReturnRecipe(capture.recipe)\n\t\t\t? '[data-catalog-transition-dom=\"enter\"], [data-catalog-transition-group=\"enter\"], [data-catalog-secondary]'\n\t\t\t: `[data-catalog-transition-dom=\"exit\"]${capture.captureShell ? ', [data-catalog-shell]' : ''}`;\n\t\tfor (const source of this.root.querySelectorAll<HTMLElement>(selector)) {\n\t\t\tif (source.parentElement?.closest(selector)) continue;\n\t\t\tif (\n\t\t\t\tcapture.actors.some(\n\t\t\t\t\t(actor) =>\n\t\t\t\t\t\tactor.role ===\n\t\t\t\t\t\tsource.closest<HTMLElement>('[data-catalog-rich-shared]')?.dataset.catalogRichShared\n\t\t\t\t)\n\t\t\t)\n\t\t\t\tcontinue;\n\t\t\tconst rect = source.getBoundingClientRect();\n\t\t\tif (!hasSize(rect) || rect.bottom <= 0 || rect.top >= window.innerHeight) continue;\n\t\t\tif (!visiblyPresented(source)) continue;\n\t\t\tconst copy = source.cloneNode(true) as HTMLElement;\n\t\t\tconst style = getComputedStyle(source);\n\t\t\tconst originals = [source, ...source.querySelectorAll<HTMLElement | SVGElement>('*')];\n\t\t\tconst copies = [copy, ...copy.querySelectorAll<HTMLElement | SVGElement>('*')];\n\t\t\tfor (let index = 0; index < originals.length; index++) {\n\t\t\t\tconst computed = getComputedStyle(originals[index]);\n\t\t\t\tfor (const property of computed)\n\t\t\t\t\tcopies[index].style.setProperty(property, computed.getPropertyValue(property));\n\t\t\t}\n\t\t\tfor (const element of [copy, ...copy.querySelectorAll('*')]) {\n\t\t\t\telement.removeAttribute('id');\n\t\t\t\tfor (const attribute of [...element.attributes]) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tattribute.name.startsWith('data-') &&\n\t\t\t\t\t\tattribute.name !== 'data-catalog-model-ready' &&\n\t\t\t\t\t\tattribute.name !== 'data-catalog-poster' &&\n\t\t\t\t\t\t![\n\t\t\t\t\t\t\t'data-stage-panel-content',\n\t\t\t\t\t\t\t'data-stage-panel-css-surface',\n\t\t\t\t\t\t\t'data-stage-panel-render-mode',\n\t\t\t\t\t\t\t'data-stage-panel-surface'\n\t\t\t\t\t\t].includes(attribute.name)\n\t\t\t\t\t)\n\t\t\t\t\t\telement.removeAttribute(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (let index = 0; index < originals.length; index++) {\n\t\t\t\tconst original = originals[index];\n\t\t\t\tif (original.matches('[data-catalog-card], [data-carousel-spatial-element]'))\n\t\t\t\t\t(copies[index] as HTMLElement).dataset.catalogExitOccurrence = (\n\t\t\t\t\t\toriginal as HTMLElement\n\t\t\t\t\t).dataset.catalogOccurrence;\n\t\t\t}\n\t\t\tcopy.dataset.catalogExitCopy = '';\n\t\t\tcopy.dataset.catalogBaseOpacity = style.opacity;\n\t\t\tif (source.hasAttribute('data-catalog-shell')) copy.dataset.catalogShellCopy = '';\n\t\t\tcopy.setAttribute('aria-hidden', 'true');\n\t\t\tcopy.inert = true;\n\t\t\tObject.assign(copy.style, {\n\t\t\t\tposition: 'fixed',\n\t\t\t\tleft: `${rect.left}px`,\n\t\t\t\ttop: `${rect.top}px`,\n\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\theight: `${rect.height}px`,\n\t\t\t\tmargin: '0',\n\t\t\t\ttransform: 'none',\n\t\t\t\tzIndex: source.hasAttribute('data-catalog-secondary') ? '22' : '2',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\ttransition: 'none',\n\t\t\t\tanimation: 'none',\n\t\t\t\twillChange: 'opacity'\n\t\t\t});\n\t\t\tconst projection = this.hooks.captureElement?.(source);\n\t\t\tif (projection) {\n\t\t\t\tconst corners = projection.corners.map((point) => ({\n\t\t\t\t\tx: point.x - rect.left,\n\t\t\t\t\ty: point.y - rect.top\n\t\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\twidth: `${projection.width}px`,\n\t\t\t\t\theight: `${projection.height}px`,\n\t\t\t\t\ttransformOrigin: 'top left',\n\t\t\t\t\ttransform:\n\t\t\t\t\t\tgetProjectiveCssMatrix3d(corners, projection.width, projection.height) ?? 'none'\n\t\t\t\t});\n\t\t\t}\n\t\t\tthis.root.appendChild(copy);\n\t\t\tcapture.exiting.push(copy);\n\t\t\tconst panel = capture.actors.find((actor) => actor.role === 'summary-surface');\n\t\t\tif (panel && source.closest('[data-spatial-element-hero-panel-content]')) {\n\t\t\t\t(capture.panelContent ??= []).push({\n\t\t\t\t\telement: copy,\n\t\t\t\t\trect,\n\t\t\t\t\tpanel: panel.from,\n\t\t\t\t\tincoming: false\n\t\t\t\t});\n\t\t\t}\n\t\t\tpreserveStyle(source, 'visibility', capture.restore);\n\t\t\tsource.style.setProperty('visibility', 'hidden', 'important');\n\t\t}\n\t}\n\n\tprivate lockParticipants(capture: TransitionCapture) {\n\t\tif (!this.sequence.isCurrent(capture.token)) return;\n\t\tfor (const element of this.root.querySelectorAll<HTMLElement>(\n\t\t\t'[data-catalog-transition-dom], [data-catalog-transition-group]'\n\t\t)) {\n\t\t\tif (capture.inert.has(element)) continue;\n\t\t\tcapture.inert.set(element, element.inert);\n\t\t\telement.inert = true;\n\t\t}\n\t}\n\n\tprivate setPresentation(presentation: CatalogTransitionPresentation) {\n\t\tfor (const channel of ['enter', 'exit', 'shared'] as const) {\n\t\t\tconst value = presentation[`${channel}Opacity`];\n\t\t\tif (presentation.active) {\n\t\t\t\tthis.root.style.setProperty(`--catalog-${channel}-opacity`, String(value));\n\t\t\t} else this.root.style.removeProperty(`--catalog-${channel}-opacity`);\n\t\t\tthis.root.toggleAttribute(\n\t\t\t\t`data-catalog-${channel}-hidden`,\n\t\t\t\tpresentation.active && value === 0\n\t\t\t);\n\t\t}\n\t\tfor (const copy of this.captureState?.exiting ?? []) {\n\t\t\tcopy.style.opacity = String(\n\t\t\t\tcopy.hasAttribute('data-catalog-shell-copy') &&\n\t\t\t\t\tthis.captureState?.recipe.targetGeometry !== 'detail.dock'\n\t\t\t\t\t? 1\n\t\t\t\t\t: presentation.exitOpacity * Number(copy.dataset.catalogBaseOpacity ?? 1)\n\t\t\t);\n\t\t}\n\t\tthis.hooks.setPresentation(presentation);\n\t}\n\n\t/** Call only after destination registration and scroll restoration have completed. */\n\tasync play(): Promise<void> {\n\t\tconst capture = this.captureState;\n\t\tif (!capture || !this.sequence.start(capture.token)) return;\n\t\ttry {\n\t\t\tconst reverse = Boolean(capture.view) || isReturnRecipe(capture.recipe);\n\t\t\tif (capture.view) {\n\t\t\t\tconst pairs = planCatalogParticipants(\n\t\t\t\t\tcapture.view.sources,\n\t\t\t\t\tthis.contentEndpoints(capture.identity.brandId, false),\n\t\t\t\t\tcapture.view.context,\n\t\t\t\t\t5\n\t\t\t\t);\n\t\t\t\tcapture.view.pairs = pairs;\n\t\t\t\tconst pair = pairs[0];\n\t\t\t\tif (\n\t\t\t\t\t!pair ||\n\t\t\t\t\tpair.source.slot === pair.target.slot ||\n\t\t\t\t\t(pair.source.slot.startsWith('carousel.') && pair.target.slot.startsWith('carousel.'))\n\t\t\t\t) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (pair.identity.spatialElementId !== capture.identity.spatialElementId) {\n\t\t\t\t\tconst actors = capture.view.alternates?.get(pair.source.occurrence!);\n\t\t\t\t\tif (!actors || !this.hooks.promoteContentParticipant?.(pair.source)) {\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (const actor of capture.actors) capture.exiting.push(actor.element);\n\t\t\t\t\tcapture.actors = actors;\n\t\t\t\t\tfor (const actor of actors) capture.host.appendChild(actor.element);\n\t\t\t\t\tfor (const element of capture.host.querySelectorAll<HTMLElement>(\n\t\t\t\t\t\t'[data-catalog-exit-occurrence]'\n\t\t\t\t\t))\n\t\t\t\t\t\tif (element.dataset.catalogExitOccurrence === pair.source.occurrence)\n\t\t\t\t\t\t\telement.style.opacity = '0';\n\t\t\t\t\tcapture.identity = pair.identity;\n\t\t\t\t\tcapture.recipe.identity = pair.identity;\n\t\t\t\t\tcapture.recipe.source = pair.source.slot;\n\t\t\t\t\tcapture.recipe.roles = actors.map((actor) => actor.role);\n\t\t\t\t\tcapture.view.source = pair.source;\n\t\t\t\t}\n\t\t\t\tthis.endpoints.prefer(\n\t\t\t\t\tpair.target.brandId,\n\t\t\t\t\tpair.target.spatialElementId,\n\t\t\t\t\tpair.target.occurrence!,\n\t\t\t\t\tpair.target.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t\t);\n\t\t\t\tcapture.recipe.targetGeometry = capture.recipe.targetShared = pair.target.slot;\n\t\t\t\tif (pair.target.slot === 'carousel.neighbour') {\n\t\t\t\t\tfor (const actor of capture.actors) capture.exiting.push(actor.element);\n\t\t\t\t\tcapture.actors = [];\n\t\t\t\t\tcapture.recipe.roles = [];\n\t\t\t\t}\n\t\t\t} else if (reverse) {\n\t\t\t\tconst slot = this.endpoints.getContentSlot(capture.identity);\n\t\t\t\tif (!slot) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcapture.recipe = {\n\t\t\t\t\t...capture.recipe,\n\t\t\t\t\tid: slot.startsWith('carousel.')\n\t\t\t\t\t\t? capture.recipe.source === 'detail.dock'\n\t\t\t\t\t\t\t? 'dock-to-carousel'\n\t\t\t\t\t\t\t: 'hero-to-carousel'\n\t\t\t\t\t\t: capture.recipe.source === 'detail.dock'\n\t\t\t\t\t\t\t? 'dock-to-list'\n\t\t\t\t\t\t\t: 'hero-to-list',\n\t\t\t\t\ttargetGeometry: slot,\n\t\t\t\t\ttargetShared: slot\n\t\t\t\t};\n\t\t\t\tif (slot === 'carousel.neighbour') {\n\t\t\t\t\tfor (const actor of capture.actors) {\n\t\t\t\t\t\tcapture.exiting.push(actor.element);\n\t\t\t\t\t\tactor.destinationCopy?.remove();\n\t\t\t\t\t}\n\t\t\t\t\tcapture.actors = [];\n\t\t\t\t\tcapture.recipe.roles = [];\n\t\t\t\t}\n\t\t\t\tthis.root.dataset.catalogRecipe = capture.recipe.id;\n\t\t\t} else {\n\t\t\t\tconst composition = this.endpoints.getComposition(capture.identity);\n\t\t\t\tif (composition !== 'hero' && composition !== 'intermediate' && composition !== 'dock') {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcapture.recipe = {\n\t\t\t\t\t...capture.recipe,\n\t\t\t\t\tid:\n\t\t\t\t\t\tcomposition === 'dock'\n\t\t\t\t\t\t\t? capture.recipe.source.startsWith('carousel.')\n\t\t\t\t\t\t\t\t? 'carousel-to-dock'\n\t\t\t\t\t\t\t\t: 'list-to-dock'\n\t\t\t\t\t\t\t: capture.recipe.source.startsWith('carousel.')\n\t\t\t\t\t\t\t\t? 'carousel-to-hero'\n\t\t\t\t\t\t\t\t: 'list-to-hero',\n\t\t\t\t\ttargetGeometry: composition === 'dock' ? 'detail.dock' : 'detail.hero',\n\t\t\t\t\ttargetShared: composition === 'dock' ? 'detail.dock' : 'detail.summary'\n\t\t\t\t};\n\t\t\t\tthis.root.dataset.catalogRecipe = capture.recipe.id;\n\t\t\t}\n\t\t\tconst page = this.root.querySelector<HTMLElement>('[data-spatial-element-root]');\n\t\t\tif (\n\t\t\t\t(!reverse && page?.dataset.spatialElementId !== capture.identity.spatialElementId) ||\n\t\t\t\t!this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetGeometry,\n\t\t\t\t\trole: 'geometry'\n\t\t\t\t})\n\t\t\t) {\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tthis.hooks.prepareDestination?.({\n\t\t\t\t\tspatialElementId: capture.identity.spatialElementId,\n\t\t\t\t\tkind: reverse ? 'content' : capture.recipe.targetGeometry === 'detail.dock' ? 'dock' : 'hero'\n\t\t\t\t}) === false\n\t\t\t) {\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (capture.view) {\n\t\t\t\tconst prepared = this.hooks.prepareContentParticipants?.(capture.view.pairs ?? []) ?? [];\n\t\t\t\tfor (const pair of prepared) {\n\t\t\t\t\tconst geometry = this.endpoints.resolve({ ...pair.target, role: 'geometry' });\n\t\t\t\t\tif (!geometry) continue;\n\t\t\t\t\tpreserveStyle(geometry, 'visibility', capture.restore);\n\t\t\t\t\tgeometry.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t\t// Remove prepared target pixels before yielding to the first moving frame.\n\t\t\t\tthis.hooks.flushFrame();\n\t\t\t}\n\t\t\tif (reverse) {\n\t\t\t\tconst card = this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\trole: 'container'\n\t\t\t\t});\n\t\t\t\tif (\n\t\t\t\t\t!card ||\n\t\t\t\t\t!(capture.recipe.targetShared.startsWith('carousel.')\n\t\t\t\t\t\t? intersectsViewport(card)\n\t\t\t\t\t\t: fullyPresented(card))\n\t\t\t\t) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (capture.actors.length) {\n\t\t\t\t\tpreserveStyle(card, 'visibility', capture.restore);\n\t\t\t\t\tcard.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst measuredTargets = new Map<HTMLElement, DOMRect>();\n\t\t\tconst sharedTargets = new Set<HTMLElement>();\n\t\t\tfor (const actor of capture.actors) {\n\t\t\t\tlet target = this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\trole: actor.role\n\t\t\t\t});\n\t\t\t\tconst missingRich = !target && isRichRole(actor.role);\n\t\t\t\tif (missingRich) {\n\t\t\t\t\ttarget = this.endpoints.resolve({\n\t\t\t\t\t\t...capture.identity,\n\t\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\t\trole: 'summary-surface'\n\t\t\t\t\t});\n\t\t\t\t\tactor.sourceOnly = true;\n\t\t\t\t}\n\t\t\t\tif (!target) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst bounds =\n\t\t\t\t\tactor.role === 'summary-surface' ? this.hooks.resolveSurface(target) : target;\n\t\t\t\tsharedTargets.add(target);\n\t\t\t\tconst targetRect = bounds.getBoundingClientRect();\n\t\t\t\tif (\n\t\t\t\t\tcapture.paused &&\n\t\t\t\t\tactor.to &&\n\t\t\t\t\t['x', 'y', 'width', 'height'].some(\n\t\t\t\t\t\t(key) =>\n\t\t\t\t\t\t\tMath.abs(\n\t\t\t\t\t\t\t\t(targetRect[key as keyof DOMRect] as number) -\n\t\t\t\t\t\t\t\t\t(actor.to![key as keyof DOMRect] as number)\n\t\t\t\t\t\t\t) > 0.5\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tactor.to = targetRect;\n\t\t\t\tif (missingRich) {\n\t\t\t\t\tconst panel = capture.actors.find((item) => item.role === 'summary-surface')!;\n\t\t\t\t\tconst sx = targetRect.width / panel.from.width,\n\t\t\t\t\t\tsy = targetRect.height / panel.from.height;\n\t\t\t\t\tactor.to = new DOMRect(\n\t\t\t\t\t\ttargetRect.left + (actor.from.left - panel.from.left) * sx,\n\t\t\t\t\t\ttargetRect.top + (actor.from.top - panel.from.top) * sy,\n\t\t\t\t\t\tactor.from.width * sx,\n\t\t\t\t\t\tactor.from.height * sy\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (isRichRole(actor.role))\n\t\t\t\t\tactor.element.dataset.catalogContentMatch =\n\t\t\t\t\t\tactor.semantic && actor.semantic === target.dataset.catalogSemantic\n\t\t\t\t\t\t\t? 'shared'\n\t\t\t\t\t\t\t: 'replaced';\n\t\t\t\tmeasuredTargets.set(bounds, targetRect);\n\t\t\t\tif (!hasSize(actor.to)) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tactor.fontScale =\n\t\t\t\t\tNumber.parseFloat(getComputedStyle(target).fontSize) / actor.fontSize || 1;\n\t\t\t\tif (!actor.sourceOnly && !actor.destinationCopy) {\n\t\t\t\t\t// Keep both text layouts fixed. Crossfade their typography instead of stretching\n\t\t\t\t\t// the source line width beyond the destination panel or recomputing layout every frame.\n\t\t\t\t\tconst copy = document.createElement('div');\n\t\t\t\t\tcopy.style.cssText = actor.element.style.cssText;\n\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\tif (isRichRole(actor.role)) copyRichContent(copy, target);\n\t\t\t\t\t\telse copy.textContent = target.textContent;\n\t\t\t\t\t\tcopyTypography(copy, getComputedStyle(target));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst paint = this.hooks.captureSurface?.(target);\n\t\t\t\t\t\tconst style = getComputedStyle(\n\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\ttarget.closest('[data-carousel-spatial-element]') ? '::before' : null\n\t\t\t\t\t\t);\n\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\tbackground: paint?.background ?? style.backgroundColor,\n\t\t\t\t\t\t\tborder: paint?.border ?? style.border,\n\t\t\t\t\t\t\tborderRadius: paint?.borderRadius ?? style.borderRadius,\n\t\t\t\t\t\t\tboxShadow: paint?.boxShadow ?? style.boxShadow\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcopy.style.width = `${actor.to.width}px`;\n\t\t\t\t\tcopy.style.height = `${actor.to.height}px`;\n\t\t\t\t\tcopy.style.opacity = '0';\n\t\t\t\t\tcopy.style.overflow = 'hidden';\n\t\t\t\t\tcopy.dataset.catalogActorRole = actor.role;\n\t\t\t\t\tcopy.dataset.catalogActorVariant = 'destination';\n\t\t\t\t\tcapture.host.appendChild(copy);\n\t\t\t\t\tactor.destinationCopy = copy;\n\t\t\t\t}\n\t\t\t\tif (actor.role === 'summary-surface') {\n\t\t\t\t\tcapture.content = target;\n\t\t\t\t\tif (!capture.panelContent?.some((entry) => entry.incoming)) {\n\t\t\t\t\t\tfor (const source of target.querySelectorAll<HTMLElement>('[data-catalog-secondary]')) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tcapture.actors.some(\n\t\t\t\t\t\t\t\t\t(actor) =>\n\t\t\t\t\t\t\t\t\t\tactor.role ===\n\t\t\t\t\t\t\t\t\t\tsource.closest<HTMLElement>('[data-catalog-rich-shared]')?.dataset\n\t\t\t\t\t\t\t\t\t\t\t.catalogRichShared\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tconst rect = source.getBoundingClientRect();\n\t\t\t\t\t\t\tconst copy = source.cloneNode(true) as HTMLElement;\n\t\t\t\t\t\t\tconst originals = [source, ...source.querySelectorAll<HTMLElement | SVGElement>('*')];\n\t\t\t\t\t\t\tconst copies = [copy, ...copy.querySelectorAll<HTMLElement | SVGElement>('*')];\n\t\t\t\t\t\t\tfor (let index = 0; index < originals.length; index++) {\n\t\t\t\t\t\t\t\tconst style = getComputedStyle(originals[index]);\n\t\t\t\t\t\t\t\tfor (const property of style)\n\t\t\t\t\t\t\t\t\tcopies[index].style.setProperty(property, style.getPropertyValue(property));\n\t\t\t\t\t\t\t\t// The live destination is deliberately masked during binding.\n\t\t\t\t\t\t\t\tcopies[index].style.visibility = 'visible';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (const element of [copy, ...copy.querySelectorAll('*')]) {\n\t\t\t\t\t\t\t\telement.removeAttribute('id');\n\t\t\t\t\t\t\t\tfor (const attribute of [...element.attributes])\n\t\t\t\t\t\t\t\t\tif (attribute.name.startsWith('data-')) element.removeAttribute(attribute.name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcopy.inert = true;\n\t\t\t\t\t\t\tcopy.setAttribute('aria-hidden', 'true');\n\t\t\t\t\t\t\tcopy.dataset.catalogPanelContent = '';\n\t\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\t\t\tleft: '0',\n\t\t\t\t\t\t\t\ttop: '0',\n\t\t\t\t\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\t\t\t\t\theight: `${rect.height}px`,\n\t\t\t\t\t\t\t\tmargin: '0',\n\t\t\t\t\t\t\t\ttransformOrigin: 'top left',\n\t\t\t\t\t\t\t\topacity: '0',\n\t\t\t\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t\t\t\t\tzIndex: '22',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\ttransition: 'none',\n\t\t\t\t\t\t\t\tanimation: 'none'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcapture.host.appendChild(copy);\n\t\t\t\t\t\t\t(capture.panelContent ??= []).push({\n\t\t\t\t\t\t\t\telement: copy,\n\t\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\t\tpanel: targetRect,\n\t\t\t\t\t\t\t\tincoming: true\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const target of sharedTargets) {\n\t\t\t\tpreserveStyle(target, 'visibility', capture.restore);\n\t\t\t\ttarget.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t}\n\t\t\tconst content = capture.content;\n\t\t\tcapture.layoutObserver?.disconnect();\n\t\t\tcapture.layoutObserver = new ResizeObserver(() => {\n\t\t\t\tif (this.captureState !== capture || capture.paused) return;\n\t\t\t\tfor (const [element, rect] of measuredTargets) {\n\t\t\t\t\tconst current = element.getBoundingClientRect();\n\t\t\t\t\tif (\n\t\t\t\t\t\tMath.abs(current.width - rect.width) > 1 ||\n\t\t\t\t\t\tMath.abs(current.height - rect.height) > 1\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tfor (const element of measuredTargets.keys()) capture.layoutObserver.observe(element);\n\t\t\tif (\n\t\t\t\tdocument.activeElement instanceof HTMLElement &&\n\t\t\t\tcontent?.contains(document.activeElement)\n\t\t\t) {\n\t\t\t\tcapture.focus = document.activeElement;\n\t\t\t}\n\t\t\tthis.lockParticipants(capture);\n\t\t\tthis.root.dataset.catalogTransition = 'animating';\n\t\t\tif (matchMedia('(prefers-reduced-motion: reduce)').matches) {\n\t\t\t\tthis.hooks.setGeometryProgress(1);\n\t\t\t\tthis.settle(capture.token);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\tconst mode =\n\t\t\t\t\tcapture.mode ?? (reverse ? 'synchronous' : this.hooks.beginMotion?.()) ?? 'asynchronous';\n\t\t\t\tcapture.mode = mode;\n\t\t\t\tcapture.backgroundPrepared ??= !reverse && Boolean(this.hooks.backgroundPrepared?.());\n\t\t\t\tcapture.paused = false;\n\t\t\t\tconst owner = capture.owner!;\n\t\t\t\tcapture.resolve = resolve;\n\t\t\t\tlet previous = performance.now();\n\t\t\t\tlet elapsed = capture.elapsed;\n\t\t\t\tconst frame = (now: number) => {\n\t\t\t\t\tif (!owner.isCurrent() || capture.paused) return;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// A shader compilation or slow frame must not skip the entire content reveal.\n\t\t\t\t\t\t// The existing wall-clock timeout still bounds prolonged or hidden-page work.\n\t\t\t\t\t\tconst nextElapsed = elapsed + Math.min(Math.max(now - previous, 0), 50);\n\t\t\t\t\t\t// Submit one complete destination-pose frame before background/High work.\n\t\t\t\t\t\telapsed = elapsed < DURATION ? Math.min(nextElapsed, DURATION) : nextElapsed;\n\t\t\t\t\t\tcapture.elapsed = elapsed;\n\t\t\t\t\t\tprevious = now;\n\t\t\t\t\t\tconst timing = transitionTiming(elapsed, mode, capture.backgroundPrepared);\n\t\t\t\t\t\tconst progress = timing.motion;\n\t\t\t\t\t\tconst enter = timing.enter;\n\t\t\t\t\t\t// Moving actors exclusively own shared surfaces/type until the final pose.\n\t\t\t\t\t\tfor (const actor of capture.actors) {\n\t\t\t\t\t\t\tconst target = actor.to!;\n\t\t\t\t\t\t\tconst scaleX =\n\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t? target.width / actor.from.width\n\t\t\t\t\t\t\t\t\t: actor.fontScale!;\n\t\t\t\t\t\t\tconst scaleY =\n\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t? target.height / actor.from.height\n\t\t\t\t\t\t\t\t\t: actor.fontScale!;\n\t\t\t\t\t\t\tconst x = (target.left - actor.from.left) * progress;\n\t\t\t\t\t\t\tconst y = (target.top - actor.from.top) * progress;\n\t\t\t\t\t\t\tconst currentScaleX = 1 + (scaleX - 1) * progress;\n\t\t\t\t\t\t\tactor.element.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${currentScaleX}, ${1 + (scaleY - 1) * progress})`;\n\t\t\t\t\t\t\tlet projectedCorners: CssProjectionQuad | undefined;\n\t\t\t\t\t\t\tif (actor.corners) {\n\t\t\t\t\t\t\t\tconst ends = [\n\t\t\t\t\t\t\t\t\t{ x: target.left, y: target.top },\n\t\t\t\t\t\t\t\t\t{ x: target.right, y: target.top },\n\t\t\t\t\t\t\t\t\t{ x: target.right, y: target.bottom },\n\t\t\t\t\t\t\t\t\t{ x: target.left, y: target.bottom }\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\tconst corners = actor.corners.map((point, index) => ({\n\t\t\t\t\t\t\t\t\tx: point.x + (ends[index].x - point.x) * progress - actor.from.left,\n\t\t\t\t\t\t\t\t\ty: point.y + (ends[index].y - point.y) * progress - actor.from.top\n\t\t\t\t\t\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\t\t\t\t\t\tprojectedCorners = corners;\n\t\t\t\t\t\t\t\tactor.element.style.transform =\n\t\t\t\t\t\t\t\t\tgetProjectiveCssMatrix3d(\n\t\t\t\t\t\t\t\t\t\tcorners,\n\t\t\t\t\t\t\t\t\t\tactor.layoutWidth ?? actor.from.width,\n\t\t\t\t\t\t\t\t\t\tactor.layoutHeight ?? actor.from.height\n\t\t\t\t\t\t\t\t\t) ?? actor.element.style.transform;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (actor.destinationCopy) {\n\t\t\t\t\t\t\t\tconst typography =\n\t\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t\t? transitionTiming(elapsed, 'synchronous').enter\n\t\t\t\t\t\t\t\t\t\t: Math.min(1, Math.max(0, (progress - 0.25) / 0.55));\n\t\t\t\t\t\t\t\tconst destinationScale =\n\t\t\t\t\t\t\t\t\t1 / actor.fontScale! + (1 - 1 / actor.fontScale!) * progress;\n\t\t\t\t\t\t\t\tconst availableWidth =\n\t\t\t\t\t\t\t\t\tactor.from.width + (target.width - actor.from.width) * progress;\n\t\t\t\t\t\t\t\tconst clippedWidth = Math.max(0, actor.from.width - availableWidth / currentScaleX);\n\t\t\t\t\t\t\t\tactor.element.style.clipPath = actor.corners\n\t\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t\t: `inset(0 ${clippedWidth}px 0 0)`;\n\t\t\t\t\t\t\t\tactor.element.style.opacity = String(1 - typography);\n\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform =\n\t\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t\t? `translate3d(${x}px, ${y}px, 0) scale(${(actor.from.width + (target.width - actor.from.width) * progress) / target.width}, ${(actor.from.height + (target.height - actor.from.height) * progress) / target.height})`\n\t\t\t\t\t\t\t\t\t\t: `translate3d(${x}px, ${y}px, 0) scale(${destinationScale})`;\n\t\t\t\t\t\t\t\tactor.destinationCopy.style.opacity = String(typography);\n\t\t\t\t\t\t\t\tif (projectedCorners && actor.role === 'summary-surface') {\n\t\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform =\n\t\t\t\t\t\t\t\t\t\tgetProjectiveCssMatrix3d(projectedCorners, target.width, target.height) ??\n\t\t\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tactor.element.style.opacity = String(\n\t\t\t\t\t\t\t\t\t(actor.baseOpacity ?? 1) * (actor.sourceOnly ? 1 - progress : 1)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst panel = capture.actors.find((actor) => actor.role === 'summary-surface');\n\t\t\t\t\t\tif (panel?.to)\n\t\t\t\t\t\t\tfor (const copy of capture.panelContent ?? []) {\n\t\t\t\t\t\t\t\tconst width = panel.from.width + (panel.to.width - panel.from.width) * progress;\n\t\t\t\t\t\t\t\tconst height = panel.from.height + (panel.to.height - panel.from.height) * progress;\n\t\t\t\t\t\t\t\tconst sx = width / copy.panel.width,\n\t\t\t\t\t\t\t\t\tsy = height / copy.panel.height;\n\t\t\t\t\t\t\t\tconst x =\n\t\t\t\t\t\t\t\t\tpanel.from.left +\n\t\t\t\t\t\t\t\t\t(panel.to.left - panel.from.left) * progress +\n\t\t\t\t\t\t\t\t\t(copy.rect.left - copy.panel.left) * sx;\n\t\t\t\t\t\t\t\tconst y =\n\t\t\t\t\t\t\t\t\tpanel.from.top +\n\t\t\t\t\t\t\t\t\t(panel.to.top - panel.from.top) * progress +\n\t\t\t\t\t\t\t\t\t(copy.rect.top - copy.panel.top) * sy;\n\t\t\t\t\t\t\t\tcopy.element.style.left = '0';\n\t\t\t\t\t\t\t\tcopy.element.style.top = '0';\n\t\t\t\t\t\t\t\tcopy.element.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${sx}, ${sy})`;\n\t\t\t\t\t\t\t\tif (copy.incoming) copy.element.style.opacity = String(enter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.setPresentation({\n\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\texitOpacity: timing.exit,\n\t\t\t\t\t\t\tenterOpacity: enter,\n\t\t\t\t\t\t\tsharedOpacity: 0,\n\t\t\t\t\t\t\tbackgroundOpacity: timing.background,\n\t\t\t\t\t\t\tgeometryOpacity: timing.geometry\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.hooks.setGeometryProgress(progress);\n\t\t\t\t\t\tthis.hooks.flushFrame();\n\t\t\t\t\t\tif (timing.complete || matchMedia('(prefers-reduced-motion: reduce)').matches)\n\t\t\t\t\t\t\tthis.settle(capture.token);\n\t\t\t\t\t\telse capture.frame = requestAnimationFrame(frame);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tcapture.frame = requestAnimationFrame(frame);\n\t\t\t});\n\t\t} catch {\n\t\t\tthis.cancel();\n\t\t}\n\t}\n\n\tcancel() {\n\t\tthis.sequence.cancel();\n\t\tthis.captureState?.owner?.release();\n\t}\n\n\tdispose() {\n\t\tthis.cancel();\n\t}\n\n\tprivate settle(token: number) {\n\t\tif (this.sequence.finish(token)) this.captureState?.owner?.release();\n\t}\n\n\tprivate cleanup() {\n\t\tconst capture = this.captureState;\n\t\tthis.captureState = undefined;\n\t\tdelete this.root.dataset.catalogTransition;\n\t\tdelete this.root.dataset.catalogRecipe;\n\t\tdelete this.root.dataset.catalogOwnershipRevision;\n\t\tdelete this.root.dataset.catalogDirection;\n\t\twindow.removeEventListener('resize', this.interrupt);\n\t\twindow.removeEventListener('wheel', this.interrupt, true);\n\t\twindow.removeEventListener('touchmove', this.interrupt, true);\n\t\twindow.removeEventListener('keydown', this.keydown);\n\t\tif (!capture) return;\n\t\tcapture.observer?.disconnect();\n\t\tcapture.layoutObserver?.disconnect();\n\t\tcancelAnimationFrame(capture.frame);\n\t\tclearTimeout(capture.timeout);\n\t\tcapture.host.remove();\n\t\tfor (const copy of capture.exiting) copy.remove();\n\t\tfor (const restore of capture.restore.reverse()) restore();\n\t\tfor (const [element, inert] of capture.inert) {\n\t\t\t// Docking can change during route scroll restoration after this lock was acquired.\n\t\t\t// Preserve the controller's current semantic state instead of reviving a stale lock snapshot.\n\t\t\tconst dock = element.matches('[data-spatial-element-sticky-header], [data-spatial-element-sticky-tabs]');\n\t\t\telement.inert = dock ? element.getAttribute('aria-hidden') === 'true' : inert;\n\t\t}\n\t\tif (\n\t\t\tcapture.focus?.isConnected &&\n\t\t\t(document.activeElement === document.body ||\n\t\t\t\tcapture.content?.contains(document.activeElement))\n\t\t)\n\t\t\tcapture.focus.focus({ preventScroll: true });\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tthis.setPresentation({ active: false, enterOpacity: 1, exitOpacity: 1, sharedOpacity: 1 });\n\t\t\t} finally {\n\t\t\t\tthis.hooks.finishGeometry();\n\t\t\t\tthis.hooks.flushFrame();\n\t\t\t}\n\t\t} catch {\n\t\t\t// A renderer failure cannot prevent DOM restoration or completion of navigation.\n\t\t} finally {\n\t\t\tcapture.resolve?.();\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"CatalogTransition.js","sourceRoot":"","sources":["../../src/catalog/CatalogTransition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAGhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,qBAAqB,EACrB,uBAAuB,EAIvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;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AAC,CAAC;QAC9C,IAAI,CAAC;YACJ,IAAI,CAAC;gBACJ,IAAI,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;oBAAS,CAAC;gBACV,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;gBAC5B,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;YACzB,CAAC;QACF,CAAC;QAAC,MAAM,CAAC;YACR,iFAAiF;QAClF,CAAC;gBAAS,CAAC;YACV,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;QACrB,CAAC;IACF,CAAC;CACD","sourcesContent":["import { setInertLease } from '../stage/inertLease.js';\nimport {\n\tgeometryEndpoint,\n\ttype CatalogGeometryEndpoint,\n\ttype CatalogGeometryDestination\n} from './catalogGeometryRequest.js';\nimport {\n\tresolveCatalogJourney,\n\tplanCatalogParticipants,\n\ttype CatalogParticipantEndpoint,\n\ttype CatalogParticipantPair,\n\ttype CatalogViewContext\n} from './catalogJourney.js';\nimport { readCatalogViewContext } from './catalogViewLink.js';\nimport { catalogTransitionViewportChanged, readCatalogTransitionViewport, type CatalogTransitionViewport } from './catalogTransitionViewport.js';\nimport { captureCarouselElement } from './carouselPanelProjection.js';\nimport { captureCardElement } from './cardProjection.js';\nimport type { CatalogTransitionPresentation } from './catalogPresentation.js';\nimport { PresentationLease } from './PresentationLease.js';\nimport { rebasePresentation } from './rebasePresentation.js';\nimport { getProjectiveCssMatrix3d, type CssProjectionQuad } from '../stage/cssProjection.js';\nimport type { CatalogSurfaceCapture } from './catalogSurfaceCapture.js';\nimport {\n\tcatalogSharedKey,\n\ttype CatalogIdentity,\n\ttype CatalogSharedRole,\n\ttype CatalogEndpointRegistry\n} from './CatalogEndpointRegistry.js';\nimport { resolveCatalogIntent, selectCatalogRecipe, type CatalogRecipe } from './catalogRecipes.js';\nimport { snapshotCatalogDom } from './catalogDomSnapshot.js';\nexport { catalogSharedKey } from './CatalogEndpointRegistry.js';\nexport type { CatalogSharedRole } from './CatalogEndpointRegistry.js';\nimport {\n\tMOTION_DURATION as DURATION,\n\ttransitionTiming,\n\ttype TransitionMode\n} from './transitionTiming.js';\n\nexport type CatalogTransitionIdentity = CatalogIdentity;\n\nfunction isReturnRecipe(recipe: CatalogRecipe) {\n\treturn recipe.source.startsWith('detail.');\n}\nfunction isRichRole(role: CatalogSharedRole) {\n\treturn role === 'leading' || role === 'features' || role === 'action-details' || role === 'primary-action';\n}\n\n/** Full summaries retain authored row/icon layout; temporary controls never become interactive. */\nfunction copyRichContent(target: HTMLElement, source: HTMLElement) {\n\tconst { copy, elements } = snapshotCatalogDom(source);\n\tfor (const { copy: element } of elements) {\n\t\telement.style.visibility = 'visible';\n\t\telement.removeAttribute('id');\n\t\tfor (const attribute of [...element.attributes])\n\t\t\tif (attribute.name.startsWith('data-')) element.removeAttribute(attribute.name);\n\t}\n\tObject.assign(copy.style, {\n\t\tposition: 'relative',\n\t\tleft: '0',\n\t\ttop: '0',\n\t\twidth: '100%',\n\t\theight: '100%',\n\t\tmargin: '0',\n\t\ttransform: 'none',\n\t\tpointerEvents: 'none'\n\t});\n\tcopy.inert = true;\n\tcopy.setAttribute('aria-hidden', 'true');\n\ttarget.append(copy);\n}\n\n/** A stale animation completion cannot settle a newer navigation. */\nexport class CatalogTransitionSequence {\n\tprivate generation = 0;\n\tprivate current?: { token: number; phase: 'captured' | 'animating' };\n\n\tget active() {\n\t\treturn this.current !== undefined;\n\t}\n\n\tget phase() {\n\t\treturn this.current?.phase ?? 'idle';\n\t}\n\n\tbegin() {\n\t\tconst token = ++this.generation;\n\t\tthis.current = { token, phase: 'captured' };\n\t\treturn token;\n\t}\n\n\tstart(token: number) {\n\t\tif (!this.current || this.current.token !== token || this.current.phase !== 'captured') {\n\t\t\treturn false;\n\t\t}\n\t\tthis.current.phase = 'animating';\n\t\treturn true;\n\t}\n\n\tisCurrent(token: number) {\n\t\treturn this.current?.token === token;\n\t}\n\n\tfinish(token: number) {\n\t\tif (!this.isCurrent(token)) return false;\n\t\tthis.current = undefined;\n\t\treturn true;\n\t}\n\n\tcancel() {\n\t\tthis.generation += 1;\n\t\tthis.current = undefined;\n\t}\n}\n\ninterface CatalogTransitionHooks {\n\t/** Optional test/debug sink; no DOM or timing work on the production path. */\n\tdiagnose?(reason: string): void;\n\tcaptureContentGeometry?(\n\t\tendpoint: CatalogParticipantEndpoint,\n\t\tsecondary: CatalogParticipantEndpoint[]\n\t): boolean;\n\tprepareContentParticipants?(\n\t\tpairs: CatalogParticipantPair[]\n\t): CatalogParticipantPair[] | undefined;\n\tadoptContentParticipants?(pairs: CatalogParticipantPair[]): void;\n\tpromoteContentParticipant?(source: CatalogParticipantEndpoint): boolean;\n\tbackgroundPrepared?(): boolean;\n\tcaptureElement?(\n\t\telement: HTMLElement\n\t): { width: number; height: number; corners: CssProjectionQuad } | undefined;\n\tadoptGeometry?(destination: CatalogGeometryDestination): boolean;\n\tgeometryPoint?(): { x: number; y: number } | null;\n\tbeginMotion?(): TransitionMode;\n\tcaptureGeometry(source: CatalogGeometryEndpoint): boolean;\n\tprepareDestination?(destination: CatalogGeometryDestination): boolean;\n\tsetGeometryProgress(progress: number): void;\n\tflushFrame(): void;\n\tfinishGeometry(): void;\n\tresolveSurface(element: HTMLElement): HTMLElement;\n\tcaptureSurface?(element: HTMLElement): CatalogSurfaceCapture;\n\tsetPresentation(presentation: CatalogTransitionPresentation): void;\n}\n\ninterface TransitionActor {\n\tsemantic?: string;\n\tlayoutWidth?: number;\n\tlayoutHeight?: number;\n\tcorners?: CssProjectionQuad;\n\tsourceOnly?: boolean;\n\tbaseOpacity?: number;\n\trebased?: boolean;\n\trole: CatalogSharedRole;\n\telement: HTMLDivElement;\n\tfrom: DOMRect;\n\tfontSize: number;\n\tto?: DOMRect;\n\tfontScale?: number;\n\tdestinationCopy?: HTMLDivElement;\n}\n\ninterface TransitionCapture {\n\tview?: {\n\t\tsource: CatalogParticipantEndpoint;\n\t\tsources: CatalogParticipantEndpoint[];\n\t\tpairs?: CatalogParticipantPair[];\n\t\talternates?: Map<string, TransitionActor[]>;\n\t\tcontext: CatalogViewContext;\n\t};\n\tpanelContent?: { element: HTMLElement; rect: DOMRect; panel: DOMRect; incoming: boolean }[];\n\tbackgroundPrepared?: boolean;\n\tretarget?: boolean;\n\tshellCopies?: Map<HTMLElement, HTMLElement>;\n\tsuspendedPose?: { surface: DOMRect; geometry: { x: number; y: number } | null };\n\tlease?: PresentationLease<TransitionCapture>;\n\towner?: ReturnType<PresentationLease<TransitionCapture>['claim']>;\n\tpaused?: boolean;\n\telapsed: number;\n\tmode?: TransitionMode;\n\ttoken: number;\n\tidentity: CatalogTransitionIdentity;\n\trecipe: CatalogRecipe;\n\thost: HTMLDivElement;\n\tactors: TransitionActor[];\n\texiting: HTMLElement[];\n\trestore: (() => void)[];\n\tframe: number;\n\ttimeout: ReturnType<typeof setTimeout>;\n\tresolve?: () => void;\n\tobserver?: MutationObserver;\n\tlayoutObserver?: ResizeObserver;\n\tinert: Set<HTMLElement>;\n\tcontent?: HTMLElement;\n\tfocus?: HTMLElement;\n}\n\nfunction hasSize(rect: DOMRect) {\n\treturn rect.width > 0 && rect.height > 0;\n}\n\nfunction intersectsViewport(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\treturn (\n\t\thasSize(rect) &&\n\t\trect.right > 0 &&\n\t\trect.bottom > 0 &&\n\t\trect.left < innerWidth &&\n\t\trect.top < innerHeight\n\t);\n}\n\n/** A partial endpoint needs an explicit clip representation; otherwise use semantic navigation. */\nfunction fullyPresented(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\tif (\n\t\t!hasSize(rect) ||\n\t\trect.left < 0 ||\n\t\trect.top < 0 ||\n\t\trect.right > innerWidth ||\n\t\trect.bottom > innerHeight\n\t)\n\t\treturn false;\n\tfor (let ancestor = element.parentElement; ancestor; ancestor = ancestor.parentElement) {\n\t\tconst style = getComputedStyle(ancestor);\n\t\tconst clip = ancestor.getBoundingClientRect();\n\t\tif (\n\t\t\t/(hidden|clip|scroll|auto)/.test(style.overflowX) &&\n\t\t\t(rect.left < clip.left - 1 || rect.right > clip.right + 1)\n\t\t)\n\t\t\treturn false;\n\t\tif (\n\t\t\t/(hidden|clip|scroll|auto)/.test(style.overflowY) &&\n\t\t\t(rect.top < clip.top - 1 || rect.bottom > clip.bottom + 1)\n\t\t)\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction visiblyPresented(element: HTMLElement) {\n\tconst rect = element.getBoundingClientRect();\n\tif (!hasSize(rect) || rect.bottom <= 0 || rect.top >= innerHeight) return false;\n\tfor (let node: HTMLElement | null = element; node; node = node.parentElement) {\n\t\tconst style = getComputedStyle(node);\n\t\tif (style.visibility === 'hidden' || style.display === 'none' || Number(style.opacity) < 0.01)\n\t\t\treturn false;\n\t}\n\treturn true;\n}\n\nfunction copyTypography(element: HTMLElement, style: CSSStyleDeclaration) {\n\tfor (const property of [\n\t\t'font-family',\n\t\t'font-size',\n\t\t'font-weight',\n\t\t'font-style',\n\t\t'line-height',\n\t\t'letter-spacing',\n\t\t'text-transform',\n\t\t'text-align',\n\t\t'white-space',\n\t\t'overflow',\n\t\t'text-overflow',\n\t\t'overflow-wrap',\n\t\t'word-break',\n\t\t'display',\n\t\t'-webkit-box-orient',\n\t\t'-webkit-line-clamp',\n\t\t'line-clamp',\n\t\t'color',\n\t\t'text-shadow'\n\t])\n\t\telement.style.setProperty(property, style.getPropertyValue(property));\n}\n\nfunction preserveStyle(element: HTMLElement, property: string, restore: (() => void)[]) {\n\tconst value = element.style.getPropertyValue(property);\n\tconst priority = element.style.getPropertyPriority(property);\n\tconst reset = () => {\n\t\tif (value) element.style.setProperty(property, value, priority);\n\t\telse element.style.removeProperty(property);\n\t};\n\trestore.push(reset);\n\treturn reset;\n}\n\n/** Owns decorative DOM only. Semantic pages and element geometry keep their respective owners. */\nexport class CatalogTransition {\n\tprivate readonly sequence = new CatalogTransitionSequence();\n\tprivate captureState?: TransitionCapture;\n\tprivate readonly interrupt = () => this.cancel();\n\tprivate capturedViewport?: CatalogTransitionViewport;\n\tprivate readonly resize = () => {\n\t\t// Android's address bar changes innerHeight without changing the svh\n\t\t// layout endpoints. Only a real layout/render-scale change cancels motion.\n\t\tif (this.capturedViewport && catalogTransitionViewportChanged(this.capturedViewport, readCatalogTransitionViewport())) {\n\t\t\tthis.hooks.diagnose?.('viewport-resize');\n\t\t\tthis.cancel();\n\t\t}\n\t};\n\tprivate readonly keydown = (event: KeyboardEvent) => {\n\t\tif (event.key === 'Escape') this.cancel();\n\t};\n\n\tconstructor(\n\t\tprivate readonly root: HTMLElement,\n\t\tprivate readonly endpoints: CatalogEndpointRegistry,\n\t\tprivate readonly hooks: CatalogTransitionHooks\n\t) {}\n\n\tget active() {\n\t\treturn this.sequence.active;\n\t}\n\n\t/** Pause at the last submitted DOM/GPU frame while a compatible navigation resolves. */\n\tsupersede(destination: URL) {\n\t\tconst capture = this.captureState;\n\t\tconst target = this.endpoints.navigation?.get(destination);\n\t\tconst compatible = capture && destination.origin === location.origin && target &&\n\t\t\ttarget.kind !== 'ordinary' && target.brandId === capture.identity.brandId &&\n\t\t\t(target.kind === 'detail' ? target.spatialElementId === capture.identity.spatialElementId : target.elements.includes(capture.identity.spatialElementId));\n\t\tif (!capture || !compatible) {\n\t\t\tthis.cancel();\n\t\t\treturn;\n\t\t}\n\t\tcancelAnimationFrame(capture.frame);\n\t\t// The old destination can unmount while the successor binds asynchronously.\n\t\t// Its observer must not cancel the new owner when those old bounds disappear.\n\t\tcapture.layoutObserver?.disconnect();\n\t\tcapture.layoutObserver = undefined;\n\t\tcapture.suspendedPose = {\n\t\t\tsurface: capture.actors[0]?.element.getBoundingClientRect() ?? new DOMRect(),\n\t\t\tgeometry: this.hooks.geometryPoint?.() ?? null\n\t\t};\n\t\tcapture.paused = true;\n\t\tcapture.resolve?.();\n\t\tcapture.resolve = undefined;\n\t\tconst reverse = target?.kind === 'content';\n\t\tif (\n\t\t\tcapture.view ||\n\t\t\tcapture.retarget ||\n\t\t\treverse !== isReturnRecipe(capture.recipe) ||\n\t\t\tdestination.hash\n\t\t) {\n\t\t\tif (\n\t\t\t\t!this.hooks.adoptGeometry?.({\n\t\t\t\t\tspatialElementId: capture.identity.spatialElementId,\n\t\t\t\t\tkind: reverse ? 'content' : destination.hash ? 'dock' : 'hero'\n\t\t\t\t})\n\t\t\t) {\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcapture.retarget = true;\n\t\t\tconst panelRect = capture.actors\n\t\t\t\t.find((actor) => actor.role === 'summary-surface')\n\t\t\t\t?.element.getBoundingClientRect();\n\t\t\tif (panelRect)\n\t\t\t\tfor (const copy of capture.panelContent ?? []) {\n\t\t\t\t\tconst rect = copy.element.getBoundingClientRect();\n\t\t\t\t\tconst wrapper = rebasePresentation([copy.element], rect, 'summary-surface');\n\t\t\t\t\tdelete wrapper.dataset.catalogActorRole;\n\t\t\t\t\twrapper.dataset.catalogPanelContent = '';\n\t\t\t\t\tcapture.host.appendChild(wrapper);\n\t\t\t\t\tconst index = capture.exiting.indexOf(copy.element);\n\t\t\t\t\tif (index >= 0) capture.exiting[index] = wrapper;\n\t\t\t\t\telse capture.exiting.push(wrapper);\n\t\t\t\t\tcopy.element = wrapper;\n\t\t\t\t\tcopy.rect = rect;\n\t\t\t\t\tcopy.panel = panelRect;\n\t\t\t\t\tcopy.incoming = false;\n\t\t\t\t}\n\t\t\tconst extra: TransitionActor[] = [];\n\t\t\tconst opacity = Number(this.root.style.getPropertyValue('--catalog-shared-opacity')) || 0;\n\t\t\tfor (const actor of capture.actors) {\n\t\t\t\tconst rect = actor.element.getBoundingClientRect();\n\t\t\t\tif (!actor.sourceOnly && opacity > 0) {\n\t\t\t\t\tconst real = this.endpoints.resolve({\n\t\t\t\t\t\t...capture.identity,\n\t\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\t\trole: actor.role\n\t\t\t\t\t});\n\t\t\t\t\tif (real) {\n\t\t\t\t\t\tconst bounds = (\n\t\t\t\t\t\t\tactor.role === 'summary-surface' ? this.hooks.resolveSurface(real) : real\n\t\t\t\t\t\t).getBoundingClientRect();\n\t\t\t\t\t\tconst copy = document.createElement('div');\n\t\t\t\t\t\tcopy.style.cssText = actor.element.style.cssText;\n\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\tleft: `${bounds.left}px`,\n\t\t\t\t\t\t\ttop: `${bounds.top}px`,\n\t\t\t\t\t\t\twidth: `${bounds.width}px`,\n\t\t\t\t\t\t\theight: `${bounds.height}px`,\n\t\t\t\t\t\t\ttransform: 'none',\n\t\t\t\t\t\t\tclipPath: 'none',\n\t\t\t\t\t\t\topacity: String(opacity)\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\t\tcopy.textContent = real.textContent;\n\t\t\t\t\t\t\tcopyTypography(copy, getComputedStyle(real));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcapture.host.appendChild(copy);\n\t\t\t\t\t\textra.push({\n\t\t\t\t\t\t\trole: actor.role,\n\t\t\t\t\t\t\telement: copy,\n\t\t\t\t\t\t\tfrom: bounds,\n\t\t\t\t\t\t\tfontSize: Number.parseFloat(getComputedStyle(real).fontSize),\n\t\t\t\t\t\t\tsourceOnly: true,\n\t\t\t\t\t\t\tbaseOpacity: opacity\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\t\tpreserveStyle(real, 'visibility', capture.restore);\n\t\t\t\t\t\t\treal.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst layers = [actor.element, ...(actor.destinationCopy ? [actor.destinationCopy] : [])];\n\t\t\t\tconst wrapper = rebasePresentation(layers, rect, actor.role);\n\t\t\t\tcapture.host.appendChild(wrapper);\n\t\t\t\tactor.fontSize *= rect.width / actor.from.width;\n\t\t\t\tactor.element = wrapper;\n\t\t\t\tactor.corners = undefined;\n\t\t\t\tactor.from = rect;\n\t\t\t\tactor.to = undefined;\n\t\t\t\tactor.destinationCopy = undefined;\n\t\t\t\tactor.rebased = true;\n\t\t\t\tactor.baseOpacity = 1;\n\t\t\t}\n\t\t\tcapture.actors.push(...extra);\n\t\t\t// Retain visible secondary content before hiding its shared parent or awaiting route data.\n\t\t\tconst previousRecipe = capture.recipe;\n\t\t\tcapture.recipe = {\n\t\t\t\t...previousRecipe,\n\t\t\t\tsource: this.root.querySelector('[data-catalog-list]') ? 'catalog.card' : 'detail.summary'\n\t\t\t};\n\t\t\tthis.captureExitingContent(capture);\n\t\t\tcapture.recipe = previousRecipe;\n\t\t\tconst surface = this.endpoints.resolve({\n\t\t\t\t...capture.identity,\n\t\t\t\tslot: previousRecipe.targetShared,\n\t\t\t\trole: 'summary-surface'\n\t\t\t});\n\t\t\tif (surface) {\n\t\t\t\tpreserveStyle(surface, 'visibility', capture.restore);\n\t\t\t\tsurface.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t}\n\t\t\tfor (const copy of capture.exiting)\n\t\t\t\tcopy.dataset.catalogBaseOpacity = copy.style.opacity || '1';\n\t\t}\n\t}\n\n\tgetOwnership() {\n\t\tconst capture = this.captureState;\n\t\treturn capture\n\t\t\t? {\n\t\t\t\t\trevision: capture.lease?.revision,\n\t\t\t\t\telapsed: capture.elapsed,\n\t\t\t\t\tidentity: capture.identity,\n\t\t\t\t\tsource: capture.recipe.source,\n\t\t\t\t\ttarget: capture.recipe.targetShared,\n\t\t\t\t\tsuspendedPose: capture.suspendedPose\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tsurface: capture.suspendedPose.surface.toJSON(),\n\t\t\t\t\t\t\t\tgeometry: capture.suspendedPose.geometry\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t: null;\n\t}\n\n\tprivate matchesDestination(capture: TransitionCapture, destination: URL) {\n\t\tconst target = this.endpoints.navigation?.get(destination);\n\t\treturn destination.origin === location.origin && !destination.hash && target?.kind === 'detail' &&\n\t\t\ttarget.brandId === capture.identity.brandId && target.spatialElementId === capture.identity.spatialElementId;\n\t}\n\n\tprivate createActor(\n\t\tidentity: CatalogIdentity,\n\t\tsource: HTMLElement,\n\t\trole: CatalogSharedRole,\n\t\treverse: boolean\n\t): TransitionActor {\n\t\tconst paint =\n\t\t\trole === 'summary-surface' && reverse ? this.hooks.captureSurface?.(source) : undefined;\n\t\tconst projection =\n\t\t\tcaptureCarouselElement(source) ??\n\t\t\tcaptureCardElement(source) ??\n\t\t\t(role !== 'summary-surface' && reverse ? this.hooks.captureElement?.(source) : undefined);\n\t\tconst bounds =\n\t\t\tpaint?.bounds ?? (role === 'summary-surface' ? this.hooks.resolveSurface(source) : source);\n\t\tconst from = bounds.getBoundingClientRect();\n\t\tconst carouselSurface = role === 'summary-surface' && source.closest('[data-carousel-spatial-element]')\n\t\t\t? source.querySelector<HTMLElement>('.spatial-summary-surface') : undefined;\n\t\tconst style = getComputedStyle(\n\t\t\tcarouselSurface ?? (role === 'summary-surface' && reverse ? bounds : source),\n\t\t\t!carouselSurface && role === 'summary-surface' && source.closest('[data-carousel-spatial-element]') ? '::before' : null\n\t\t);\n\t\tconst element = document.createElement('div');\n\t\telement.dataset.catalogSharedKey = catalogSharedKey(identity, role);\n\t\telement.dataset.catalogActorRole = role;\n\t\tObject.assign(element.style, {\n\t\t\tposition: 'fixed',\n\t\t\tleft: `${from.left}px`,\n\t\t\ttop: `${from.top}px`,\n\t\t\twidth: `${from.width}px`,\n\t\t\theight: `${from.height}px`,\n\t\t\tmargin: '0',\n\t\t\tboxSizing: 'border-box',\n\t\t\tpointerEvents: 'none',\n\t\t\ttransformOrigin: 'top left',\n\t\t\tzIndex: role === 'summary-surface' ? '20' : '22',\n\t\t\twillChange: 'transform, opacity'\n\t\t});\n\t\tif (role === 'summary-surface') {\n\t\t\tObject.assign(element.style, {\n\t\t\t\tbackground: paint?.background ?? style.backgroundColor,\n\t\t\t\tborder: paint?.border ?? style.border,\n\t\t\t\tborderRadius: paint?.borderRadius ?? style.borderRadius,\n\t\t\t\tboxShadow: paint?.boxShadow ?? style.boxShadow\n\t\t\t});\n\t\t} else {\n\t\t\tif (isRichRole(role)) copyRichContent(element, source);\n\t\t\telse element.textContent = source.textContent;\n\t\t\tcopyTypography(element, style);\n\t\t\tObject.assign(element.style, {\n\t\t\t\tfontFamily: style.fontFamily,\n\t\t\t\tfontSize: style.fontSize,\n\t\t\t\tfontWeight: style.fontWeight,\n\t\t\t\tfontStyle: style.fontStyle,\n\t\t\t\tlineHeight: style.lineHeight,\n\t\t\t\tletterSpacing: style.letterSpacing,\n\t\t\t\ttextTransform: style.textTransform,\n\t\t\t\ttextAlign: style.textAlign,\n\t\t\t\tcolor: style.color\n\t\t\t});\n\t\t}\n\t\tconst actor: TransitionActor = {\n\t\t\tsemantic: source.dataset.catalogSemantic,\n\t\t\trole,\n\t\t\telement,\n\t\t\tfrom,\n\t\t\tfontSize: Number.parseFloat(style.fontSize),\n\t\t\tcorners: projection?.corners ?? paint?.corners,\n\t\t\tlayoutWidth: projection?.width,\n\t\t\tlayoutHeight: projection?.height\n\t\t};\n\t\tconst corners = projection?.corners ?? paint?.corners;\n\t\tif (corners) {\n\t\t\tconst local = corners.map((point) => ({\n\t\t\t\tx: point.x - from.left,\n\t\t\t\ty: point.y - from.top\n\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\tconst width = projection?.width ?? from.width;\n\t\t\tconst height = projection?.height ?? from.height;\n\t\t\telement.style.width = `${width}px`;\n\t\t\telement.style.height = `${height}px`;\n\t\t\telement.style.transform = getProjectiveCssMatrix3d(local, width, height) ?? '';\n\t\t}\n\t\treturn actor;\n\t}\n\n\tprivate contentEndpoints(brandId: string, requireSubmitted = true): CatalogParticipantEndpoint[] {\n\t\treturn this.endpoints\n\t\t\t.getContentEndpoints()\n\t\t\t.filter((entry) => entry.address.brandId === brandId)\n\t\t\t.map(({ address, element }) => {\n\t\t\t\tlet sectionId: string | undefined;\n\t\t\t\ttry {\n\t\t\t\t\tsectionId = JSON.parse(address.occurrence ?? '[]')[0];\n\t\t\t\t} catch {\n\t\t\t\t\t/* Legacy occurrence. */\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...address,\n\t\t\t\t\trole: 'geometry',\n\t\t\t\t\tsectionId,\n\t\t\t\t\torder: Number(element.dataset.catalogOrder ?? 0),\n\t\t\t\t\teligible:\n\t\t\t\t\t\taddress.slot === 'catalog.card' ? fullyPresented(element) : intersectsViewport(element),\n\t\t\t\t\tprepared: !requireSubmitted || element.hasAttribute('data-catalog-model-ready'),\n\t\t\t\t\tselected: address.slot === 'carousel.front',\n\t\t\t\t\tfocused: element.contains(document.activeElement)\n\t\t\t\t};\n\t\t\t});\n\t}\n\tcapture(fromURL: URL, toURL: URL, type: string) {\n\t\tthis.hooks.diagnose?.('capturing');\n\t\tconst retained = this.captureState;\n\n\t\tif (retained?.paused && retained.retarget) {\n\t\t\tconst journey = resolveCatalogJourney(fromURL, toURL, type, this.endpoints.navigation);\n\t\t\tif (journey?.kind === 'content-view') {\n\t\t\t\tconst context = type === 'popstate' ? {} : readCatalogViewContext(toURL);\n\t\t\t\tconst previousPairs = retained.view?.pairs ?? [];\n\t\t\t\tconst candidates = previousPairs.length\n\t\t\t\t\t? previousPairs.map((pair) => pair.target)\n\t\t\t\t\t: this.contentEndpoints(journey.brandId, false);\n\t\t\t\tconst source = candidates.find(\n\t\t\t\t\t(p) =>\n\t\t\t\t\t\tp.spatialElementId === retained.identity.spatialElementId && p.slot === retained.recipe.targetShared\n\t\t\t\t);\n\t\t\t\tif (source && (!context.spatialElementId || context.spatialElementId === retained.identity.spatialElementId)) {\n\t\t\t\t\tthis.hooks.adoptContentParticipants?.(previousPairs);\n\t\t\t\t\tretained.view = {\n\t\t\t\t\t\tsource,\n\t\t\t\t\t\tsources: candidates.filter((p) => p.sectionId === source.sectionId),\n\t\t\t\t\t\tcontext: {\n\t\t\t\t\t\t\t...context,\n\t\t\t\t\t\t\tspatialElementId: retained.identity.spatialElementId,\n\t\t\t\t\t\t\ttargetSection: journey.section ?? context.targetSection\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tretained.recipe = {\n\t\t\t\t\t\t...retained.recipe,\n\t\t\t\t\t\tsource: source.slot,\n\t\t\t\t\t\tid: source.slot === 'catalog.card' ? 'list-to-carousel' : 'carousel-to-list'\n\t\t\t\t\t};\n\t\t\t\t\tretained.owner = retained.lease!.claim();\n\t\t\t\t\tretained.token = this.sequence.begin();\n\t\t\t\t\tretained.elapsed = 0;\n\t\t\t\t\tretained.mode = undefined;\n\t\t\t\t\tretained.backgroundPrepared = undefined;\n\t\t\t\t\tretained.paused = false;\n\t\t\t\t\tretained.retarget = false;\n\t\t\t\t\tthis.captureExitingContent(retained);\n\t\t\t\t\tthis.root.dataset.catalogDirection = 'return';\n\t\t\t\t\tthis.root.dataset.catalogRecipe = retained.recipe.id;\n\t\t\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst intent = resolveCatalogIntent(fromURL, toURL, type, this.endpoints.navigation);\n\t\t\tconst reverse = intent?.direction === 'detail-to-list';\n\t\t\tconst content =\n\t\t\t\tretained.recipe.source.startsWith('carousel.') ||\n\t\t\t\tretained.recipe.targetShared.startsWith('carousel.')\n\t\t\t\t\t? 'carousel'\n\t\t\t\t\t: 'list';\n\t\t\tconst recipe = selectCatalogRecipe(\n\t\t\t\tintent,\n\t\t\t\treverse ? (retained.recipe.targetShared === 'detail.dock' ? 'dock' : 'hero') : content,\n\t\t\t\treverse ? content : 'hero'\n\t\t\t);\n\t\t\tif (recipe) {\n\t\t\t\tretained.view = undefined;\n\t\t\t\tthis.hooks.adoptContentParticipants?.([]);\n\t\t\t\tretained.owner = retained.lease!.claim();\n\t\t\t\tretained.token = this.sequence.begin();\n\t\t\t\tretained.recipe = recipe;\n\t\t\t\tretained.elapsed = 0;\n\t\t\t\tretained.mode = undefined;\n\t\t\t\tretained.backgroundPrepared = undefined;\n\t\t\t\tretained.paused = false;\n\t\t\t\tretained.retarget = false;\n\t\t\t\tthis.captureExitingContent(retained);\n\t\t\t\tthis.root.dataset.catalogDirection = reverse ? 'return' : 'forward';\n\t\t\t\tthis.root.dataset.catalogRecipe = recipe.id;\n\t\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tretained?.paused &&\n\t\t\tretained.mode &&\n\t\t\ttype !== 'popstate' &&\n\t\t\tthis.matchesDestination(retained, toURL)\n\t\t) {\n\t\t\tretained.token = this.sequence.begin();\n\t\t\tretained.owner = retained.lease!.claim();\n\t\t\tthis.root.dataset.catalogOwnershipRevision = String(retained.lease!.revision);\n\t\t\treturn true;\n\t\t}\n\t\tthis.cancel();\n\t\tconst journey = resolveCatalogJourney(fromURL, toURL, type, this.endpoints.navigation);\n\t\tconst context = type === 'popstate' ? {} : readCatalogViewContext(toURL);\n\t\tconst inventory =\n\t\t\tjourney?.kind === 'content-view' ? this.contentEndpoints(journey.brandId) : [];\n\t\tconst sourcePairs = planCatalogParticipants(\n\t\t\tinventory,\n\t\t\tinventory,\n\t\t\t{\n\t\t\t\tspatialElementId: context.spatialElementId,\n\t\t\t\tsourceSection: context.sourceSection,\n\t\t\t\tsourceOccurrence: context.sourceOccurrence\n\t\t\t},\n\t\t\t5\n\t\t);\n\t\tconst primary = sourcePairs[0];\n\t\tconst view =\n\t\t\tjourney?.kind === 'content-view' && primary\n\t\t\t\t? {\n\t\t\t\t\t\tsource: primary.source,\n\t\t\t\t\t\tsources: sourcePairs.map((pair) => pair.source),\n\t\t\t\t\t\tcontext: { ...context, targetSection: journey.section ?? context.targetSection }\n\t\t\t\t\t}\n\t\t\t\t: undefined;\n\t\tif (journey?.kind === 'content-view' && !view) return;\n\t\tif (view)\n\t\t\tthis.endpoints.prefer(\n\t\t\t\tview.source.brandId,\n\t\t\t\tview.source.spatialElementId,\n\t\t\t\tview.source.occurrence!,\n\t\t\t\tview.source.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t);\n\t\tconst intent = view\n\t\t\t? {\n\t\t\t\t\tidentity: primary!.identity,\n\t\t\t\t\tdirection: 'list-to-detail' as const,\n\t\t\t\t\thistory: type === 'popstate',\n\t\t\t\t\ttarget: 'hero' as const\n\t\t\t\t}\n\t\t\t: resolveCatalogIntent(fromURL, toURL, type, this.endpoints.navigation);\n\t\tconst reverse = intent?.direction === 'detail-to-list';\n\t\tconst contentSlot = intent\n\t\t\t? reverse\n\t\t\t\t? this.endpoints.getPreferredContentSlot(intent.identity)\n\t\t\t\t: this.endpoints.getContentSlot(intent.identity)\n\t\t\t: undefined;\n\t\tconst composition =\n\t\t\treverse && intent\n\t\t\t\t? this.endpoints.getComposition(intent.identity)\n\t\t\t\t: contentSlot?.startsWith('carousel.')\n\t\t\t\t\t? 'carousel'\n\t\t\t\t\t: contentSlot === 'catalog.card'\n\t\t\t\t\t\t? 'list'\n\t\t\t\t\t\t: 'unavailable';\n\t\tconst recipe: CatalogRecipe | undefined = view\n\t\t\t? {\n\t\t\t\t\tid: view.source.slot === 'catalog.card' ? 'list-to-carousel' : 'carousel-to-list',\n\t\t\t\t\tidentity: primary!.identity,\n\t\t\t\t\tsource: view.source.slot,\n\t\t\t\t\ttargetGeometry: view.source.slot === 'catalog.card' ? 'carousel.front' : 'catalog.card',\n\t\t\t\t\ttargetShared: view.source.slot === 'catalog.card' ? 'carousel.front' : 'catalog.card',\n\t\t\t\t\troles: ['summary-surface', 'eyebrow', 'title']\n\t\t\t\t}\n\t\t\t: selectCatalogRecipe(\n\t\t\t\t\tintent,\n\t\t\t\t\tcomposition,\n\t\t\t\t\treverse ? (contentSlot?.startsWith('carousel.') ? 'carousel' : 'list') : 'hero'\n\t\t\t\t);\n\t\tif (recipe && !reverse && contentSlot === 'carousel.neighbour') {\n\t\t\trecipe.source = contentSlot;\n\t\t\trecipe.roles = [];\n\t\t}\n\t\tif (!recipe || matchMedia('(prefers-reduced-motion: reduce)').matches) {\n\t\t\tthis.hooks.diagnose?.(recipe ? 'reduced-motion' : 'source-recipe'); return;\n\t\t}\n\t\tconst identity = recipe.identity;\n\t\tconst dock = recipe.source === 'detail.dock';\n\t\tconst source = { ...identity, slot: recipe.source };\n\t\tconst card = this.endpoints.resolve({\n\t\t\t...source,\n\t\t\trole: reverse ? 'summary-surface' : 'container'\n\t\t});\n\t\tif (\n\t\t\t!card ||\n\t\t\t!this.endpoints.resolve({\n\t\t\t\t...source,\n\t\t\t\tslot: reverse && !dock ? 'detail.hero' : source.slot,\n\t\t\t\trole: 'geometry'\n\t\t\t})\n\t\t) {\n\t\t\tthis.hooks.diagnose?.('source-endpoint'); return;\n\t\t}\n\t\tif (reverse)\n\t\t\trecipe.roles = recipe.roles.filter((role) => {\n\t\t\t\tconst element = this.endpoints.resolve({ ...source, role });\n\t\t\t\t// During docking the hero remains the geometry source. Do not resurrect\n\t\t\t\t// already clipped summary pieces just to retain their semantic roles.\n\t\t\t\treturn (\n\t\t\t\t\telement &&\n\t\t\t\t\tvisiblyPresented(element) && fullyPresented(element)\n\t\t\t\t);\n\t\t\t});\n\t\trecipe.roles = recipe.roles.filter((role) => {\n\t\t\t// S cards and compact Carousel summaries deliberately omit the eyebrow\n\t\t\t// or rich content. That does not invalidate their prepared 3D endpoint.\n\t\t\tif (role !== 'eyebrow' && !isRichRole(role)) return true;\n\t\t\tconst element = this.endpoints.resolve({ ...source, role });\n\t\t\treturn Boolean(element && hasSize(element.getBoundingClientRect()));\n\t\t});\n\t\t// A clipped summary (mobile fold / 3XL pane) may contribute fully visible\n\t\t// title rows while its surface fades out. Rich rows need a retained surface\n\t\t// to map to a compact destination which does not expose those same rows.\n\t\tif (!recipe.roles.includes('summary-surface')) recipe.roles = recipe.roles.filter(role => !isRichRole(role));\n\t\tconst sources = recipe.roles.map((role) => this.endpoints.resolve({ ...source, role }));\n\t\tif (sources.some((element) => !element || !hasSize(element.getBoundingClientRect()))) {\n\t\t\tthis.hooks.diagnose?.('source-role-size'); return;\n\t\t}\n\t\tconst carouselTarget = composition === 'carousel'\n\t\t\t? card.querySelector<HTMLElement>('.spatial-element-target') : null;\n\t\tif (!reverse && !(composition === 'carousel'\n\t\t\t? visiblyPresented(card) || (carouselTarget && visiblyPresented(carouselTarget))\n\t\t\t: fullyPresented(card))) {\n\t\t\tthis.hooks.diagnose?.('source-visibility'); return;\n\t\t}\n\n\t\ttry {\n\t\t\tconst endpoint = geometryEndpoint({\n\t\t\t\t...source,\n\t\t\t\tslot: reverse && !dock ? 'detail.hero' : source.slot\n\t\t\t});\n\t\t\tif (\n\t\t\t\tview\n\t\t\t\t\t? !this.hooks.captureContentGeometry?.(view.source, view.sources.slice(1))\n\t\t\t\t\t: !this.hooks.captureGeometry(endpoint)\n\t\t\t) {\n\t\t\t\tthis.hooks.diagnose?.('source-geometry-not-ready'); return;\n\t\t\t}\n\t\t\tconst token = this.sequence.begin();\n\t\t\tconst host = document.createElement('div');\n\t\t\thost.dataset.catalogTransitionActors = '';\n\t\t\thost.setAttribute('aria-hidden', 'true');\n\t\t\thost.inert = true;\n\t\t\t// The host must not form a stacking context: surface < GPU overlay < text.\n\t\t\thost.style.pointerEvents = 'none';\n\t\t\tconst capture: TransitionCapture = {\n\t\t\t\tview,\n\t\t\t\telapsed: 0,\n\t\t\t\ttoken,\n\t\t\t\tidentity,\n\t\t\t\trecipe,\n\t\t\t\thost,\n\t\t\t\tactors: [],\n\t\t\t\texiting: [],\n\t\t\t\trestore: [],\n\t\t\t\tframe: 0,\n\t\t\t\tinert: new Set(),\n\t\t\t\ttimeout: setTimeout(() => {\n\t\t\t\t\tif (this.captureState === capture) { this.hooks.diagnose?.('capture-timeout'); this.cancel(); }\n\t\t\t\t}, 5000)\n\t\t\t};\n\t\t\tthis.captureState = capture;\n\t\t\tcapture.lease = new PresentationLease(capture, () => this.cleanup());\n\t\t\tcapture.owner = capture.lease.claim();\n\t\t\tfor (let index = 0; index < recipe.roles.length; index++) {\n\t\t\t\tconst actor = this.createActor(identity, sources[index]!, recipe.roles[index], reverse);\n\t\t\t\tcapture.actors.push(actor);\n\t\t\t\thost.appendChild(actor.element);\n\t\t\t}\n\t\t\tif (capture.view && !capture.view.context.spatialElementId) {\n\t\t\t\tcapture.view.alternates = new Map();\n\t\t\t\tfor (const endpoint of capture.view.sources.slice(1)) {\n\t\t\t\t\tconst actors: TransitionActor[] = [];\n\t\t\t\t\tfor (const role of ['summary-surface', 'eyebrow', 'title'] as const) {\n\t\t\t\t\t\tconst element = this.endpoints.resolve({ ...endpoint, role });\n\t\t\t\t\t\tif (element && visiblyPresented(element))\n\t\t\t\t\t\t\tactors.push(this.createActor(endpoint, element, role, false));\n\t\t\t\t\t}\n\t\t\t\t\tcapture.view.alternates.set(endpoint.occurrence!, actors);\n\t\t\t\t}\n\t\t\t\tthis.endpoints.prefer(\n\t\t\t\t\tidentity.brandId,\n\t\t\t\t\tidentity.spatialElementId,\n\t\t\t\t\tcapture.view.source.occurrence!,\n\t\t\t\t\tcapture.view.source.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tdocument.body.appendChild(host);\n\t\t\tif (reverse) {\n\t\t\t\tfor (const source of sources) {\n\t\t\t\t\tif (source === card) continue;\n\t\t\t\t\tpreserveStyle(source!, 'visibility', capture.restore);\n\t\t\t\t\tsource!.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t\tthis.captureExitingContent(capture);\n\t\t\t}\n\t\t\tpreserveStyle(card, 'visibility', capture.restore);\n\t\t\tcard.style.setProperty('visibility', 'hidden', 'important');\n\t\t\tif (!reverse) this.captureExitingContent(capture);\n\t\t\tthis.root.dataset.catalogDirection = reverse || view ? 'return' : 'forward';\n\t\t\tthis.setPresentation({ active: true, exitOpacity: 1, enterOpacity: 0, sharedOpacity: 0 });\n\t\t\tthis.root.dataset.catalogTransition = 'captured';\n\t\t\tthis.hooks.diagnose?.('captured');\n\t\t\tthis.root.dataset.catalogRecipe = recipe.id;\n\t\t\tthis.root.dataset.catalogOwnershipRevision = String(capture.lease.revision);\n\t\t\tthis.lockParticipants(capture);\n\t\t\tcapture.observer = new MutationObserver(() => this.lockParticipants(capture));\n\t\t\tcapture.observer.observe(this.root, { childList: true, subtree: true });\n\t\t\tthis.capturedViewport = readCatalogTransitionViewport();\n\t\t\twindow.addEventListener('resize', this.resize, { passive: true });\n\t\t\twindow.addEventListener('wheel', this.interrupt, { passive: true, capture: true });\n\t\t\twindow.addEventListener('touchmove', this.interrupt, { passive: true, capture: true });\n\t\t\twindow.addEventListener('keydown', this.keydown);\n\t\t} catch (error) {\n\t\t\tthis.hooks.diagnose?.(`capture-error:${error instanceof Error ? error.message : String(error)}`);\n\t\t\tthis.cancel();\n\t\t}\n\t}\n\n\t/** Keep only decorative outgoing DOM; Kit can mount and measure the real destination now. */\n\tprivate captureExitingContent(capture: TransitionCapture) {\n\t\tconst copiesToAttach = document.createDocumentFragment();\n\t\tconst sourcesToHide: HTMLElement[] = [];\n\t\tconst selector = isReturnRecipe(capture.recipe)\n\t\t\t? '[data-catalog-transition-dom=\"enter\"], [data-catalog-transition-group=\"enter\"], [data-catalog-secondary]'\n\t\t\t: '[data-catalog-transition-dom=\"exit\"], [data-catalog-shell]';\n\t\tfor (const source of this.root.querySelectorAll<HTMLElement>(selector)) {\n\t\t\tif (source.parentElement?.closest(selector)) continue;\n\t\t\tif (\n\t\t\t\tcapture.actors.some(\n\t\t\t\t\t(actor) =>\n\t\t\t\t\t\tactor.role ===\n\t\t\t\t\t\tsource.closest<HTMLElement>('[data-catalog-rich-shared]')?.dataset.catalogRichShared\n\t\t\t\t)\n\t\t\t)\n\t\t\t\tcontinue;\n\t\t\tconst rect = source.getBoundingClientRect();\n\t\t\tif (!hasSize(rect) || rect.bottom <= 0 || rect.top >= window.innerHeight) continue;\n\t\t\tif (!visiblyPresented(source)) continue;\n\t\t\tconst { copy, elements } = snapshotCatalogDom(source);\n\t\t\tconst style = elements[0].style;\n\t\t\tfor (const { copy: element } of elements) {\n\t\t\t\telement.removeAttribute('id');\n\t\t\t\tfor (const attribute of [...element.attributes]) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tattribute.name.startsWith('data-') &&\n\t\t\t\t\t\tattribute.name !== 'data-catalog-model-ready' &&\n\t\t\t\t\t\tattribute.name !== 'data-catalog-poster' &&\n\t\t\t\t\t\t![\n\t\t\t\t\t\t\t'data-stage-panel-content',\n\t\t\t\t\t\t\t'data-stage-panel-css-surface',\n\t\t\t\t\t\t\t'data-stage-panel-render-mode',\n\t\t\t\t\t\t\t'data-stage-panel-surface'\n\t\t\t\t\t\t].includes(attribute.name)\n\t\t\t\t\t)\n\t\t\t\t\t\telement.removeAttribute(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (const { source: original, copy: cloned } of elements) {\n\t\t\t\tif (original.matches('[data-catalog-card], [data-carousel-spatial-element]'))\n\t\t\t\t\t(cloned as HTMLElement).dataset.catalogExitOccurrence = (\n\t\t\t\t\t\toriginal as HTMLElement\n\t\t\t\t\t).dataset.catalogOccurrence;\n\t\t\t}\n\t\t\tcopy.dataset.catalogExitCopy = '';\n\t\t\tcopy.dataset.catalogBaseOpacity = style.opacity;\n\t\t\tif (source.hasAttribute('data-catalog-shell')) {\n\t\t\t\tcopy.dataset.catalogShellCopy = '';\n\t\t\t\t(capture.shellCopies ??= new Map()).set(source, copy);\n\t\t\t}\n\t\t\tcopy.setAttribute('aria-hidden', 'true');\n\t\t\tcopy.inert = true;\n\t\t\tObject.assign(copy.style, {\n\t\t\t\tposition: 'fixed',\n\t\t\t\tleft: `${rect.left}px`,\n\t\t\t\ttop: `${rect.top}px`,\n\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\theight: `${rect.height}px`,\n\t\t\t\tmargin: '0',\n\t\t\t\ttransform: 'none',\n\t\t\t\tzIndex: source.hasAttribute('data-catalog-secondary') ? '22' : '2',\n\t\t\t\tpointerEvents: 'none',\n\t\t\t\ttransition: 'none',\n\t\t\t\tanimation: 'none',\n\t\t\t\twillChange: 'opacity'\n\t\t\t});\n\t\t\tconst projection = this.hooks.captureElement?.(source);\n\t\t\tif (projection) {\n\t\t\t\tconst corners = projection.corners.map((point) => ({\n\t\t\t\t\tx: point.x - rect.left,\n\t\t\t\t\ty: point.y - rect.top\n\t\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\twidth: `${projection.width}px`,\n\t\t\t\t\theight: `${projection.height}px`,\n\t\t\t\t\ttransformOrigin: 'top left',\n\t\t\t\t\ttransform:\n\t\t\t\t\t\tgetProjectiveCssMatrix3d(corners, projection.width, projection.height) ?? 'none'\n\t\t\t\t});\n\t\t\t}\n\t\t\tcopiesToAttach.appendChild(copy);\n\t\t\tcapture.exiting.push(copy);\n\t\t\tconst panel = capture.actors.find((actor) => actor.role === 'summary-surface');\n\t\t\tif (panel && source.closest('[data-spatial-element-hero-panel-content]')) {\n\t\t\t\t(capture.panelContent ??= []).push({\n\t\t\t\t\telement: copy,\n\t\t\t\t\trect,\n\t\t\t\t\tpanel: panel.from,\n\t\t\t\t\tincoming: false\n\t\t\t\t});\n\t\t\t}\n\t\t\tsourcesToHide.push(source);\n\t\t}\n\t\t// Measure and copy every source before touching connected DOM. Appending or\n\t\t// hiding one subtree before measuring the next forces repeated style/layout work.\n\t\tthis.root.appendChild(copiesToAttach);\n\t\tfor (const source of sourcesToHide) {\n\t\t\tpreserveStyle(source, 'visibility', capture.restore);\n\t\t\tsource.style.setProperty('visibility', 'hidden', 'important');\n\t\t}\n\t}\n\n\tprivate lockParticipants(capture: TransitionCapture) {\n\t\tif (!this.sequence.isCurrent(capture.token)) return;\n\t\tfor (const element of this.root.querySelectorAll<HTMLElement>(\n\t\t\t'[data-catalog-transition-dom], [data-catalog-transition-group]'\n\t\t)) {\n\t\t\tif (capture.inert.has(element)) continue;\n\t\t\tcapture.inert.add(element);\n\t\t\tsetInertLease(element, capture, true);\n\t\t}\n\t}\n\n\tprivate setPresentation(presentation: CatalogTransitionPresentation) {\n\t\tfor (const channel of ['enter', 'exit', 'shared'] as const) {\n\t\t\tconst value = presentation[`${channel}Opacity`];\n\t\t\tconst property = `--catalog-${channel}-opacity`;\n\t\t\tconst previous = this.root.style.getPropertyValue(property);\n\t\t\tif (presentation.active) {\n\t\t\t\tconst next = String(value);\n\t\t\t\tif (next !== previous) this.root.style.setProperty(property, next);\n\t\t\t} else if (previous) this.root.style.removeProperty(property);\n\t\t\tconst attribute = `data-catalog-${channel}-hidden`;\n\t\t\tconst hidden = presentation.active && value === 0;\n\t\t\tif (this.root.hasAttribute(attribute) !== hidden) this.root.toggleAttribute(attribute, hidden);\n\t\t}\n\t\tfor (const copy of this.captureState?.exiting ?? []) {\n\t\t\tcopy.style.opacity = String(\n\t\t\t\tcopy.hasAttribute('data-catalog-shell-copy') &&\n\t\t\t\t\tthis.captureState?.recipe.targetGeometry !== 'detail.dock'\n\t\t\t\t\t? 1\n\t\t\t\t\t: presentation.exitOpacity * Number(copy.dataset.catalogBaseOpacity ?? 1)\n\t\t\t);\n\t\t}\n\t\tthis.hooks.setPresentation(presentation);\n\t}\n\n\t/** Call only after destination registration and scroll restoration have completed. */\n\tasync play(): Promise<void> {\n\t\tconst capture = this.captureState;\n\t\tif (!capture || !this.sequence.start(capture.token)) return;\n\t\t// Persistent shell nodes survive route replacement; the exit copy owns their old pose.\n\t\tfor (const shell of this.root.querySelectorAll<HTMLElement>('[data-catalog-shell]'))\n\t\t\tshell.style.removeProperty('visibility');\n\t\t// A persistent header visible at both scroll positions is not entering or\n\t\t// leaving the page. Hand its snapshot back without an opacity dip.\n\t\tfor (const [shell, copy] of capture.shellCopies ?? []) {\n\t\t\tdelete copy.dataset.catalogShellCopy;\n\t\t\tconst sourceRect = copy.getBoundingClientRect();\n\t\t\t// A surface switch can move header text out of the captured surface into\n\t\t\t// a native layer. Transfer continuity to its current shell nodes as well.\n\t\t\tconst candidates = new Set([shell, ...this.root.querySelectorAll<HTMLElement>('[data-catalog-shell]')]);\n\t\t\tlet continuous = false;\n\t\t\tfor (const current of candidates) {\n\t\t\t\tif (!current.isConnected || !intersectsViewport(current)) continue;\n\t\t\t\tconst rect = current.getBoundingClientRect();\n\t\t\t\tif (current !== shell && !(rect.left < sourceRect.right && rect.right > sourceRect.left &&\n\t\t\t\t\trect.top < sourceRect.bottom && rect.bottom > sourceRect.top)) continue;\n\t\t\t\tcurrent.setAttribute('data-catalog-shell-continuous', '');\n\t\t\t\tcapture.restore.push(() => current.removeAttribute('data-catalog-shell-continuous'));\n\t\t\t\tcontinuous = true;\n\t\t\t}\n\t\t\tif (continuous) copy.style.display = 'none';\n\t\t}\n\t\ttry {\n\t\t\tconst reverse = Boolean(capture.view) || isReturnRecipe(capture.recipe);\n\t\t\tif (capture.view) {\n\t\t\t\tconst pairs = planCatalogParticipants(\n\t\t\t\t\tcapture.view.sources,\n\t\t\t\t\tthis.contentEndpoints(capture.identity.brandId, false),\n\t\t\t\t\tcapture.view.context,\n\t\t\t\t\t5\n\t\t\t\t);\n\t\t\t\tcapture.view.pairs = pairs;\n\t\t\t\tconst pair = pairs[0];\n\t\t\t\tif (\n\t\t\t\t\t!pair\n\t\t\t\t) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (pair.identity.spatialElementId !== capture.identity.spatialElementId) {\n\t\t\t\t\tconst actors = capture.view.alternates?.get(pair.source.occurrence!);\n\t\t\t\t\tif (!actors || !this.hooks.promoteContentParticipant?.(pair.source)) {\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (const actor of capture.actors) capture.exiting.push(actor.element);\n\t\t\t\t\tcapture.actors = actors;\n\t\t\t\t\tfor (const actor of actors) capture.host.appendChild(actor.element);\n\t\t\t\t\tfor (const element of capture.host.querySelectorAll<HTMLElement>(\n\t\t\t\t\t\t'[data-catalog-exit-occurrence]'\n\t\t\t\t\t))\n\t\t\t\t\t\tif (element.dataset.catalogExitOccurrence === pair.source.occurrence)\n\t\t\t\t\t\t\telement.style.opacity = '0';\n\t\t\t\t\tcapture.identity = pair.identity;\n\t\t\t\t\tcapture.recipe.identity = pair.identity;\n\t\t\t\t\tcapture.recipe.source = pair.source.slot;\n\t\t\t\t\tcapture.recipe.roles = actors.map((actor) => actor.role);\n\t\t\t\t\tcapture.view.source = pair.source;\n\t\t\t\t}\n\t\t\t\tthis.endpoints.prefer(\n\t\t\t\t\tpair.target.brandId,\n\t\t\t\t\tpair.target.spatialElementId,\n\t\t\t\t\tpair.target.occurrence!,\n\t\t\t\t\tpair.target.slot as 'catalog.card' | 'carousel.front' | 'carousel.neighbour'\n\t\t\t\t);\n\t\t\t\tcapture.recipe.targetGeometry = capture.recipe.targetShared = pair.target.slot;\n\t\t\t\tcapture.recipe.id = pair.source.slot === 'catalog.card'\n\t\t\t\t\t? pair.target.slot === 'catalog.card' ? 'list-to-list' : 'list-to-carousel'\n\t\t\t\t\t: pair.target.slot === 'catalog.card' ? 'carousel-to-list' : 'carousel-to-carousel';\n\t\t\t\tthis.root.dataset.catalogRecipe = capture.recipe.id;\n\t\t\t\tif (pair.target.slot === 'carousel.neighbour') {\n\t\t\t\t\tfor (const actor of capture.actors) capture.exiting.push(actor.element);\n\t\t\t\t\tcapture.actors = [];\n\t\t\t\t\tcapture.recipe.roles = [];\n\t\t\t\t}\n\t\t\t} else if (reverse) {\n\t\t\t\tconst slot = this.endpoints.getContentSlot(capture.identity);\n\t\t\t\tif (!slot) {\n\t\t\t\t\tthis.hooks.diagnose?.('return-content-slot');\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcapture.recipe = {\n\t\t\t\t\t...capture.recipe,\n\t\t\t\t\tid: slot.startsWith('carousel.')\n\t\t\t\t\t\t? capture.recipe.source === 'detail.dock'\n\t\t\t\t\t\t\t? 'dock-to-carousel'\n\t\t\t\t\t\t\t: 'hero-to-carousel'\n\t\t\t\t\t\t: capture.recipe.source === 'detail.dock'\n\t\t\t\t\t\t\t? 'dock-to-list'\n\t\t\t\t\t\t\t: 'hero-to-list',\n\t\t\t\t\ttargetGeometry: slot,\n\t\t\t\t\ttargetShared: slot\n\t\t\t\t};\n\t\t\t\tif (slot === 'carousel.neighbour') {\n\t\t\t\t\tfor (const actor of capture.actors) {\n\t\t\t\t\t\tcapture.exiting.push(actor.element);\n\t\t\t\t\t\tactor.destinationCopy?.remove();\n\t\t\t\t\t}\n\t\t\t\t\tcapture.actors = [];\n\t\t\t\t\tcapture.recipe.roles = [];\n\t\t\t\t}\n\t\t\t\tthis.root.dataset.catalogRecipe = capture.recipe.id;\n\t\t\t} else {\n\t\t\t\tconst composition = this.endpoints.getComposition(capture.identity);\n\t\t\t\tif (composition !== 'hero' && composition !== 'intermediate' && composition !== 'dock') {\n\t\t\t\t\tthis.hooks.diagnose?.('destination-composition');\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcapture.recipe = {\n\t\t\t\t\t...capture.recipe,\n\t\t\t\t\tid:\n\t\t\t\t\t\tcomposition === 'dock'\n\t\t\t\t\t\t\t? capture.recipe.source.startsWith('carousel.')\n\t\t\t\t\t\t\t\t? 'carousel-to-dock'\n\t\t\t\t\t\t\t\t: 'list-to-dock'\n\t\t\t\t\t\t\t: capture.recipe.source.startsWith('carousel.')\n\t\t\t\t\t\t\t\t? 'carousel-to-hero'\n\t\t\t\t\t\t\t\t: 'list-to-hero',\n\t\t\t\t\ttargetGeometry: composition === 'dock' ? 'detail.dock' : 'detail.hero',\n\t\t\t\t\ttargetShared: composition === 'dock' ? 'detail.dock' : 'detail.summary'\n\t\t\t\t};\n\t\t\t\tthis.root.dataset.catalogRecipe = capture.recipe.id;\n\t\t\t}\n\t\t\tconst page = this.root.querySelector<HTMLElement>('[data-spatial-element-root]');\n\t\t\tif (\n\t\t\t\t(!reverse && page?.dataset.spatialElementId !== capture.identity.spatialElementId) ||\n\t\t\t\t!this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetGeometry,\n\t\t\t\t\trole: 'geometry'\n\t\t\t\t})\n\t\t\t) {\n\t\t\t\tthis.hooks.diagnose?.('destination-geometry-endpoint');\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tthis.hooks.prepareDestination?.({\n\t\t\t\t\tspatialElementId: capture.identity.spatialElementId,\n\t\t\t\t\tkind: reverse ? 'content' : capture.recipe.targetGeometry === 'detail.dock' ? 'dock' : 'hero'\n\t\t\t\t}) === false\n\t\t\t) {\n\t\t\t\tthis.hooks.diagnose?.('destination-geometry-projection');\n\t\t\t\tthis.cancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (capture.view) {\n\t\t\t\tconst prepared = this.hooks.prepareContentParticipants?.(capture.view.pairs ?? []) ?? [];\n\t\t\t\tfor (const pair of prepared) {\n\t\t\t\t\tconst geometry = this.endpoints.resolve({ ...pair.target, role: 'geometry' });\n\t\t\t\t\tif (!geometry) continue;\n\t\t\t\t\tpreserveStyle(geometry, 'visibility', capture.restore);\n\t\t\t\t\tgeometry.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t\t// Remove prepared target pixels before yielding to the first moving frame.\n\t\t\t\tthis.hooks.flushFrame();\n\t\t\t}\n\t\t\tif (reverse) {\n\t\t\t\t// Zoom can withdraw every summary actor. The transferred GPU model\n\t\t\t\t// still owns geometry: never expose the destination's fallback poster.\n\t\t\t\tconst geometry = this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetGeometry,\n\t\t\t\t\trole: 'geometry'\n\t\t\t\t});\n\t\t\t\tif (geometry) {\n\t\t\t\t\tpreserveStyle(geometry, 'visibility', capture.restore);\n\t\t\t\t\tgeometry.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t\tconst card = this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\trole: 'container'\n\t\t\t\t});\n\t\t\t\tif (\n\t\t\t\t\t!card ||\n\t\t\t\t\t!(capture.recipe.targetShared.startsWith('carousel.')\n\t\t\t\t\t\t? intersectsViewport(card)\n\t\t\t\t\t\t: fullyPresented(card))\n\t\t\t\t) {\n\t\t\t\t\tthis.hooks.diagnose?.('return-target-visibility');\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (capture.actors.length) {\n\t\t\t\t\tpreserveStyle(card, 'visibility', capture.restore);\n\t\t\t\t\tcard.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst measuredTargets = new Map<HTMLElement, DOMRect>();\n\t\t\tconst sharedTargets = new Set<HTMLElement>();\n\t\t\tconst destinationCopies = document.createDocumentFragment();\n\t\t\t// Eyebrows are optional, notably for S cards. Fade the outgoing text\n\t\t\t// when the destination omits it; retain the rest of the transition.\n\t\t\tcapture.actors = capture.actors.filter(actor => {\n\t\t\t\tif (actor.role !== 'eyebrow') return true;\n\t\t\t\tconst eyebrow = this.endpoints.resolve({ ...capture.identity, slot: capture.recipe.targetShared, role: 'eyebrow' });\n\t\t\t\t// A registered optional role can still be omitted by responsive CSS.\n\t\t\t\tif (eyebrow && hasSize(eyebrow.getBoundingClientRect())) return true;\n\t\t\t\tcapture.exiting.push(actor.element);\n\t\t\t\tactor.destinationCopy?.remove();\n\t\t\t\treturn false;\n\t\t\t});\n\t\t\tfor (const actor of capture.actors) {\n\t\t\t\tlet target = this.endpoints.resolve({\n\t\t\t\t\t...capture.identity,\n\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\trole: actor.role\n\t\t\t\t});\n\t\t\t\tif (target && isRichRole(actor.role) && !hasSize(target.getBoundingClientRect())) target = undefined;\n\t\t\t\tconst missingRich = !target && isRichRole(actor.role);\n\t\t\t\tif (missingRich) {\n\t\t\t\t\ttarget = this.endpoints.resolve({\n\t\t\t\t\t\t...capture.identity,\n\t\t\t\t\t\tslot: capture.recipe.targetShared,\n\t\t\t\t\t\trole: 'summary-surface'\n\t\t\t\t\t});\n\t\t\t\t\tactor.sourceOnly = true;\n\t\t\t\t}\n\t\t\t\tif (!target) {\n\t\t\t\t\tthis.hooks.diagnose?.(`destination-role:${actor.role}`);\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst bounds =\n\t\t\t\t\tactor.role === 'summary-surface' ? this.hooks.resolveSurface(target) : target;\n\t\t\t\tsharedTargets.add(target);\n\t\t\t\tconst targetRect = bounds.getBoundingClientRect();\n\t\t\t\tif (\n\t\t\t\t\tcapture.paused &&\n\t\t\t\t\tactor.to &&\n\t\t\t\t\t['x', 'y', 'width', 'height'].some(\n\t\t\t\t\t\t(key) =>\n\t\t\t\t\t\t\tMath.abs(\n\t\t\t\t\t\t\t\t(targetRect[key as keyof DOMRect] as number) -\n\t\t\t\t\t\t\t\t\t(actor.to![key as keyof DOMRect] as number)\n\t\t\t\t\t\t\t) > 0.5\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tactor.to = targetRect;\n\t\t\t\tif (missingRich) {\n\t\t\t\t\tconst panel = capture.actors.find((item) => item.role === 'summary-surface')!;\n\t\t\t\t\tconst sx = targetRect.width / panel.from.width,\n\t\t\t\t\t\tsy = targetRect.height / panel.from.height;\n\t\t\t\t\tactor.to = new DOMRect(\n\t\t\t\t\t\ttargetRect.left + (actor.from.left - panel.from.left) * sx,\n\t\t\t\t\t\ttargetRect.top + (actor.from.top - panel.from.top) * sy,\n\t\t\t\t\t\tactor.from.width * sx,\n\t\t\t\t\t\tactor.from.height * sy\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif (isRichRole(actor.role))\n\t\t\t\t\tactor.element.dataset.catalogContentMatch =\n\t\t\t\t\t\tactor.semantic && actor.semantic === target.dataset.catalogSemantic\n\t\t\t\t\t\t\t? 'shared'\n\t\t\t\t\t\t\t: 'replaced';\n\t\t\t\tmeasuredTargets.set(bounds, targetRect);\n\t\t\t\tif (!hasSize(actor.to)) {\n\t\t\t\t\tthis.hooks.diagnose?.(`destination-size:${actor.role}`);\n\t\t\t\t\tthis.cancel();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tactor.fontScale =\n\t\t\t\t\tNumber.parseFloat(getComputedStyle(target).fontSize) / actor.fontSize || 1;\n\t\t\t\tif (!actor.sourceOnly && !actor.destinationCopy) {\n\t\t\t\t\t// Keep both text layouts fixed. Crossfade their typography instead of stretching\n\t\t\t\t\t// the source line width beyond the destination panel or recomputing layout every frame.\n\t\t\t\t\tconst copy = document.createElement('div');\n\t\t\t\t\tcopy.style.cssText = actor.element.style.cssText;\n\t\t\t\t\tif (actor.role !== 'summary-surface') {\n\t\t\t\t\t\tif (isRichRole(actor.role)) copyRichContent(copy, target);\n\t\t\t\t\t\telse copy.textContent = target.textContent;\n\t\t\t\t\t\tcopyTypography(copy, getComputedStyle(target));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst paint = this.hooks.captureSurface?.(target);\n\t\t\t\t\t\tconst style = getComputedStyle(\n\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\ttarget.closest('[data-carousel-spatial-element]') ? '::before' : null\n\t\t\t\t\t\t);\n\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\tbackground: paint?.background ?? style.backgroundColor,\n\t\t\t\t\t\t\tborder: paint?.border ?? style.border,\n\t\t\t\t\t\t\tborderRadius: paint?.borderRadius ?? style.borderRadius,\n\t\t\t\t\t\t\tboxShadow: paint?.boxShadow ?? style.boxShadow\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tcopy.style.width = `${actor.to.width}px`;\n\t\t\t\t\tcopy.style.height = `${actor.to.height}px`;\n\t\t\t\t\tcopy.style.opacity = '0';\n\t\t\t\t\tcopy.style.overflow = 'hidden';\n\t\t\t\t\tcopy.dataset.catalogActorRole = actor.role;\n\t\t\t\t\tcopy.dataset.catalogActorVariant = 'destination';\n\t\t\t\t\tdestinationCopies.appendChild(copy);\n\t\t\t\t\tactor.destinationCopy = copy;\n\t\t\t\t}\n\t\t\t\tif (actor.role === 'summary-surface') {\n\t\t\t\t\tcapture.content = target;\n\t\t\t\t\tif (!capture.panelContent?.some((entry) => entry.incoming)) {\n\t\t\t\t\t\tfor (const source of target.querySelectorAll<HTMLElement>('[data-catalog-secondary]')) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tcapture.actors.some(\n\t\t\t\t\t\t\t\t\t(actor) =>\n\t\t\t\t\t\t\t\t\t\tactor.role ===\n\t\t\t\t\t\t\t\t\t\tsource.closest<HTMLElement>('[data-catalog-rich-shared]')?.dataset\n\t\t\t\t\t\t\t\t\t\t\t.catalogRichShared\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tconst rect = source.getBoundingClientRect();\n\t\t\t\t\t\t\tconst { copy, elements } = snapshotCatalogDom(source);\n\t\t\t\t\t\t\tfor (const { copy: element } of elements) {\n\t\t\t\t\t\t\t\t// The live destination is deliberately masked during binding.\n\t\t\t\t\t\t\t\telement.style.visibility = 'visible';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (const { copy: element } of elements) {\n\t\t\t\t\t\t\t\telement.removeAttribute('id');\n\t\t\t\t\t\t\t\tfor (const attribute of [...element.attributes])\n\t\t\t\t\t\t\t\t\tif (attribute.name.startsWith('data-')) element.removeAttribute(attribute.name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcopy.inert = true;\n\t\t\t\t\t\t\tcopy.setAttribute('aria-hidden', 'true');\n\t\t\t\t\t\t\tcopy.dataset.catalogPanelContent = '';\n\t\t\t\t\t\t\tObject.assign(copy.style, {\n\t\t\t\t\t\t\t\tposition: 'fixed',\n\t\t\t\t\t\t\t\tleft: '0',\n\t\t\t\t\t\t\t\ttop: '0',\n\t\t\t\t\t\t\t\twidth: `${rect.width}px`,\n\t\t\t\t\t\t\t\theight: `${rect.height}px`,\n\t\t\t\t\t\t\t\tmargin: '0',\n\t\t\t\t\t\t\t\ttransformOrigin: 'top left',\n\t\t\t\t\t\t\t\topacity: '0',\n\t\t\t\t\t\t\t\tvisibility: 'visible',\n\t\t\t\t\t\t\t\tzIndex: '22',\n\t\t\t\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t\t\t\ttransition: 'none',\n\t\t\t\t\t\t\t\tanimation: 'none'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tdestinationCopies.appendChild(copy);\n\t\t\t\t\t\t\t(capture.panelContent ??= []).push({\n\t\t\t\t\t\t\t\telement: copy,\n\t\t\t\t\t\t\t\trect,\n\t\t\t\t\t\t\t\tpanel: targetRect,\n\t\t\t\t\t\t\t\tincoming: true\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Keep clones detached while measuring the next destination's layout/type.\n\t\t\tcapture.host.appendChild(destinationCopies);\n\t\t\tfor (const target of sharedTargets) {\n\t\t\t\tpreserveStyle(target, 'visibility', capture.restore);\n\t\t\t\ttarget.style.setProperty('visibility', 'hidden', 'important');\n\t\t\t}\n\t\t\tconst content = capture.content;\n\t\t\tcapture.layoutObserver?.disconnect();\n\t\t\tcapture.layoutObserver = new ResizeObserver(() => {\n\t\t\t\tif (this.captureState !== capture || capture.paused) return;\n\t\t\t\tfor (const [element, rect] of measuredTargets) {\n\t\t\t\t\tconst current = element.getBoundingClientRect();\n\t\t\t\t\tif (\n\t\t\t\t\t\tMath.abs(current.width - rect.width) > 1 ||\n\t\t\t\t\t\tMath.abs(current.height - rect.height) > 1\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.hooks.diagnose?.('destination-layout-changed');\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tfor (const element of measuredTargets.keys()) capture.layoutObserver.observe(element);\n\t\t\tif (\n\t\t\t\tdocument.activeElement instanceof HTMLElement &&\n\t\t\t\tcontent?.contains(document.activeElement)\n\t\t\t) {\n\t\t\t\tcapture.focus = document.activeElement;\n\t\t\t}\n\t\t\tthis.lockParticipants(capture);\n\t\t\tthis.root.dataset.catalogTransition = 'animating';\n\t\t\tthis.hooks.diagnose?.('animating');\n\t\t\tif (matchMedia('(prefers-reduced-motion: reduce)').matches) {\n\t\t\t\tthis.hooks.setGeometryProgress(1);\n\t\t\t\tthis.settle(capture.token);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait new Promise<void>((resolve) => {\n\t\t\t\t// Route binding and shader preparation have their own bounded wait above.\n\t\t\t\t// Give playback its full safety window instead of cancelling its first\n\t\t\t\t// frames when preparation consumed most of the capture deadline.\n\t\t\t\tclearTimeout(capture.timeout);\n\t\t\t\tcapture.timeout = setTimeout(() => {\n\t\t\t\t\tif (this.captureState === capture) this.cancel();\n\t\t\t\t}, 5000);\n\t\t\t\tconst mode =\n\t\t\t\t\tcapture.mode ?? (reverse ? 'synchronous' : this.hooks.beginMotion?.()) ?? 'asynchronous';\n\t\t\t\tcapture.mode = mode;\n\t\t\t\tcapture.backgroundPrepared ??= !reverse && Boolean(this.hooks.backgroundPrepared?.());\n\t\t\t\tcapture.paused = false;\n\t\t\t\tconst owner = capture.owner!;\n\t\t\t\tcapture.resolve = resolve;\n\t\t\t\tlet previous = performance.now();\n\t\t\t\tlet elapsed = capture.elapsed;\n\t\t\t\tconst frame = (now: number) => {\n\t\t\t\t\tif (!owner.isCurrent() || capture.paused) return;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// A shader compilation or slow frame must not skip the entire content reveal.\n\t\t\t\t\t\t// The existing wall-clock timeout still bounds prolonged or hidden-page work.\n\t\t\t\t\t\tconst nextElapsed = elapsed + Math.min(Math.max(now - previous, 0), 50);\n\t\t\t\t\t\t// Submit one complete destination-pose frame before background/High work.\n\t\t\t\t\t\telapsed = elapsed < DURATION ? Math.min(nextElapsed, DURATION) : nextElapsed;\n\t\t\t\t\t\tcapture.elapsed = elapsed;\n\t\t\t\t\t\tprevious = now;\n\t\t\t\t\t\tconst timing = transitionTiming(elapsed, mode, capture.backgroundPrepared);\n\t\t\t\t\t\tconst progress = timing.motion;\n\t\t\t\t\t\tconst enter = timing.enter;\n\t\t\t\t\t\t// Moving actors exclusively own shared surfaces/type until the final pose.\n\t\t\t\t\t\tfor (const actor of capture.actors) {\n\t\t\t\t\t\t\tconst target = actor.to!;\n\t\t\t\t\t\t\tconst scaleX =\n\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t? target.width / actor.from.width\n\t\t\t\t\t\t\t\t\t: actor.fontScale!;\n\t\t\t\t\t\t\tconst scaleY =\n\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t? target.height / actor.from.height\n\t\t\t\t\t\t\t\t\t: actor.fontScale!;\n\t\t\t\t\t\t\tconst x = (target.left - actor.from.left) * progress;\n\t\t\t\t\t\t\tconst y = (target.top - actor.from.top) * progress;\n\t\t\t\t\t\t\tconst currentScaleX = 1 + (scaleX - 1) * progress;\n\t\t\t\t\t\t\tactor.element.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${currentScaleX}, ${1 + (scaleY - 1) * progress})`;\n\t\t\t\t\t\t\tlet projectedCorners: CssProjectionQuad | undefined;\n\t\t\t\t\t\t\tif (actor.corners) {\n\t\t\t\t\t\t\t\tconst ends = [\n\t\t\t\t\t\t\t\t\t{ x: target.left, y: target.top },\n\t\t\t\t\t\t\t\t\t{ x: target.right, y: target.top },\n\t\t\t\t\t\t\t\t\t{ x: target.right, y: target.bottom },\n\t\t\t\t\t\t\t\t\t{ x: target.left, y: target.bottom }\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\tconst corners = actor.corners.map((point, index) => ({\n\t\t\t\t\t\t\t\t\tx: point.x + (ends[index].x - point.x) * progress - actor.from.left,\n\t\t\t\t\t\t\t\t\ty: point.y + (ends[index].y - point.y) * progress - actor.from.top\n\t\t\t\t\t\t\t\t})) as unknown as CssProjectionQuad;\n\t\t\t\t\t\t\t\tprojectedCorners = corners;\n\t\t\t\t\t\t\t\tactor.element.style.transform =\n\t\t\t\t\t\t\t\t\tgetProjectiveCssMatrix3d(\n\t\t\t\t\t\t\t\t\t\tcorners,\n\t\t\t\t\t\t\t\t\t\tactor.layoutWidth ?? actor.from.width,\n\t\t\t\t\t\t\t\t\t\tactor.layoutHeight ?? actor.from.height\n\t\t\t\t\t\t\t\t\t) ?? actor.element.style.transform;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (actor.destinationCopy) {\n\t\t\t\t\t\t\t\tconst typography =\n\t\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t\t? transitionTiming(elapsed, 'synchronous').enter\n\t\t\t\t\t\t\t\t\t\t: Math.min(1, Math.max(0, (progress - 0.25) / 0.55));\n\t\t\t\t\t\t\t\tconst destinationScale =\n\t\t\t\t\t\t\t\t\t1 / actor.fontScale! + (1 - 1 / actor.fontScale!) * progress;\n\t\t\t\t\t\t\t\tconst availableWidth =\n\t\t\t\t\t\t\t\t\tactor.from.width + (target.width - actor.from.width) * progress;\n\t\t\t\t\t\t\t\tconst clippedWidth = Math.max(0, actor.from.width - availableWidth / currentScaleX);\n\t\t\t\t\t\t\t\tactor.element.style.clipPath = actor.corners\n\t\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t\t: `inset(0 ${clippedWidth}px 0 0)`;\n\t\t\t\t\t\t\t\tactor.element.style.opacity = String(1 - typography);\n\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform =\n\t\t\t\t\t\t\t\t\tactor.role === 'summary-surface'\n\t\t\t\t\t\t\t\t\t\t? `translate3d(${x}px, ${y}px, 0) scale(${(actor.from.width + (target.width - actor.from.width) * progress) / target.width}, ${(actor.from.height + (target.height - actor.from.height) * progress) / target.height})`\n\t\t\t\t\t\t\t\t\t\t: `translate3d(${x}px, ${y}px, 0) scale(${destinationScale})`;\n\t\t\t\t\t\t\t\tactor.destinationCopy.style.opacity = String(typography);\n\t\t\t\t\t\t\t\tif (projectedCorners && actor.role === 'summary-surface') {\n\t\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform =\n\t\t\t\t\t\t\t\t\t\tgetProjectiveCssMatrix3d(projectedCorners, target.width, target.height) ??\n\t\t\t\t\t\t\t\t\t\tactor.destinationCopy.style.transform;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\tactor.element.style.opacity = String(\n\t\t\t\t\t\t\t\t\t(actor.baseOpacity ?? 1) * (actor.sourceOnly ? 1 - progress : 1)\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst panel = capture.actors.find((actor) => actor.role === 'summary-surface');\n\t\t\t\t\t\tif (panel?.to)\n\t\t\t\t\t\t\tfor (const copy of capture.panelContent ?? []) {\n\t\t\t\t\t\t\t\tconst width = panel.from.width + (panel.to.width - panel.from.width) * progress;\n\t\t\t\t\t\t\t\tconst height = panel.from.height + (panel.to.height - panel.from.height) * progress;\n\t\t\t\t\t\t\t\tconst sx = width / copy.panel.width,\n\t\t\t\t\t\t\t\t\tsy = height / copy.panel.height;\n\t\t\t\t\t\t\t\tconst x =\n\t\t\t\t\t\t\t\t\tpanel.from.left +\n\t\t\t\t\t\t\t\t\t(panel.to.left - panel.from.left) * progress +\n\t\t\t\t\t\t\t\t\t(copy.rect.left - copy.panel.left) * sx;\n\t\t\t\t\t\t\t\tconst y =\n\t\t\t\t\t\t\t\t\tpanel.from.top +\n\t\t\t\t\t\t\t\t\t(panel.to.top - panel.from.top) * progress +\n\t\t\t\t\t\t\t\t\t(copy.rect.top - copy.panel.top) * sy;\n\t\t\t\t\t\t\t\tcopy.element.style.left = '0';\n\t\t\t\t\t\t\t\tcopy.element.style.top = '0';\n\t\t\t\t\t\t\t\tcopy.element.style.transform = `translate3d(${x}px, ${y}px, 0) scale(${sx}, ${sy})`;\n\t\t\t\t\t\t\t\tif (copy.incoming) copy.element.style.opacity = String(enter);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.setPresentation({\n\t\t\t\t\t\t\tactive: true,\n\t\t\t\t\t\t\texitOpacity: timing.exit,\n\t\t\t\t\t\t\tenterOpacity: enter,\n\t\t\t\t\t\t\tsharedOpacity: 0,\n\t\t\t\t\t\t\tbackgroundOpacity: timing.background,\n\t\t\t\t\t\t\tgeometryOpacity: timing.geometry\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.hooks.setGeometryProgress(progress);\n\t\t\t\t\t\tthis.hooks.flushFrame();\n\t\t\t\t\t\tif (timing.complete || matchMedia('(prefers-reduced-motion: reduce)').matches)\n\t\t\t\t\t\t\tthis.settle(capture.token);\n\t\t\t\t\t\telse capture.frame = requestAnimationFrame(frame);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tcapture.frame = requestAnimationFrame(frame);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthis.hooks.diagnose?.(`play-error:${error instanceof Error ? error.message : String(error)}`);\n\t\t\tthis.cancel();\n\t\t}\n\t}\n\n\tcancel() {\n\t\tthis.sequence.cancel();\n\t\tthis.captureState?.owner?.release();\n\t}\n\n\tdispose() {\n\t\tthis.cancel();\n\t}\n\n\tprivate settle(token: number) {\n\t\tif (this.sequence.finish(token)) this.captureState?.owner?.release();\n\t}\n\n\tprivate cleanup() {\n\t\tconst capture = this.captureState;\n\t\tthis.captureState = undefined;\n\t\tdelete this.root.dataset.catalogTransition;\n\t\tdelete this.root.dataset.catalogRecipe;\n\t\tdelete this.root.dataset.catalogOwnershipRevision;\n\t\tdelete this.root.dataset.catalogDirection;\n\t\twindow.removeEventListener('resize', this.resize);\n\t\tthis.capturedViewport = undefined;\n\t\twindow.removeEventListener('wheel', this.interrupt, true);\n\t\twindow.removeEventListener('touchmove', this.interrupt, true);\n\t\twindow.removeEventListener('keydown', this.keydown);\n\t\tif (!capture) return;\n\t\tcapture.observer?.disconnect();\n\t\tcapture.layoutObserver?.disconnect();\n\t\tcancelAnimationFrame(capture.frame);\n\t\tclearTimeout(capture.timeout);\n\t\tcapture.host.remove();\n\t\tfor (const copy of capture.exiting) copy.remove();\n\t\tfor (const restore of capture.restore.reverse()) restore();\n\t\tfor (const element of capture.inert) {\n\t\t\t// Docking can change during route scroll restoration after this lock was acquired.\n\t\t\t// Preserve the controller's current semantic state instead of reviving a stale lock snapshot.\n\t\t\tconst dock = element.matches('[data-spatial-element-sticky-header], [data-spatial-element-sticky-tabs]');\n\t\t\tsetInertLease(element, capture, false);\n\t\t\tif (dock) element.inert = element.getAttribute('aria-hidden') === 'true';\n\t\t}\n\t\tif (\n\t\t\tcapture.focus?.isConnected &&\n\t\t\t(document.activeElement === document.body ||\n\t\t\t\tcapture.content?.contains(document.activeElement))\n\t\t)\n\t\t\tcapture.focus.focus({ preventScroll: true });\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tthis.setPresentation({ active: false, enterOpacity: 1, exitOpacity: 1, sharedOpacity: 1 });\n\t\t\t} finally {\n\t\t\t\tthis.hooks.finishGeometry();\n\t\t\t\tthis.hooks.flushFrame();\n\t\t\t}\n\t\t} catch {\n\t\t\t// A renderer failure cannot prevent DOM restoration or completion of navigation.\n\t\t} finally {\n\t\t\tcapture.resolve?.();\n\t\t}\n\t}\n}\n"]}
|