(function(){if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){const viewTransitionRenderBlocker=document.getElementById("view-transition-render-blocker");viewTransitionRenderBlocker&&viewTransitionRenderBlocker.remove()}const idleCallback=typeof requestIdleCallback=="function"?requestIdleCallback:setTimeout;window.addEventListener("pageswap",async event=>{if(!hasViewTransition(event))return;const{viewTransition}=event;document.querySelectorAll("[data-view-transition-type]:not([data-view-transition-triggered])").forEach(element=>{element.removeAttribute("data-view-transition-type")});const transitionType=document.querySelector("[data-view-transition-triggered]")?.getAttribute("data-view-transition-type");transitionType?(viewTransition.types.clear(),viewTransition.types.add(transitionType),sessionStorage.setItem("custom-transition-type",transitionType)):(viewTransition.types.clear(),viewTransition.types.add("page-navigation"),sessionStorage.removeItem("custom-transition-type"))}),window.addEventListener("pagereveal",async event=>{if(!hasViewTransition(event))return;const{viewTransition}=event,customTransitionType=sessionStorage.getItem("custom-transition-type");customTransitionType?(viewTransition.types.clear(),viewTransition.types.add(customTransitionType),await viewTransition.finished,viewTransition.types.clear(),viewTransition.types.add("page-navigation"),idleCallback(()=>{sessionStorage.removeItem("custom-transition-type"),document.querySelectorAll("[data-view-transition-type]").forEach(element=>{element.removeAttribute("data-view-transition-type")})})):(viewTransition.types.clear(),viewTransition.types.add("page-navigation"))});function hasViewTransition(event){return"viewTransition"in event&&event.viewTransition instanceof ViewTransition}})();
//# sourceMappingURL=/s/files/1/0677/1399/0759/t/1/assets/view-transitions.js.map?v=1783128792
