1import{N as E,aA as n}from"./BuZu9ToP.js";const v=(i,l=5e3)=>new Promise(t=>{const o=i.querySelector("img"),p=i.querySelector("video"),a=setTimeout(()=>t(),l);o?o.complete?(clearTimeout(a),t()):(o.addEventListener("load",()=>{clearTimeout(a),t()},{once:!0}),o.addEventListener("error",()=>{clearTimeout(a),t()},{once:!0})):p?p.readyState>=3?(clearTimeout(a),t()):(p.addEventListener("canplay",()=>{clearTimeout(a),t()},{once:!0}),p.addEventListener("error",()=>{clearTimeout(a),t()},{once:!0})):(clearTimeout(a),t())}),b=(i,l=0,t=0)=>{const o="polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)";switch(i){case"center":return{start:"polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%)",end:o};case"bottomToTop":return{start:"polygon(0% 100%, 100% 100%, 100% 100%, 0% 100%)",end:o};case"topToBottom":return{start:"polygon(0% 0%, 100% 0%, 100% 0%, 0% 0%)",end:o};case"squareUp":return{start:"polygon(40% 100%, 60% 100%, 60% 100%, 40% 100%)",end:o};default:return{start:`polygon(${l}% ${t}%, ${l}% ${t}%, ${l}% ${t}%, ${l}% ${t}%)`,end:o}}},O=(i,l={})=>{const{duration:t=1.8,delay:o=.3,preset:p="center",startX:a=0,startY:g=0,fallbackColor:T="var(--color-beige-light)",waitForMedia:w=!1,mediaFadeDuration:S=.5,onComplete:P}=l,h="power3.inOut",{$scroll:k}=E();return{play:async()=>{if(!i.value)return null;const r=n.timeline({onComplete:()=>{k?.unlock(),P?.()}}),c=i.value,u=c.querySelector(".SanityImage, .SanityMedia, img, video, picture"),s=document.querySelector(".AppHeader"),y=document.querySelector("body > .AppHeader-nav.--sticky");s&&n.set(s,{clearProps:"clipPath"}),y&&n.set(y,{clearProps:"clipPath"});const{start:m,end:f}=b(p,a,g);n.set(c,{backgroundColor:T}),u&&n.set(u,{opacity:0});let d=m;if(s){const C=s.getBoundingClientRect(),q=window.scrollY||window.pageYOffset,Y=C.top+q,A=window.innerHeight,$=e=>(A*e/100-Y)/C.height*100;switch(p){case"center":{const e=$(50);d=`polygon(50% ${e}%, 50% ${e}%, 50% ${e}%, 50% ${e}%)`;break}case"bottomToTop":{const e=$(100);d=`polygon(0% ${e}%, 100% ${e}%, 100% ${e}%, 0% ${e}%)`;break}case"topToBottom":{const e=$(0);d=`polygon(0% ${e}%, 100% ${e}%, 100% ${e}%, 0% ${e}%)`;break}case"squareUp":{const e=$(100);d=`polygon(40% ${e}%, 60% ${e}%, 60% ${e}%, 40% ${e}%)`;break}default:{const e=$(g);d=`polygon(${a}% ${e}%, ${a}% ${e}%, ${a}% ${e}%, ${a}% ${e}%)`;break}}}return w&&await v(c),r.fromTo(c,{clipPath:m},{clipPath:f,ease:h,duration:t,delay:o,overwrite:!0},0),r.fromTo(c,{opacity:0},{opacity:1,ease:"power1.inOut",duration:.8,delay:o},0),r.fromTo(c.querySelector(".SanityImage"),{scale:1.2},{scale:1,ease:"power3.out",duration:2,delay:o},0),s&&r.fromTo(s,{clipPath:d},{clipPath:f,ease:h,duration:t,delay:o,clearProps:"clipPath"},0),y&&r.fromTo(y,{clipPath:d},{clipPath:f,ease:h,duration:t,delay:o},0),u&&(w?r.to(u,{opacity:1,ease:"power1.inOut",duration:S},o):v(c).then(()=>{n.to(u,{opacity:1,ease:"power1.inOut",duration:S})})),r},skipToEnd:()=>
1{if(!i.value)return;const r=i.value,c=r.querySelector(".SanityImage, .SanityMedia, img, video, picture"),u=document.querySelector(".AppHeader"),s=document.querySelector("body > .AppHeader-nav.--sticky"),{end:y}=b(p,a,g);n.set(r,{clipPath:y,opacity:1,backgroundColor:T}),c&&n.set(c,{opacity:1});const m=r.querySelector(".SanityImage");m&&n.set(m,{scale:1}),u&&n.set(u,{clearProps:"clipPath"}),s&&n.set(s,{clearProps:"clipPath"}),k?.unlock(),P?.()}}};export{O as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.