PageSourceSearch

https://cdn.buymeacoffee.com/static/prod/1070/build/assets/LightBox-D6Nm8wZP.js

js buymeacoffee.com collected 2026-10-01 06:30:19 UTC 2,390 bytes, 1 lines download raw bytes

1import{k as e}from"./dist-DiEP1Qns.js";import{D as t,On as n,Zn as r,_ as i,b as a,ct as o,ft as s,mt as c,o as l,rt as u,vn as d,y as f}from"./runtime-core.esm-bundler-BKdLzFmX.js";import{n as p}from"./Modal-B-U8Tfwa.js";import{t as m}from"./ModalClose-DHmSQDGj.js";import{t as h}from"./Arrow-BomPYjmh.js";var g={key:0,class:`absolute h-50 flex items-center`},_=[`aria-label`],v=[`src`],y=[`aria-label`],b=[`aria-label`],x={__name:`LightBox`,props:[`currentImageIndex`,`images`],emits:[`close`],setup(x,{emit:S}){let C=x,w=S,T=d(C.currentImageIndex),E=d(!1),D=`absolute cursor-pointer tw-scale-on-hover close-bg-transition hover:before:bg-white/10`;u(()=>{p.makeHtmlBodyFixed(),E.value=!0}),o(()=>{p.initCallBack(O,k,A),p.initNavKeyEvent()}),s(()=>{p.removeHtmlBodyFixed(),p.removeNavKeyEvent()});let O=()=>{E.value=!0,C.images.length-1===T.value&&(T.value=-1),T.value+=1},k=()=>{E.value=!0,T.value===0?T.value=C.images.length-1:(--T.value,C.images.length-1==0&&(T.value=C.images.length-1))},A=()=>{w(`close`)},j=()=>{setTimeout(()=>{E.value=!1},300)};return(o,s)=>(c(),a(`div`,{class:`z-50 fixed inset-0 overflow-y-scroll w-full h-full bg-black/50 fade-in-modal`,onClick:s[3]||=e(e=>o.$emit(`close`),[`self`])},[t(m,{onClick:s[0]||=e=>o.$emit(`close`),role:`button`,tabindex:`0`,"aria-label":o.$t(`lang.a11y.close_popup`),class:`w-8 h-8 fixed right-4 top-4 group tw-white-fill hover:before:bg-white/10 xs:top-2`,fillClass:`fill-white`,iconSize:{width:14,height:14}},null,8,[`aria-label`]),i(`div`,{class:`h-screen flex items-center`,onClick:s[2]||=e(e=>o.$emit(`close`),[`self`])},[i(`div`,{class:`w-4/5 mx-auto relative flex items-center justify-center`,onClick:s[1]||=e(e=>o.$emit(`close`),[`self`])},[n(E)?(c(),a(`div`,g,[i(`div`,{"aria-label":o.$t(`lang.a11y.circle_loader`),class:`tw-circle-loader tw-light-circle-loader w-8 h-8`},null,8,_)])):f(``,!0),i(`img`,{src:x.images[n(T)].src,class:r([n(E)?`opacity-0`:``,`max-w-full mx-auto max-h-[95vh] object-cover relative z-100 xs:w-4/5`]),onLoad:j},null,42,v)]),x.images.length>1?(c(),a(l,{key:0},[i(`div`,{class:r([`right-6 xs:right-3`,n(D)]),role:`button`,"aria-label":o.$t(`lang.a11y.next`),tabindex:`1`,onClick:O},[t(h)],10,y),i(`div`,{class:r([`left-6 xs:left-3`,n(D)]),role:`button`,"aria-label":o.$t(`lang.a11y.previous`),tabindex:`1`,onClick:k},[t(h,{class:`transform -rotate-180`})],10,b)],64)):f(``,!0)])]))}};export{x as t};

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.