PageSourceSearch

https://flowcel-56320.web.app/assets/FilmScene-DAAVa2_B.js

js flowcel-56320.web.app collected 2026-10-03 12:26:05 UTC 35,846 bytes, 35 lines download raw bytes

1import{r as x,j as m,f as Et}from"./vendor-BtmVyhJ5.js";import{j as dt,N as me,k as Ee,m as ve,W as Rt,w as It,n as ut,p as At,o as kt,q as Lt,f as z,r as ee,t as Oe}from"./HeroStickers-oetKEcGT.js";import{c as Be,R as Pt}from"./decodeFill-Ba8qjc0l.js";import{b as Ie,p as Ge,c as Ct,S as ft,u as Q,l as _t,e as Ae,E as V,M as $,a as Ue,a4 as Ft,F as mt,i as jt,t as Nt,n as Dt,r as Ot,a5 as Bt,a6 as Gt,a7 as Ut,a8 as $t,V as Ht,a9 as Wt,x as zt,o as qt,L as $e,U as Vt,q as Xt,A as Yt,I as Kt,G as He}from"./three-BjPUglsp.js";import{addFilmPass as Zt}from"./cylinderWarp-Cq5cDtdJ.js";const ke=[];function Qt(e,s){ke[e]=s}function Jt(e){return ke[e]??0}function en(){ke.length=0,Le=!1}let Le=!1;function oo(e){Le=e}function tn(){return Le}const nn=150,W=96,on=.52,sn=.4,an=5;function so(){const[e,s]=x.useState([]),a=x.useRef([]);return x.useEffect(()=>{const n=()=>s([...document.querySelectorAll("[data-nav-pill]")].map(t=>{const i=t.getBoundingClientRect(),r=getComputedStyle(t).backgroundColor,d=!r||r==="transparent"||r.startsWith("rgba(0, 0, 0, 0");return{x:Math.round(i.left),y:Math.round(i.top),w:Math.round(i.width),h:Math.round(i.height),fill:d?"#EAEAEA":r}}).filter(t=>t.w>0&&t.h>0).sort((t,i)=>i.x-t.x));return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),x.useEffect(()=>{if(!e.length)return;const n=window.matchMedia("(prefers-reduced-motion: reduce)").matches,t={x:-9999,y:-9999},i=c=>{t.x=c.clientX,t.y=c.clientY},r=()=>{t.x=-9999,t.y=-9999};window.addEventListener("pointermove",i,{passive:!0}),window.addEventListener("pointerleave",r);const d=e.map(()=>0),h=e.map(()=>0);let o=0;const l=c=>{o=requestAnimationFrame(l);const u=c*.001,p=dt()>=me[1]&&!n;e.forEach((f,g)=>{const v=a.current[g],S=v?.getContext("2d");if(!v||!S)return;const w=Math.max(f.x-t.x,0,t.x-(f.x+f.w)),E=Math.max(f.y-t.y,0,t.y-(f.y+f.h)),k=Math.hypot(w,E),P=p?1-Math.min(1,k/nn):0,R=p?1-Math.min(1,k/10):0;if(d[g]+=(P-d[g])*.12,h[g]+=(R-h[g])*(R>h[g]?.1:.07),Qt(g,h[g]),S.clearRect(0,0,v.width,v.height),d[g]<.01&&h[g]<.01)return;S.fillStyle=f.fill;const I=W,M=W,y=M+f.h/2,b=d[g]*(1-h[g]);if(b>.01){const L=I+Math.min(Math.max(t.x-f.x,0),f.w),C=M+Math.min(Math.max(t.y-f.y,0),f.h),F=L+(t.x-f.x+I-L)*.55,j=C+(t.y-f.y+M-C)*.55;for(let _=0;_<an;_++){const G=_*1.27,q=13+_*7%19,N=.6+.4*Math.sin(u*(.9+_%3*.35)+G*2),O=F+Math.cos(u*(.8+_*.13)+G)*q*N,K=j+Math.sin(u*(1.1+_*.09)+G)*q*.7*N,H=(7+_%4*2.6)*b;H<.4||(S.beginPath(),S.arc(O,K,H,0,Math.PI*2),S.fill())}const B=5*b;B>.4&&(S.beginPath(),S.arc(t.x-f.x+I,t.y-f.y+M,B,0,Math.PI*2),S.fill())}const T=h[g];if(T>.005){const L=f.h*on,C=f.h/2,F=Math.max(0,f.w-f.h),j=Math.max(2,Math.ceil(F/(f.h*sn))+1),B=t.x>f.x+f.w/2;for(let _=0;_<j;_++){const G=j>1?_/(j-1):.5,q=B?1-G:G,N=Math.max(0,Math.min(1,(T-G*.3)/.7));if(N<=0)continue;const O=N>.995,K=O?1:.9+.1*Math.sin(u*(1.7+_%3*.4)+_),H=L*N*K;if(H<.4)continue;const U=O?y:y+Math.sin(u*1.4+_*1.7)*f.h*.1*(1-N);S.beginPath(),S.arc(I+C+q*F,U,H,0,Math.PI*2),S.fill()}}})};return o=requestAnimationFrame(l),()=>{cancelAnimationFrame(o),window.removeEventListener("pointermove",i),window.removeEventListener("pointerleave",r),en()}},[e]),e.length?m.jsxs(m.Fragment,{children:[m.jsx("svg",{width:"0",height:"0",className:"absolute","aria-hidden":!0,children:m.jsx("defs",{children:m.jsxs("filter",{id:"nav-goo-fill",children:[m.jsx("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"7",result:"blur"}),m.jsx("feColorMatrix",{in:"blur",mode:"matrix",values:"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 20 -9",result:"goo"}),m.jsx("feBlend",{in:"SourceGraphic",in2:"goo"})]})})}),e.map((n,t)=>m.jsx("canvas",{"aria-hidden":!0,ref:i=>{a.current[t]=i},width:n.w+W*2,height:n.h+W*2,className:"pointer-events-none absolute z-[19]",style:{left:n.x-W,top:n.y-W,width:n.w+W*2,height:n.h+W*2,filter:"url(#nav-goo-fill)"}},`${n.x}-${n.y}-${n.w}`))]}):null}function rn(e,s){const a=[];for(const n of Rt){if(n.minVw&&e<n.minVw)continue;if(!n.from){a.push({id:n.id,d:It(n,e,s),kind:n.kind,at:n.at,out:n.out});continue}const t=[...document.querySelectorAll(n.from)].filter(l=>{const c=l.getBoundingClientRect();return c.width>0&&c.height>0});if(!t.length)continue;if(n.kind==="lines"){const l=t.map(c=>{const u=c.getBoundingClientRect(),p=u.bottom.toFixed(1);return`M${u.right.toFixed(1)} ${p}H${u.left.toFixed(1)}`}).join("");a.push({id:n.id,d:l,kind:n.kind,at:n.at,out:n.out,recede:n.recede,vanish:n.vanish});continue}t.sort((l,c)=>l.getBoundingClientRect().left-c.getBoundingClientRect().left);const[i,r]=n.at,d=(r-i)/t.length,[h,o]=n.pad??[12,8];t.forEach((l,c)=>{const u=l.getBoundingClientRect(),p=l.matches("a, button")?l:l.querySelector("a, button")??l,f=getComputedStyle(p),g=(p.textContent??"").trim(),v={x:u.left-h,y:u.top-o,w:u.width+h*2,h:u.height+o*2};a.push({id:`${n.id}-${c}`,kind:n.kind,recede:n.recede,vanish:n.vanish,d:n.kind==="rect"?ut(v):At(v.x,v.y,v.w,v.h),at:[i+d*c,i+d*(c+1)],text:g&&!n.mute?{label:g,c
1x:u.left+u.width/2,cy:u.top+u.height/2,family:f.fontFamily,size:f.fontSize,weight:f.fontWeight,spacing:f.letterSpacing==="normal"?"0px":f.letterSpacing,lit:f.color,rgb:ln(f.color),index:n.kind==="pill"?c:-1}:void 0})})}return a}const ie="rgba(6, 10, 32, 0.60)",cn=[6,10,32];function ln(e){const s=/(-?[\d.]+)[,\s]+(-?[\d.]+)[,\s]+(-?[\d.]+)/.exec(e);if(s)return[+s[1],+s[2],+s[3]];const a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.trim());return a?[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]:null}const We="2 3",ye=2,hn=1,dn=.05,un=.055,fn=.3,mn=200,ze=[0,1];function ao(){const e=x.useRef(null),[s,a]=x.useState(null);x.useEffect(()=>{const t=()=>a({w:window.innerWidth,h:window.innerHeight});t();const i=!matchMedia("(any-pointer: fine)").matches;let r=window.innerWidth;const d=()=>{const o=window.innerWidth;i&&o===r||(r=o,t())};window.addEventListener("resize",d);let h=!0;return document.fonts?.ready.then(()=>{h&&t()}),()=>{h=!1,window.removeEventListener("resize",d)}},[]),x.useEffect(()=>(window.__click={set:t=>ve(t),release:()=>ve(null),get:()=>Ee()},()=>{ve(null),delete window.__click}),[]);const n=x.useMemo(()=>s?rn(s.w,s.h):[],[s]);return x.useEffect(()=>{const t=e.current;if(!t||!s)return;const i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,r=n.map(S=>t.querySelector(`[data-reveal="${S.id}"]`)),d=n.map(S=>t.querySelector(`[data-wire="${S.id}"]`)),h=n.map(S=>t.querySelector(`[data-word="${S.id}"]`)),o=t.querySelector('[data-wire="frame"]'),l=t.querySelector('[data-reveal="frame"]'),c=t.querySelector("[data-reveal-box]"),u=ze.map(S=>t.querySelector(`[data-ring="${S}"]`)),p=!matchMedia("(any-pointer: fine)").matches,f=(S,w)=>{const E=z((w-ee[0])/(ee[1]-ee[0])),P=p?((M,y,b)=>{const T=Math.min(1,Math.max(0,(b-M)/(y-M)));return T*T*(3-2*T)})(.1,.3,w):0;if(t.style.opacity=P>0?(1-P).toFixed(3):"",w>0){const M=kt(s.w,s.h);for(let y=0;y<u.length;y++){const b=u[y];if(!b)continue;const T=(w-(dn+y*un))/fn;if(T<=0||T>=1){b.style.opacity="0";continue}const L=1-Math.pow(1-T,2.6);b.setAttribute("cx",M.x.toFixed(1)),b.setAttribute("cy",M.y.toFixed(1)),b.setAttribute("r",(4+L*mn).toFixed(1)),b.style.opacity=(.5*(1-T)*(1-T)).toFixed(3)}}else for(const M of u)M&&(M.style.opacity="0");const R=Lt(S,s.w,s.h),I=ut(R);o&&o.setAttribute("d",I),l&&l.setAttribute("d",I),c&&(c.setAttribute("x",String(R.x)),c.setAttribute("y",String(R.y)),c.setAttribute("width",String(Math.max(0,R.w))),c.setAttribute("height",String(Math.max(0,R.h))));for(let M=0;M<n.length;M++){const y=n[M],b=r[M];if(b){const[F,j]=y.at,B=z((S-F)/(j-F));b.style.strokeDashoffset=String(1-B)}const T=tn()&&(y.kind==="pill"||y.id.startsWith("nav-mark")),L=d[M];if(L){const F=y.out?z((S-y.out[0])/(y.out[1]-y.out[0])):0,j=y.vanish?1-E:y.recede?1-.74*E:1;L.style.opacity=T?"0":String((1-F)*j)}const C=h[M];if(C&&y.text){C.style.opacity=T?"0":String(z((S-me[0])/(me[1]-me[0])));const F=y.text.rgb;if(F){const j=Math.max(0,Math.min(1,(Jt(y.text.index)-.25)/.4)),B=cn.map((_,G)=>Math.round(_+(F[G]-_)*j));C.style.fill=`rgba(${B[0]}, ${B[1]}, ${B[2]}, ${(.6+.4*j).toFixed(3)})`}}}};if(i){f(1,1);return}let g=0;const v=()=>{g=requestAnimationFrame(v),f(dt(),Ee())};return g=requestAnimationFrame(v),()=>cancelAnimationFrame(g)},[s,n]),s?m.jsxs("svg",{ref:e,"aria-hidden":!0,className:"pointer-events-none absolute inset-0 z-[19] h-full w-full",width:s.w,height:s.h,viewBox:`0 0 ${s.w} ${s.h}`,fill:"none",children:[m.jsxs("defs",{children:[n.map(t=>m.jsx("mask",{id:`wire-${t.id}`,maskUnits:"userSpaceOnUse",x:0,y:0,width:s.w,height:s.h,children:m.jsx("path",{"data-reveal":t.id,d:t.d,stroke:"#fff",strokeWidth:ye+4,fill:"none",pathLength:1,strokeDasharray:1,strokeDashoffset:1,strokeLinecap:"butt"})},t.id)),m.jsx("clipPath",{id:"wire-reveal",clipPathUnits:"userSpaceOnUse",children:m.jsx("rect",{"data-reveal-box":!0,x:0,y:0,width:0,height:0})})]}),ze.map(t=>m.jsx("circle",{"data-ring":t,cx:0,cy:0,r:0,fill:"none",stroke:ie,strokeWidth:1,opacity:0},`ring-${t}`)),n.filter(t=>t.kind==="frame").map(t=>m.jsx("path",{"data-wire":t.id,d:t.d,mask:`url(#wire-${t.id})`,stroke:ie,strokeWidth:ye,strokeDasharray:We,strokeLinecap:"butt"},t.id)),m.jsxs("g",{clipPath:"url(#wire-reveal)",children:[n.filter(t=>t.kind!=="frame").map(t=>{const i=t.kind==="rect"||t.kind==="pill";return m.jsx("path",{"data-wire":t.id,d:t.d,mask:`url(#wire-${t.id})`,stroke:ie,strokeWidth:i?ye:hn,strokeDasharray:i?We:void 0,strokeLinecap:"butt"},t.id)}),n.map(t=>t.text?m.jsx("text",{"data-word":t.id,x:t.text.cx,y:t.text.cy,textAnchor:"middle",dominantBaseline:"central",fill:ie,opacity:0,style:{fontFamily:t.text.family,fontSize:t.text.size,fontWeight:t.text.weight,letterSpacing:t.text.spacing,transform:`translateX(calc(${t.text.spacing} / 2))`},children:t.text.label},`w-${t.id}`):null)]})]}):null}const qe=["We design and build","the things people","remember."],Ve="See the work  →",pn=["Design &","Development"],Xe="A studio for innovative solutions & immersive design — we help you stand out & scale.",Ye=e=>[ee[0]+e*Oe,ee[1]+e*Oe],gn=e=>[.02+e*.05,.46+e*.05];function ro(){const e=x.useRef(null),s=x.useRef(null),a=x.useRef(null);return x.useEffect(()=>{const n=e.current,t=s.current,i=a.current;if(!n||!t||!i)return;const r=Be(t,{window:gn,ease:z}),d=Be(i,{window:Ye,ease:z}),h=n.querySelector("[data-hero-meta]"),o=f=>
1{if(!h)return;const[g,v]=Ye(qe.length),S=z((f-g)/(v-g));h.style.pointerEvents=S>.6?"auto":"none"};if(matchMedia("(prefers-reduced-motion: reduce)").matches){r.paint(1,!1),d.paint(1,!1),o(1);return}let l=0,c=0,u=performance.now();const p=f=>{l=requestAnimationFrame(p),c+=Math.min((f-u)/1e3,.1),u=f;const g=c>=1/Pt;g&&(c=0);const v=Ee();r.paint(v,g),d.paint(v,g),o(v)};return l=requestAnimationFrame(p),()=>cancelAnimationFrame(l)},[]),m.jsxs("div",{ref:e,className:"pointer-events-none absolute inset-0 z-[19]",children:[m.jsxs("div",{ref:s,className:"absolute left-[5vw] top-[clamp(74px,13.5vh,116px)] grid w-[90vw] grid-cols-2 gap-x-[5vw] md:grid-cols-[30.5fr_30.5fr_30fr] md:gap-x-0",children:[m.jsx("div",{"data-hero-lead":!0,className:"w-fit max-w-[42vw] font-display text-[clamp(17px,2.34vw,44px)] font-medium leading-[1.25] tracking-[-0.018em] md:max-w-[26vw]",children:pn.map(n=>m.jsxs("span",{"data-hero-lead-line":!0,className:"relative block w-fit whitespace-nowrap",children:[m.jsx("span",{className:"text-transparent",children:n}),m.jsx("span",{"aria-hidden":!0,"data-decode-fill":!0,"data-text":n,className:"absolute left-0 top-0 whitespace-pre"})]},n))}),m.jsxs("p",{"data-hero-note":!0,className:"relative m-0 max-w-[46vw] font-mono text-[clamp(11px,1.25vw,17px)] font-light uppercase leading-[1.5] tracking-[0.055em] md:max-w-[27.5vw]",children:[m.jsx("span",{className:"text-transparent",children:Xe}),m.jsx("span",{"aria-hidden":!0,"data-decode-fill":!0,"data-text":Xe.toUpperCase(),className:"absolute left-0 top-0 whitespace-pre-wrap"})]})]}),m.jsxs("div",{ref:a,className:"absolute bottom-[clamp(120px,17vh,180px)] left-[5vw] flex flex-col items-start md:bottom-[clamp(56px,9vh,96px)]",children:[qe.map(n=>m.jsxs("span",{"data-hero-line":!0,className:"relative block w-fit whitespace-nowrap font-display text-[min(7.2vw,30px)] font-extrabold uppercase leading-[0.99] tracking-[-0.022em] md:text-[max(4.5vw,34px)]",children:[m.jsx("span",{className:"text-transparent",children:n}),m.jsx("span",{"aria-hidden":!0,"data-decode-fill":!0,"data-text":n.toUpperCase(),className:"absolute left-0 top-0 whitespace-pre"})]},n)),m.jsxs(Et,{to:"/work","data-hero-meta":!0,style:{pointerEvents:"none"},className:"relative mt-[6vh] block w-fit px-[22px] py-[14px] font-mono text-[clamp(10px,1.05vw,13px)] uppercase tracking-[0.16em]",children:[m.jsx("span",{className:"whitespace-pre text-transparent",children:Ve}),m.jsx("span",{"aria-hidden":!0,"data-decode-fill":!0,"data-text":Ve.toUpperCase(),className:"absolute left-[22px] top-[14px] whitespace-pre"})]})]})]})}const D={electric:"#1E14E6",mid:"#5A62E8",ink:"#0B0736",porcelain:"#EDF0F5",haze:"#9BA3EE",signal:"#FF6B6B",go:"#7CFFB0"},xn={color:"#F4F6FB",metalness:1,roughness:.06,envMapIntensity:2.4},wn={color:"#C9CEDC",metalness:1,roughness:.26,envMapIntensity:1.7},pt={metalness:.12,roughness:.3,clearcoat:1,clearcoatRoughness:.05,envMapIntensity:.45},Mn=.07,te=.022,Pe=26,pe={depth:Mn,bevelEnabled:!0,bevelThickness:te,bevelSize:te,bevelSegments:4,curveSegments:Pe};function gt(e,s,a){const n=new Ie,t=e/2,i=s/2,r=Math.min(a,t,i);return n.moveTo(-t+r,-i),n.lineTo(t-r,-i),n.quadraticCurveTo(t,-i,t,-i+r),n.lineTo(t,i-r),n.quadraticCurveTo(t,i,t-r,i),n.lineTo(-t+r,i),n.quadraticCurveTo(-t,i,-t,i-r),n.lineTo(-t,-i+r),n.quadraticCurveTo(-t,-i,-t+r,-i),n.closePath(),n}function Ke(e){const s=new Ie,a=Math.PI*2/8,n=Math.PI/8;for(let t=0;t<8;t++){const i=n+t*a,r=Math.cos(i)*e,d=Math.sin(i)*e;t===0?s.moveTo(r,d):s.lineTo(r,d)}return s.closePath(),s}function Ze(e,s,a,n=!1){const t=new Ie,i=n?-1:1,r=e/2,d=s/2,h=s*.18;return t.moveTo(i*(-r+h),-d),t.lineTo(i*(r-a),-d),t.lineTo(i*r,0),t.lineTo(i*(r-a),d),t.lineTo(i*(-r+h),d),t.lineTo(i*-r,d-h),t.lineTo(i*-r,-d+h),t.closePath(),t}function Se(e,s,a=te){const n=s.getPoints(Pe);let t=1/0,i=-1/0,r=1/0,d=-1/0;for(const l of n)l.x<t&&(t=l.x),l.x>i&&(i=l.x),l.y<r&&(r=l.y),l.y>d&&(d=l.y);const h=i-t+a*2,o=d-r+a*2;return e.wrapS=Ge,e.wrapT=Ge,e.repeat.set(1/h,1/o),e.offset.set(-(t-a)/h,-(r-a)/o),e.needsUpdate=!0,e}function Ce(e){const s=e.getPoints(Pe);let a=1/0,n=-1/0,t=1/0,i=-1/0;for(const r of s)r.x<a&&(a=r.x),r.x>n&&(n=r.x),r.y<t&&(t=r.y),r.y>i&&(i=r.y);return{w:n-a+te*2,h:i-t+te*2}}const Qe=320,ne='"Archivo Variable", Archivo, "Helvetica Neue", "Arial Black", Arial, sans-serif';let ge=null;function _e(e,s){const a=ge??document.createElement("canvas");return ge=null,a.width=Math.max(64,Math.round(e*Qe)),a.height=Math.max(64,Math.round(s*Qe)),a}const Je=new WeakMap;function we(e){const s=Je.get(e);if(s)return s.needsUpdate=!0,s;const a=new Ct(e);
1return a.colorSpace=ft,a.anisotropy=8,a.needsUpdate=!0,Je.set(e,a),a}function et(e,s){ge=e.image;const a=s();return ge=null,a}function Fe(e,s,a,n,t,i,r){let d=n;for(let h=0;h<40&&(e.font=`${t} ${d}px ${i}`,"letterSpacing"in e&&(e.letterSpacing=`${r*d}px`),!(e.measureText(s).width<=a));h++)d*=.94;return d}function vn(e,s,a={}){const{w:n,h:t}=Ce(e),i=a.bg??D.electric,r=a.fg??D.porcelain,d=_e(n,t),h=d.getContext("2d");h.fillStyle=i,h.fillRect(0,0,d.width,d.height);const o=d.height*.11;h.strokeStyle=r,h.globalAlpha=.5,h.lineWidth=Math.max(2,d.height*.018),h.strokeRect(o,o,d.width-o*2,d.height-o*2),h.globalAlpha=1;const l=Fe(h,s,d.width*.74,d.height*.46,800,ne,.06);if(h.fillStyle=r,h.textAlign="center",h.textBaseline="middle",h.font=`800 ${l}px ${ne}`,h.fillText(s,d.width/2,d.height/2),a.bolts!==!1){const c=d.height*.045;h.fillStyle="rgba(0,0,0,0.55)";for(const u of[o*1.5,d.width-o*1.5])h.beginPath(),h.arc(u,d.height/2,c,0,Math.PI*2),h.fill()}return we(d)}function yn(e,s,a,n){e.save(),e.globalAlpha=.16,e.fillStyle="#000000";for(let t=0;t<a;t+=n)e.fillRect(0,t,s,Math.max(1,n*.34));e.restore()}function ce(e,s){const a=Math.sin(e*127.1+s*311.7)*43758.5453;return a-Math.floor(a)}const je=8,Ne=44,tt=210,Sn=430,le=.5,he=-.35,nt=1400;function xt(e,s,a,n,t){const i=e/Ne,r=i/je,d=i*Math.PI*2+t,h=Math.sin(Math.PI*(.1+.8*r)),o=tt*h*Math.cos(d),l=tt*h*Math.sin(d),c=(r-.5)*Sn,u=c*Math.cos(le)+l*Math.sin(le),p=l*Math.cos(le)-c*Math.sin(le),f=o*Math.cos(he)-u*Math.sin(he),g=o*Math.sin(he)+u*Math.cos(he),v=nt/(nt+p);return[s+f*v*n,a+g*v*n]}function ot(e,s,a,n,t,i,r,d,h=0,o=1){const l=je*Ne,c=Math.floor(Math.max(0,Math.min(1,h))*l),u=Math.ceil(Math.max(0,Math.min(1,o))*l);if(!(u-c<2)){e.save(),e.globalAlpha=r,e.strokeStyle=i,e.lineWidth=d,e.lineJoin="round",e.lineCap="round",e.beginPath();for(let p=c;p<=u;p++){const[f,g]=xt(p,s,a,n,t);p===c?e.moveTo(f,g):e.lineTo(f,g)}e.stroke(),e.restore()}}function Tn(e,s,a,n,t,i,r,d,h){const u=g=>{const v=g/208*8,S=Math.floor(v),w=v-S,E=Math.PI/8+S*Math.PI*2/8,k=Math.PI/8+(S+1)*Math.PI*2/8,P=s+Math.cos(E)*n,R=a+Math.sin(E)*n,I=s+Math.cos(k)*n,M=a+Math.sin(k)*n;return[P+(I-P)*w,R+(M-R)*w]},p=Math.floor(Math.max(0,Math.min(1,d))*208),f=Math.ceil(Math.max(0,Math.min(1,h))*208);if(!(f-p<2)){e.save(),e.globalAlpha=i,e.strokeStyle=t,e.lineWidth=r,e.lineJoin="miter",e.lineCap="round",e.beginPath();for(let g=p;g<=f;g++){const[v,S]=u(g);g===p?e.moveTo(v,S):e.lineTo(v,S)}return e.stroke(),e.restore(),u(f)}}function st(e,s,a,n,t,i,r,d){const[h,o]=xt(Math.max(0,Math.min(1,i))*je*Ne,s,a,n,t);e.save(),e.globalAlpha=d,e.fillStyle=D.electric,e.shadowColor=D.mid,e.shadowBlur=r*3,e.beginPath(),e.arc(h,o,r,0,Math.PI*2),e.fill(),e.restore()}function at(e){return 1-Math.pow(1-e,3)}function Te(e){const s=e<0?0:e>1?1:e;return s*s*(3-2*s)}function xe(e,s){"letterSpacing"in e&&(e.letterSpacing=`${s}px`)}function rt(e,s=0,a=0,n=!0,t=0,i){const{w:r,h:d}=Ce(e),h=_e(r,d),o=h.getContext("2d"),l=h.width,c=h.height,u=Math.min(1,Math.max(0,s)),p=Math.min(1,Math.max(0,a)),f=Math.min(1,Math.max(0,t)),g=i?.word??1,v=Math.min(1,Math.max(0,i?.play??0)),w=n&&u>0&&Math.sin(u*Math.PI*9)>-.35?"STOP":"START",E=o.createLinearGradient(0,0,l*.4,c);E.addColorStop(0,"#F4F6FA"),E.addColorStop(1,"#D6DAE4"),o.fillStyle=E,o.fillRect(0,0,l,c);const k=Math.min(1,Math.max(0,i?.warp??0));if(k>.002&&i?.warpSrc){const M=i.warpSrc,y="width"in M?Number(M.width):l,b="height"in M?Number(M.height):c,T=Math.min(y,b);o.save(),o.globalAlpha=k,o.fillStyle="#04040A",o.fillRect(0,0,l,c),o.drawImage(M,(y-T)/2,(b-T)/2,T,T,0,0,l,c),o.restore()}if(f>0){const M=Te(f/.55),y=Te((f-.55)/.21),b=Te((f-.76)/.24),T=Math.max(1.5,l*.009),L=T*(1+y*3.4),C=Tn(o,l/2,c/2,l*.4,D.electric,.92*(1-b),L,0,M);f<.55&&C&&(o.save(),o.fillStyle=D.electric,o.shadowColor=D.mid,o.shadowBlur=T*3,o.beginPath(),o.arc(C[0],C[1],T*1.3,0,Math.PI*2),o.fill(),o.restore())}if(p>0){const M=l/2,y=c*.5,b=l*.0013,T=Math.max(1,l*.0042),L=p*5.5,C=p<.42?at(p/.42):1,F=p<.78?0:at((p-.78)/.22);if(ot(o,M,y,b,L,D.electric,.4,T,F,C),p<.42)st(o,M,y,b,L,C,T*1.9,.9);else if(p<.82){const j=(p-.42)/.4;ot(o,M,y,b,L,D.mid,.95,T*2,Math.max(0,j-.14),j),st(o,M,y,b,L,j,T*1.6,.85)}}const P=Fe(o,"START",l*.66,l*.22,800,ne,.04),R=Math.max(1,P*g);if(g>.001){if(o.font=`800 ${R}px ${ne}`,xe(o,R*.04),o.textAlign="center",o.textBaseline="middle",v>.004){const M=o.measureText(w).width/2,y=R*.42,b=l/2-M-y*1.5;o.save(),o.globalAlpha=v,o.fillStyle="#15161D",o.beginPath(),o.moveTo(b+y*.62,c/2),o.lineTo(b-y*.44,c/2-y*.78),o.lineTo(b-y*.44,c/2+y*.78),o.closePath(),o.fill(),o.restore(
1)}if(u>0){const M=Math.sin(u*Math.PI)*R*.09;o.globalAlpha=.55,o.fillStyle="#00C4D6",o.fillText(w,l/2-M,c/2),o.fillStyle="#FF2E6B",o.fillText(w,l/2+M,c/2),o.globalAlpha=1}o.fillStyle="#15161D",o.fillText(w,l/2,c/2),xe(o,0)}if(yn(o,l,c,Math.max(3,Math.round(c/190))),u>0){const y=Math.sin(u*Math.PI)*l*.055;for(let b=0;b<7;b++){const T=Math.floor(u*60)*7+b;if(ce(T,11)>.55)continue;const L=ce(T,3)*c,C=c*(.012+ce(T,5)*.05),F=(ce(T,7)-.5)*2*y;o.drawImage(h,0,L,l,C,F,L,l,C)}}const I=o.createRadialGradient(l/2,c/2,l*.26,l/2,c/2,l*.58);return I.addColorStop(0,"rgba(0,0,0,0)"),I.addColorStop(1,"rgba(0,0,0,0.22)"),o.fillStyle=I,o.fillRect(0,0,l,c),we(h)}function it(e,s=0){const{w:a,h:n}=Ce(e),t=_e(a,n),i=t.getContext("2d"),r=t.width,d=t.height;i.fillStyle=D.electric,i.fillRect(0,0,r,d);const h="ARCHIVE / WORK / ",o=d*.34;i.font=`700 ${o}px ${ne}`,xe(i,o*.14);const l=i.measureText(h).width,c=(s*l*5%l+l)%l;i.fillStyle=D.porcelain,i.textAlign="left",i.textBaseline="middle";const u=Math.ceil(r/l)+2;for(let p=-1;p<u;p++)i.fillText(h,p*l-c,d*.52);return xe(i,0),we(t)}const ct='"Archivo Variable", Archivo, system-ui, sans-serif';function io(e){const s=document.createElement("canvas");s.width=1920,s.height=1080;const a=s.getContext("2d");a.fillStyle="#050509",a.fillRect(0,0,s.width,s.height);const n=Math.min(190,...e.map(r=>Fe(a,r,s.width*.82,190,500,ct,0)));a.fillStyle=D.porcelain,a.textAlign="center",a.textBaseline="middle",a.font=`500 ${n}px ${ct}`;const t=n*1.16,i=s.height/2-(e.length-1)*t/2;return e.forEach((r,d)=>a.fillText(r,s.width/2,i+d*t)),we(s)}function bn(){return typeof document>"u"||!("fonts"in document)?Promise.resolve():document.fonts.ready.then(()=>{})}const de={value:0,frozen:!1,vel:0,velFrozen:!1,quad:null,fill:0,covered:!1,portal:0,wordsDone:!1,runwayVh:8.8,resync:!1},En=.3,Rn=1.02,In=.6;function wt(e){return e<0?0:e>1?1:e}function An(e,s,a){const n=wt((a-e)/(s-e));return n*n*(3-2*n)}function co(e,s,a){return e<In?0:a?1:An(En,Rn,s)}const kn=.14,Ln=18,Pn=1.6;function Cn(e){return Math.pow(wt(e/kn),Pn)*Ln}const Y={x:0,y:0};let lt=!1,ue=!1;function _n(){if(lt||typeof window>"u")return;lt=!0;const e=window.matchMedia("(prefers-reduced-motion: reduce)");ue=e.matches,e.addEventListener?.("change",s=>{ue=s.matches,ue&&(Y.x=0,Y.y=0)}),window.addEventListener("pointermove",s=>{if(ue||s.pointerType&&s.pointerType!=="mouse")return;const a=Math.max(window.innerWidth,1),n=Math.max(window.innerHeight,1);Y.x=s.clientX/a*2-1,Y.y=s.clientY/n*2-1},{passive:!0})}function Fn(e,s,a=5){const n=1-Math.exp(-s*a);return e.x+=(Y.x-e.x)*n,e.y+=(Y.y-e.y)*n,e}const J=[{t:0,label:"REST",pos:[-14.1,-4.6,26.2],target:[-8.5,.2,15],roll:.05},{t:.34,label:"ALIGN",pos:[1.6,-4.1,24],target:[0,17,-42],roll:.05},{t:.72,label:"TRAVEL",pos:[0,1.5,-18],target:[0,9,-70],roll:-.045},{t:1,label:"PUNCH",pos:[0,11,-63],target:[0,14,-70],roll:0}];function jn(e){const s=Math.min(1,Math.max(0,e));let a=0;for(;a<J.length-2&&s>J[a+1].t;)a++;const n=J[a],t=J[a+1],i=t.t-n.t||1,r=(s-n.t)/i,d=(h,o)=>[h[0]+(o[0]-h[0])*r,h[1]+(o[1]-h[1])*r,h[2]+(o[2]-h[2])*r];return{pos:d(n.pos,t.pos),target:d(n.target,t.target),roll:n.roll+(t.roll-n.roll)*r}}const X={value:0,frozen:!1};function lo(){const{camera:e}=Q(),s=x.useRef(new _t),a=x.useRef({x:0,y:0});return x.useEffect(()=>{_n()},[]),x.useEffect(()=>(window.__hero=Object.assign(window.__hero??{},{setProgress:n=>{X.value=Math.min(1,Math.max(0,n)),X.frozen=!0},get:()=>X.value,beats:()=>J.map(({t:n,label:t})=>({t:n,label:t})),release:()=>{X.frozen=!1}}),()=>{delete window.__hero}),[]),Ae((n,t)=>{const{pos:i,target:r,roll:d}=jn(X.value);Fn(a.current,t);const h=(1-de.portal)*(1-Math.min(1,de.value*4));let o=i[0],l=i[1],c=i[2];if(de.value>0){const f=r[0]-o,g=r[1]-l,v=r[2]-c,S=Math.hypot(f,g,v)||1,w=Cn(de.value);o+=f/S*w,l+=g/S*w,c+=v/S*w}const u=a.current.x*1.1*h,p=-a.current.y*.45*h;e.position.set(o+u,l+p,c),s.current.set(r[0]+(o-i[0]),r[1]+(l-i[1]),r[2]+(c-i[2])),e.lookAt(s.current),e.rotateZ(d)}),null}function ht(e,s){const a=Math.sin(e*127.1+s*311.7)*43758.5453;return a-Math.floor(a)}const A={pole:{rTop:.3,rBottom:.38,height:15,y:0},namePlate:{w:3.9,h:.92,r:.16,pos:[0,5.9,.36],rot:[0,-.1,-.035],text:"STUDIO BREZ"},start:{radius:1.95,pos:[-.36,3.5,-1.4],rot:[0,-Math.PI/2,0]},directional:{w:4.3,h:1,tip:.58,pos:[-.55,.9,-1.63],rot:[0,-Math.PI/2,0]},light:{w:1.6,h:4.2,depth:.6,pos:[1.62,2.5,-.02],rot:[0,-.14,0],lensR:.5,lenses:[{color:D.signal,lit:.22},{color:D.ink,lit:0},{color:D.go,lit:1.45}]}};function Nn(){return new $({...xn})}function Dn(){return new $({...wn})}function On(){return new $({color:"#E7E1D8",metalness:.06,roughness:.38,clearcoat:.35,clearcoatRoughness:.3,envMapIntensity:.25})}function Z({y:e,reach:s,side:a,poleR:n,collar:t=!0,arm:i=!0}){const r=x.useMemo(()=>Dn(),[]);return m.jsxs("group",{position:[0,e,0],children:[t&&m.jsx("mesh",{material:r,rotation:[Math.PI/2,0,0],children:m.jsx("torusGeometry",{args:[n+.05,.062,14,36]})}),i&&m.jsxs(m.Fragment,{children:[m.jsx("mesh",{material:r,position:[a*s/2,0,.06],rotation:[0,0,Math.PI/2],children:m.jsx("cylinderGeometry",{args:[.055,.055,s,16]})}),m.jsx("mesh",{material:r,position:[a*s*.96,0,.06],rotation:[Math.PI/2,0,0],children:m.jsx("cylinderGeometry",{args:[.1,.1,.09,20]})})]})]})}function Bn(){const e=A.light,s=x.useMemo(()=>new $({...pt,color:"#23242B"}),[]),a=x.useMemo(()=>new $({color:"#F5F7FB",metalness:.5,roughness:.12,envMapIntensity:1.8,clearcoat:1,clearcoatRoughness:.04,side:Ft}),[]),n=x.useMemo(()=>new $({color:"#08080C",metalness:.2,roughness:.7,envMapIntensity:.15,side:mt}),[]),t=x.useMemo(()=>new $({color:"#0A0A12",metalness:.9,roughness:.35}),[]),i=e.h/3,r=x.useMemo(()=>{const h=gt(e.w,i-.11,.34),o=new V(h,{...pe,depth:e.depth,bevelThickness:.09,bevelSize:.09,bevelSegments:7});o.computeBoundingBox();const l=o.boundingBox,c=l.max.z-l.min.z,u=o.attributes.position;for(let p=0;p<u.count;
1p++){const g=1-.3*(1-(u.getZ(p)-l.min.z)/c);u.setX(p,u.getX(p)*g),u.setY(p,u.getY(p)*g)}return u.needsUpdate=!0,o.computeVertexNormals(),o},[e.w,i,e.depth]),d=x.useMemo(()=>{const h=e.lensR*1.06,o=new jt(h,e.lensR*1,.14,44,1,!0);o.rotateX(Math.PI/2);const l=o.attributes.position;for(let c=0;c<l.count;c++){if(l.getZ(c)<=0)continue;const u=(l.getY(c)/h+1)/2;l.setZ(c,l.getZ(c)+.3*u)}return l.needsUpdate=!0,o.computeVertexNormals(),o},[e.lensR]);return x.useEffect(()=>()=>{r.dispose(),d.dispose()},[r,d]),m.jsx("group",{children:e.lenses.map((h,o)=>{const l=i*(1-o);return m.jsxs("group",{position:[0,l,0],children:[m.jsx("mesh",{geometry:r,material:s,castShadow:!0,receiveShadow:!0}),m.jsxs("group",{position:[0,0,e.depth+.02],children:[m.jsx("mesh",{material:t,rotation:[Math.PI/2,0,0],children:m.jsx("cylinderGeometry",{args:[e.lensR*1.2,e.lensR*1.2,.06,32]})}),m.jsx("mesh",{geometry:d,material:a,position:[0,0,.09]}),m.jsx("mesh",{geometry:d,material:n,position:[0,0,.09]}),m.jsxs("mesh",{position:[0,0,.12],scale:[1,1,.78],children:[m.jsx("sphereGeometry",{args:[e.lensR,40,28]}),m.jsx("meshPhysicalMaterial",{color:h.color,emissive:h.color,emissiveIntensity:h.lit,roughness:.08,metalness:0,clearcoat:1,clearcoatRoughness:.03})]})]})]},o)})})}function ho(){const[e,s]=x.useState(!1);x.useEffect(()=>{let O=!0;return bn().then(()=>O&&s(!0)),()=>{O=!1}},[]);const a=x.useMemo(()=>gt(A.namePlate.w,A.namePlate.h,A.namePlate.r),[]),n=.055,t=.03,i=x.useMemo(()=>Ke(A.start.radius),[]),r=x.useMemo(()=>Ke(A.start.radius-n),[]),d=x.useMemo(()=>Ze(A.directional.w,A.directional.h,A.directional.tip,!0),[]),h=x.useMemo(()=>Ze(A.directional.w-t*2,A.directional.h-t*2,A.directional.tip-t,!0),[]),o=x.useMemo(()=>new V(a,pe),[a]),l=x.useMemo(()=>new V(i,{...pe,depth:.1,bevelSize:n,bevelThickness:n,bevelSegments:6}),[i]),c=x.useMemo(()=>new V(r,{depth:.05,bevelEnabled:!1,curveSegments:26}),[r]),u=x.useMemo(()=>new V(d,{...pe,bevelSize:t,bevelThickness:t,bevelSegments:6}),[d]),p=x.useMemo(()=>new V(h,{depth:.05,bevelEnabled:!1,curveSegments:26}),[h]);x.useEffect(()=>()=>{o.dispose(),l.dispose(),c.dispose(),u.dispose(),p.dispose()},[o,l,c,u,p]);const f=x.useMemo(()=>Se(vn(a,A.namePlate.text,{bg:D.electric,fg:D.porcelain}),a),[a,e]),g=x.useMemo(()=>Se(rt(r),r,0),[r,e]),v=x.useMemo(()=>Se(it(h,0),h,0),[h,e]),S=.42,w=x.useRef(0),E=x.useRef(!1),k=x.useRef(!1),P=x.useRef(-1),R=x.useRef({kind:null,at:-1}),I=x.useRef(0),M=.42,y=1.8,b=1.5,T=["stop","flicker","coil","ring"];Ae((O,K)=>{if(X.value>S)return;w.current+=K;const H=w.current;et(v,()=>it(h,H*.06));const U=R.current;let oe=0,se=0,ae=0;if(U.kind){const bt=U.kind==="coil"?y:U.kind==="ring"?b:M,re=(H-U.at)/bt;re>=1?U.kind=null:U.kind==="coil"?se=re:U.kind==="ring"?ae=re:oe=re}const Me=oe>0||se>0||ae>0,De=se>0||ae>0?Math.floor(H*24):0;(Me||k.current)&&(k.current=Me,(oe>0||De!==P.current||!Me)&&(P.current=De,et(g,()=>rt(r,oe,se,U.kind==="stop",ae))))});const L=()=>
1{if(E.current||R.current.kind)return;const O=++I.current;ht(O,17)<.28||(R.current={kind:T[Math.floor(ht(O,29)*T.length)%T.length],at:w.current})};x.useEffect(()=>()=>{f.dispose(),g.dispose(),v.dispose()},[f,g,v]);const C=x.useMemo(()=>On(),[]),F=x.useMemo(()=>Nn(),[]),j=O=>new $({...pt,map:O}),B=O=>new $({map:O,emissive:new Ue("#FFFFFF"),emissiveMap:O,emissiveIntensity:.82,metalness:0,roughness:.14,clearcoat:1,clearcoatRoughness:.03,envMapIntensity:.22}),_=x.useMemo(()=>j(f),[f]),G=x.useMemo(()=>new $({map:g,emissive:new Ue("#FFFFFF"),emissiveMap:g,emissiveIntensity:.55,metalness:.12,roughness:.045,clearcoat:1,clearcoatRoughness:.012,envMapIntensity:.95}),[g]),q=x.useMemo(()=>B(v),[v]),N=A.pole;return m.jsxs("group",{children:[m.jsx("mesh",{position:[0,N.y,0],material:C,castShadow:!0,receiveShadow:!0,children:m.jsx("cylinderGeometry",{args:[N.rTop,N.rBottom,N.height,48]})}),m.jsx(Z,{y:A.namePlate.pos[1],reach:1.5,side:1,poleR:N.rTop}),m.jsx("group",{position:A.namePlate.pos,rotation:A.namePlate.rot,children:m.jsx("mesh",{geometry:o,material:_,castShadow:!0,receiveShadow:!0})}),m.jsx(Z,{y:A.start.pos[1],reach:.32,side:-1,poleR:N.rTop,arm:!1}),m.jsxs("group",{position:A.start.pos,rotation:A.start.rot,children:[m.jsx("mesh",{geometry:l,material:F,castShadow:!0,receiveShadow:!0}),m.jsx("mesh",{geometry:c,material:G,position:[0,0,.108],onPointerOver:()=>{L(),E.current=!0},onPointerOut:()=>{E.current=!1}})]}),m.jsx(Z,{y:A.directional.pos[1],reach:.32,side:-1,poleR:N.rBottom,arm:!1}),m.jsxs("group",{position:A.directional.pos,rotation:A.directional.rot,children:[m.jsx("mesh",{geometry:u,material:F,castShadow:!0,receiveShadow:!0}),m.jsx("mesh",{geometry:p,material:q,position:[0,0,.053]})]}),m.jsx(Z,{y:A.light.pos[1]+A.light.h/3,reach:1.35,side:1,poleR:N.rTop}),m.jsx(Z,{y:A.directional.pos[1],reach:1.35,side:1,poleR:N.rBottom,collar:!1}),m.jsx("group",{position:A.light.pos,rotation:A.light.rot,children:m.jsx(Bn,{})})]})}const Mt=[],uo=[`Built to innovate in a
2digital landscape changing
3faster than ever.`,`Bold ideas, brought to life
4through brand strategy and
5full-stack development.`,`Crafting high-quality products
6and solutions that help
7businesses keep up and scale.`,`& designing experiences that
8turn audiences into customers.`],fo=Mt.length+1,Re=Mt.length,mo=`
9`;function po(e){const s=e.reduce((n,t)=>n+t.length,0);let a=0;return e.map(n=>[...n].map(t=>({ch:t===" "?" ":t,r:s>1?a++/(s-1):0})))}const vt=720,go=.22,yt=vt,St=2600,Tt=vt,Gn=900,Un=yt+St+Tt,$n=Un+Gn,Hn=5600,Wn=e=>e===Re?Hn:St,zn=e=>yt+Wn(e)+Tt,xo=$n*Re+zn(Re),wo={from:.775,to:1},Mo=.995,vo=1500,yo=1.4,So=.85,To=.12,fe=(e,s,a)=>e<s?s:e>a?a:e,be=.008,qn=3.2,Vn=.26,Xn=.985;function bo(e,s=0,a,n){const t=n?.omega??qn,i=n?.vmax??Vn,r=n?.maxLag??0;let d=0,h=0,o=0,l=0,c=0,u=!1;const p=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,f=v=>{let S=0,w=1/0;for(let E=0;E<e.length;E++){const k=Math.abs(e[E]-v);k<w&&(w=k,S=E)}return S};return{advance:(v,S)=>{if(p)return;const w=fe(v,0,1);if(!u){u=!0,d=w,l=w,c=w,o=f(w);return}if(v>1.12||v<-.05){d=w,h=0,l=w,c=w,o=f(w);return}const E=w>l+1e-6?1:w<l-1e-6?-1:0;if(l=w,E>0)for(;o<e.length-1&&w>e[o]+be;)o++,c=w;if(E<0)for(;o>0&&w<e[o]-be;)o--,c=w;if(s>0&&(E>0&&o<e.length-1&&w-c>s?(o++,c=w):E<0&&o>0&&c-w>s&&(o--,c=w)),s>0)e[o]<w-be&&(o=f(w),c=w);else{let y=0;for(;y<e.length-1&&e[y+1]<=w;)y++;(o<y||o>y+1)&&(o=f(w))}const k=w>=Xn?2.2:1,P=t*k,R=e[o]-d,I=P*P*R-2*P*h;let M=i*k;r>0&&(M=Math.max(M,Math.abs(w-d)/r)),M=Math.min(M,Math.abs(R)*t*.9+.015),h=fe(h+I*S,-M,M),d=fe(d+h*S,0,1),Math.abs(e[o]-d)<1e-4&&Math.abs(h)<.001&&(d=e[o],h=0)},value:v=>p||!u?fe(v,0,1):d,vel:()=>h,target:()=>e[o]}}const Yn=`
10in vec3 position;
11out vec2 vUv;
12void main(){ vUv = position.xy * 0.5 + 0.5; gl_Position = vec4(position.xy, 0.0, 1.0); }`,Kn=`
13precision highp float;
14in vec2 vUv;
15uniform sampler2D u_tex;
16uniform vec2 u_shift;
17out vec4 o;
18void main(){
19  /* THE SCENE TRAVELS WITH ITS SECTION.
20
21     The shared canvas is position:fixed, so on its own this pass would paint
22     the same full-viewport picture whatever the page did — and a section
23     scrolling in underneath would ride UP OVER a stationary render instead of
24     the render leaving with it. That is precisely what the CTA's glass fall
25     started doing the moment it moved onto this renderer: its own canvas used
26     to live inside the sticky box and scroll away with it.
27
28     So the caller hands over how far its box has moved and the sample is
29     shifted to match. Sampling OUTSIDE the target has to yield nothing rather
30     than the clamped edge row, or the last row of the scene would smear down
31     the whole screen behind it. */
32  vec2 uv = vUv - u_shift;
33  vec2 inside = step(vec2(0.0), uv) * step(uv, vec2(1.0));
34  o = texture(u_tex, uv) * inside.x * inside.y;
35}`;function Zn(e){const s=new Nt(2,2),a=new Dt,n=new Ot,t=new Bt({glslVersion:Wt,vertexShader:Yn,fragmentShader:Kn,uniforms:{u_tex:{value:null},u_shift:{value:new Ht}},depthTest:!1,depthWrite:!1,transparent:!0,blending:$t,blendSrc:Ut,blendDst:Gt}),i=new zt(s,t);i.frustumCulled=!1,n.add(i);let r=null,d=0,h=0;function o(l,c){const u=Math.max(1,Math.round(l)),p=Math.max(1,Math.round(c));r&&u===d&&p===h||(d=u,h=p,r?.dispose(),r=new qt(u,p,{format:Xt,type:Vt,minFilter:$e,magFilter:$e,depthBuffer:!0,stencilBuffer:!1,generateMipmaps:!1,samples:0}
35),r.texture.colorSpace=ft,r.isXRRenderTarget=!0,t.uniforms.u_tex.value=r.texture)}return{fit:o,setOffset(l,c){t.uniforms.u_shift.value.set(0,-l/Math.max(1,c))},get target(){return r},draw(){r&&e.render(n,a)},dispose(){r?.dispose(),r=null,s.dispose(),t.dispose()}}}function Eo({active:e,offset:s,toneMapping:a=Yt}){const n=Q(c=>c.gl),t=Q(c=>c.scene),i=Q(c=>c.camera),r=Q(c=>c.advance),d=x.useMemo(()=>Zn(n),[n]),h=x.useRef(e);h.current=e;const o=x.useRef(s);o.current=s;const l=x.useRef(i);return l.current=i,Ae(()=>{const c=d.target;c&&(n.setRenderTarget(c),n.clear(),n.render(t,l.current),n.setRenderTarget(null))},1),x.useEffect(()=>{let c=0;const u=Zt({active:()=>h.current(),prepare:p=>{d.fit(n.domElement.width,n.domElement.height);const f=n.getPixelRatio()||1;d.setOffset(o.current?.()??0,n.domElement.height/f);const g=n.toneMapping;n.toneMapping=a,c+=p,r(c,!1),n.toneMapping=g},draw:()=>{d.draw()}});return()=>{u(),d.dispose()}},[n,r,d,a]),x.useEffect(()=>{if(h.current())return;let c=!1;const u=()=>{c||(async()=>{const g=n.toneMapping,v=n.getRenderTarget(),S=n.autoClear;try{d.fit(n.domElement.width,n.domElement.height);const w=d.target;if(!w)return;const E=async(R,I)=>{for(const M of[...t.children]){if(c)return;I?.(!0),R();const y=n.compileAsync(M,l.current,t);n.setRenderTarget(v),n.toneMapping=g,I?.(!1),await y}};if(await E(()=>{n.setRenderTarget(w),n.toneMapping=a}),c)return;const k=()=>{n.setRenderTarget(null),n.toneMapping=Kt};if(await E(k),c)return;const P=[];if(t.traverse(R=>{const I=R.material;I&&I.transmission>0&&I.side===He&&P.push(I)}),P.length&&(await E(k,R=>{for(const I of P)I.side=R?mt:He,I.needsUpdate=!0}),c))return;n.setRenderTarget(w),n.toneMapping=a,n.autoClear=!0,n.clear(),n.render(t,l.current)}catch{}finally{n.setRenderTarget(v),n.toneMapping=g,n.autoClear=S}})()},p=window.requestIdleCallback,f=p?p(u,{timeout:1e4}):window.setTimeout(u,4e3);return()=>{c=!0;const g=window.cancelIdleCallback;p&&g?g(f):window.clearTimeout(f)}},[n,t,d,a]),null}export{_n as A,Fn as B,Mo as C,oo as D,xn as E,Eo as F,pt as G,ao as H,gt as I,io as J,X as K,So as L,de as M,so as N,co as O,pe as P,uo as Q,To as R,yt as S,te as T,lo as U,ho as V,ro as a,Se as b,Mt as c,mo as d,$n as e,bn as f,Gn as g,Tt as h,Wn as i,Re as j,wt as k,zn as l,rt as m,fo as n,Ke as o,go as p,An as q,et as r,po as s,wo as t,yo as u,vo as v,xo as w,D as x,bo as y,On as z};

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.