1import{z as g,j as s,r as i,l as d,V as n,x as u,a as f,b as m,N as b,o as _,_ as x}from"#entry";import{S as y}from"./UtbS8P_R.js";const v=g({__name:"Parallax",props:{speed:{type:Number,default:1},position:{type:String,default:""},horizontal:{type:Boolean,default:!1}},setup(p){s.registerPlugin(y.ScrollTrigger);const o=p,l=i(),e=i();let t=null;d(()=>{c()});const c=()=>{const r=n.windowHeight*o.speed*.1,a=n.windowHeight*o.speed*.05;o.horizontal?(t=s.timeline({scrollTrigger:{trigger:o.position==="top"?document.body:e.value,start:o.position==="top"?"top top":"top bottom",end:"bottom top",scrub:!0,horizontal:!0}}),t.fromTo(e.value,{x:o.position==="top"?0:-r},{x:r,ease:"none"})):(t=s.timeline({scrollTrigger:{trigger:o.position==="top"?document.body:l.value,start:o.position==="top"?"top top":"top bottom",end:"bottom top",scrub:!0}}),t.fromTo(e.value,{y:o.position==="top"?0:-a},{y:a,ease:"none"}))};return u(async()=>{t&&(t.scrollTrigger.disable(),t.scrollTrigger.kill(),t.kill(),t=null)}),(r,a)=>(_(),f("div",{class:"parallax",ref_key:"trigger",ref:l},[m("div",{class:"target",ref_key:"target",ref:e},[b(r.$slots,"default",{},void 0,!0)],512)],512))}}),S=x(v,[["__scopeId","data-v-f353ba71"]]);export{S as default};
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.