");function me(e){let n,t,i;const[s]=N();return W(()=>{Q().then(r=>{i=r}).catch(r=>{console.log(r)}),n?.addEventListener("load",()=>{A(n),A(t),s().index!==e.ij.index?(i.set(n,{opacity:1}),i.set(t,{opacity:0})):(i.to(n,{opacity:1,delay:.5,duration:.5,ease:"power3.out"}),i.to(t,{opacity:0,duration:.5,ease:"power3.in"}))},{once:!0,passive:!0})}),(()=>{var r=Se(),l=r.firstChild,a=l.nextSibling,o=n;typeof o=="function"?m(o,l):n=l,de(l,ge(()=>e.load&&{src:e.ij.hiUrl},{get height(){return e.ij.hiImgH},get width(){return e.ij.hiImgW},get"data-src"(){return e.ij.hiUrl},get alt(){return e.ij.alt},style:{opacity:0}}),!1);var f=t;return typeof f=="function"?m(f,a):t=a,d(a,()=>e.loadingText),r})()}var Ie=O("
/
");function ie(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ke(e){const[n]=N(),t=q(()=>B(n().index+1)),i=q(()=>B(n().length)),s=()=>{e.isAnimating()||e.setIsOpen(!1)};return(()=>{var r=Ie(),l=r.firstChild,a=l.firstChild,o=a.nextSibling,f=o.nextSibling,g=f.nextSibling,u=g.nextSibling,$=u.nextSibling,_=$.nextSibling,w=_.nextSibling,S=w.nextSibling,v=l.nextSibling;return d(a,()=>t()[0]),d(o,()=>t()[1]),d(f,()=>t()[2]),d(g,()=>t()[3]),d($,()=>i()[0]),d(_,()=>i()[1]),d(w,()=>i()[2]),d(S,()=>i()[3]),v.$$keydown=s,v.$$click=s,d(v,()=>ie(e.closeText)),r})()}J(["click","keydown"]);var je=O("
"),Te=O("
"),Pe=O("
");function Ce(e){return e.length<2?e:[...new Set(e)]}async function Le(){return(await he(()=>import("./BP5ETi.js"),[])).Swiper}function Ee(e){let n,t,i,s,r;const l=ie(e.loadingText);let a=-1,o=!1,f="none";const[g,{setIndex:u}]=N(),[$,_]=D(!1),[w,S]=Oe(Array(e.ijs.length).fill(!1)),v=()=>{!$()||!o||(e.setIsAnimating(!0),A(i),A(s),n.to(i,{opacity:1,duration:1}),n.to(s,{y:0,ease:"power3.inOut",duration:1,delay:.4}),setTimeout(()=>{e.setScrollable(!1),e.setIsAnimating(!1)},1200))},se=()=>{e.setIsAnimating(!0),A(s),A(i),n.to(s,{y:"100%",ease:"power3.inOut",duration:1}),n.to(i,{opacity:0,duration:1.2,delay:.4}),setTimeout(()=>{e.setScrollable(!0),e.setIsAnimating(!1),a=-1},1400)},re=()=>{let c=[];const h=g(),k=h.index,j=Math.min(k+1,h.length-1),T=Math.max(k-1,0);switch(f){case"next":c=[j];break;case"prev":c=[T];break;case"none":c=[k,j,T];break}S(Ce(c),!0)},le=c=>{re(),t.slideTo(c,0)};return W(()=>{window.addEventListener("touchstart",()=>{Q().then(c=>{n=c}).catch(c=>{console.log(c)}),Le().then(c=>{A(r),t=new c(r,{spaceBetween:20}),t.on("slideChange",({realIndex:h})=>{u(h)})}).catch(c=>{console.log(c)}),_(!0)},{once:!0,passive:!0}),o=!0}),U(G(()=>{g()},()=>{const c=g().index;c!==a&&(a===-1?f="none":c
a?f="next":f="none",le(c),a=c)})),U(G(()=>{e.isOpen()},()=>{e.isAnimating()||(e.isOpen()?v():se())},{defer:!0})),[(()=>{var c=je(),h=c.firstChild,k=h.firstChild,j=s;typeof j=="function"?m(j,c):s=c;var T=r;return typeof T=="function"?m(T,h):r=h,d(k,b(Z,{get when(){return $()},get children(){return b(Y,{get each(){return e.ijs},children:(ae,oe)=>(()=>{var z=Pe();return d(z,b(me,{get load(){return w[oe()]},ij:ae,loadingText:l})),z})()})}})),d(c,b(ke,{get closeText(){return e.closeText},get isAnimating(){return e.isAnimating},get setIsOpen(){return e.setIsOpen}}),null),c})(),(()=>{var c=Te(),h=i;return typeof h=="function"?m(h,c):i=c,c})()]}function Re(e){const[n,t]=D(!1),[i,s]=D(!1);return b(Z,{get when(){return e.ijs.length>0},get children(){return[b(be,{get ijs(){return e.ijs},isAnimating:i,isOpen:n,setIsOpen:t}),b(Ee,{get ijs(){return e.ijs},get closeText(){return e.closeText},get loadingText(){return e.loadingText},isAnimating:i,setIsAnimating:s,isOpen:n,setIsOpen:t,get setScrollable(){return e.setScrollable}})]}})}export{Re as default};