import{u as ae,af as le,ag as ie,g as Q,A as k,n as ce,a as y,k as S,r as N,b as D,w as ue,s as fe}from"./swiper-vue.f1c78fdf.js";function $(e){return le()?(ie(e),!0):!1}function b(e){return typeof e=="function"?e():ae(e)}const K=typeof window<"u",E=()=>{};function U(e,t){function n(...r){return new Promise((o,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(s)})}return n}function ve(e,t={}){let n,r,o=E;const s=l=>{clearTimeout(l),o(),o=E};return l=>{const c=b(e),i=b(t.maxWait);return n&&s(n),c<=0||i!==void 0&&i<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((u,f)=>{o=t.rejectOnCancel?f:u,i&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,u(l())},i)),n=setTimeout(()=>{r&&s(r),r=null,u(l())},c)})}}function de(e,t=!0,n=!0,r=!1){let o=0,s,a=!0,l=E,c;const i=()=>{s&&(clearTimeout(s),s=void 0,l(),l=E)};return f=>{const v=b(e),d=Date.now()-o,m=()=>c=f();return i(),v<=0?(o=Date.now(),m()):(d>v&&(n||!a)?(o=Date.now(),m()):t&&(c=new Promise((g,h)=>{l=r?h:g,s=setTimeout(()=>{o=Date.now(),a=!0,g(m()),i()},Math.max(0,v-d))})),!n&&!s&&(s=setTimeout(()=>a=!0,v)),a=!1,c)}}function pe(e,t=200,n={}){return U(ve(t,n),e)}function he(e,t=200,n=!1,r=!0,o=!1){return U(de(t,n,r,o),e)}function me(e,t=!0){Q()?k(e):t?e():ce(e)}function P(e){var t;const n=b(e);return(t=n==null?void 0:n.$el)!=null?t:n}const R=K?window:void 0,ge=K?window.navigator:void 0;function W(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=R):[t,n,r,o]=e,!t)return E;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(u=>u()),s.length=0},l=(u,f,v,d)=>(u.addEventListener(f,v,d),()=>u.removeEventListener(f,v,d)),c=D(()=>[P(t),b(o)],([u,f])=>{a(),u&&s.push(...n.flatMap(v=>r.map(d=>l(u,v,d,f))))},{immediate:!0,flush:"post"}),i=()=>{c(),a()};return $(i),i}function we(){const e=y(!1);return Q()&&k(()=>{e.value=!0}),e}function A(e){const t=we();return S(()=>(t.value,!!e()))}function be(e,t={}){const{window:n=R}=t,r=A(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const s=y(!1),a=i=>{s.value=i.matches},l=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",a):o.removeListener(a))},c=ue(()=>{r.value&&(l(),o=n.matchMedia(b(e)),"addEventListener"in o?o.addEventListener("change",a):o.addListener(a),s.value=o.matches)});return $(()=>{c(),l(),o=void 0}),s}var j=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,Se=(e,t)=>{var n={};for(var r in e)ye.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&j)for(var r of j(e))t.indexOf(r)<0&&_e.call(e,r)&&(n[r]=e[r]);return n};function Te(e,t,n={}){const r=n,{window:o=R}=r,s=Se(r,["window"]);let a;const l=A(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},i=S(()=>Array.isArray(e)?e.map(v=>P(v)):[P(e)]),u=D(i,v=>{if(c(),l.value&&o){a=new ResizeObserver(t);for(const d of v)d&&a.observe(d,s)}},{immediate:!0,flush:"post",deep:!0}),f=()=>{c(),u()};return $(f),{isSupported:l,stop:f}}function Oe(e,t={width:0,height:0},n={}){const{window:r=R,box:o="content-box"}=n,s=S(()=>{var c,i;return(i=(c=P(e))==null?void 0:c.namespaceURI)==null?void 0:i.includes("svg")}),a=y(t.width),l=y(t.height);return Te(e,([c])=>{const i=o==="border-box"?c.borderBoxSize:o==="content-box"?c.contentBoxSize:c.devicePixelContentBoxSize;if(r&&s.value){const u=P(e);if(u){const f=r.getComputedStyle(u);a.value=Number.parseFloat(f.width),l.value=Number.parseFloat(f.height)}}else if(i){const u=Array.isArray(i)?i:[i];a.value=u.reduce((f,{inlineSize:v})=>f+v,0),l.value=u.reduce((f,{blockSize:v})=>f+v,0)}else a.value=c.contentRect.width,l.value=c.contentRect.height},n),D(()=>P(e),c=>{a.value=c?t.width:0,l.value=c?t.height:0}),{width:a,height:l}}const B=1;function De(e,t={}){const{throttle:n=0,idle:r=200,onStop:o=E,onScroll:s=E,offset:a={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:i=R}=t,u=y(0),f=y(0),v=S({get(){return u.value},set(p){m(p,void 0)}}),d=S({get(){return f.value},set(p){m(void 0,p)}});function m(p,_){var I,M,T;if(!i)return;const x=b(e);x&&((T=x instanceof Document?i.document.body:x)==null||T.scrollTo({top:(I=b(_))!=null?I:d.value,left:(M=b(p))!=null?M:v.value,behavior:b(c)}))}const g=y(!1),h=N({left:!0,right:!1,top:!0,bottom:!1}),w=N({left:!1,right:!1,top:!1,bottom:!1}),L=p=>{g.value&&(g.value=!1,w.left=!1,w.right=!1,w.top=!1,w.bottom=!1,o(p))},se=pe(L,n+r),V=p=>{if(!i)return;const _=p===i?p.document.documentElement:p===i.document?p.documentElement:p,{display:I,flexDirection:M}=getComputedStyle(_),T=_.scrollLeft;w.left=T<u.value,w.right=T>u.value;const x=Math.abs(T)<=0+(a.left||0),C=Math.abs(T)+_.clientWidth>=_.scrollWidth-(a.right||0)-B;I==="flex"&&M==="row-reverse"?(h.left=C,h.right=x):(h.left=x,h.right=C),u.value=T;let O=_.scrollTop;p===i.document&&!O&&(O=i.document.body.scrollTop),w.top=O<f.value,w.bottom=O>f.value;const H=Math.abs(O)<=0+(a.top||0),F=Math.abs(O)+_.clientHeight>=_.scrollHeight-(a.bottom||0)-B;I==="flex"&&M==="column-reverse"?(h.top=F,h.bottom=H):(h.top=H,h.bottom=F),f.value=O},z=p=>{if(!i)return;const _=p.target===i.document?p.target.documentElement:p.target;V(_),g.value=!0,se(p),s(p)};return W(e,"scroll",n?he(z,n,!0,!1):z,l),W(e,"scrollend",L,l),{x:v,y:d,isScrolling:g,arrivedState:h,directions:w,measure(){const p=b(e);i&&p&&V(p)}}}var Ee=Object.defineProperty,G=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,Y=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X=(e,t)=>{for(var n in t||(t={}))Le.call(t,n)&&Y(e,n,t[n]);if(G)for(var n of G(t))xe.call(t,n)&&Y(e,n,t[n]);return e};function We(e={},t={}){const{navigator:n=ge}=t,r=n,o=A(()=>r&&"canShare"in r);return{isSupported:o,share:async(a={})=>{if(o.value){const l=X(X({},b(e)),b(a));let c=!0;if(l.files&&r.canShare&&(c=r.canShare({files:l.files})),c)return r.share(l)}}}}function $e(e,t){const{containerStyle:n,wrapperProps:r,scrollTo:o,calculateRange:s,currentList:a,containerRef:l}="itemHeight"in t?Ie(t,e):Re(t,e);return{list:a,scrollTo:o,containerProps:{ref:l,onScroll:()=>{s()},style:n},wrapperProps:r}}function q(e){const t=y(null),n=Oe(t),r=y([]),o=fe(e);return{state:y({start:0,end:10}),source:o,currentList:r,size:n,containerRef:t}}function J(e,t,n){return r=>{if(typeof n=="number")return Math.ceil(r/n);const{start:o=0}=e.value;let s=0,a=0;for(let l=o;l<t.value.length;l++){const c=n(l);if(s+=c,a=l,s>r)break}return a-o}}function Z(e,t){return n=>{if(typeof t=="number")return Math.floor(n/t)+1;let r=0,o=0;for(let s=0;s<e.value.length;s++){const a=t(s);if(r+=a,r>=n){o=s;break}}return o+1}}function ee(e,t,n,r,{containerRef:o,state:s,currentList:a,source:l}){return()=>{const c=o.value;if(c){const i=n(e==="vertical"?c.scrollTop:c.scrollLeft),u=r(e==="vertical"?c.clientHeight:c.clientWidth),f=i-t,v=i+u+t;s.value={start:f<0?0:f,end:v>l.value.length?l.value.length:v},a.value=l.value.slice(s.value.start,s.value.end).map((d,m)=>({data:d,index:m+s.value.start}))}}}function te(e,t){return n=>typeof e=="number"?n*e:t.value.slice(0,n).reduce((o,s,a)=>o+e(a),0)}function ne(e,t,n){D([e.width,e.height,t],()=>{n()})}function re(e,t){return S(()=>typeof e=="number"?t.value.length*e:t.value.reduce((n,r,o)=>n+e(o),0))}const Pe={horizontal:"scrollLeft",vertical:"scrollTop"};function oe(e,t,n,r){return o=>{r.value&&(r.value[Pe[e]]=n(o),t())}}function Re(e,t){const n=q(t),{state:r,source:o,currentList:s,size:a,containerRef:l}=n,c={overflowX:"auto"},{itemWidth:i,overscan:u=5}=e,f=J(r,o,i),v=Z(o,i),d=ee("horizontal",u,v,f,n),m=te(i,o),g=S(()=>m(r.value.start)),h=re(i,o);ne(a,t,d);const w=oe("horizontal",d,m,l),L=S(()=>({style:{height:"100%",width:`${h.value-g.value}px`,marginLeft:`${g.value}px`,display:"flex"}}));return{scrollTo:w,calculateRange:d,wrapperProps:L,containerStyle:c,currentList:s,containerRef:l}}function Ie(e,t){const n=q(t),{state:r,source:o,currentList:s,size:a,containerRef:l}=n,c={overflowY:"auto"},{itemHeight:i,overscan:u=5}=e,f=J(r,o,i),v=Z(o,i),d=ee("vertical",u,v,f,n),m=te(i,o),g=S(()=>m(r.value.start)),h=re(i,o);ne(a,t,d);const w=oe("vertical",d,m,l),L=S(()=>({style:{width:"100%",height:`${h.value-g.value}px`,marginTop:`${g.value}px`}}));return{calculateRange:d,scrollTo:w,containerStyle:c,wrapperProps:L,currentList:s,containerRef:l}}function Ae(e={}){const{window:t=R,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:s=!0}=e,a=y(n),l=y(r),c=()=>{t&&(s?(a.value=t.innerWidth,l.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),me(c),W("resize",c,{passive:!0}),o){const i=be("(orientation: portrait)");D(i,()=>c())}return{width:a,height:l}}export{Ae as a,De as b,We as c,$e as u};
