1 |
- import{z as F,g as C,b0 as H,au as L,A as N,b as p,K as T,I as P,cd as Q,cE as W,cJ as R}from"./index-9831710d.js";var O;const g=typeof window<"u",Y=e=>typeof e=="function",x=e=>typeof e=="string",j=()=>{};g&&((O=window==null?void 0:window.navigator)!=null&&O.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function v(e){return typeof e=="function"?e():C(e)}function k(e){return e}function w(e){return Q()?(W(e),!0):!1}function q(e,t=!0){H()?L(e):t?e():N(e)}const z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,G=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g,B=(e,t,n,r)=>{let a=e<12?"AM":"PM";return r&&(a=a.split("").reduce((o,s)=>o+=`${s}.`,"")),n?a.toLowerCase():a},U=(e,t,n={})=>{var r;const a=e.getFullYear(),o=e.getMonth(),s=e.getDate(),i=e.getHours(),u=e.getMinutes(),c=e.getSeconds(),l=e.getMilliseconds(),d=e.getDay(),f=(r=n.customMeridiem)!=null?r:B,m={YY:()=>String(a).slice(-2),YYYY:()=>a,M:()=>o+1,MM:()=>`${o+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(s),DD:()=>`${s}`.padStart(2,"0"),H:()=>String(i),HH:()=>`${i}`.padStart(2,"0"),h:()=>`${i%12||12}`.padStart(1,"0"),hh:()=>`${i%12||12}`.padStart(2,"0"),m:()=>String(u),mm:()=>`${u}`.padStart(2,"0"),s:()=>String(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${l}`.padStart(3,"0"),d:()=>d,dd:()=>e.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>f(i,u),AA:()=>f(i,u,!1,!0),a:()=>f(i,u,!0),aa:()=>f(i,u,!0,!0)};return t.replace(G,(b,$)=>$||m[b]())},V=e=>{if(e===null)return new Date(NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match(z);if(t){const n=t[2]-1||0,r=(t[7]||"0").substring(0,3);return new Date(t[1],n,t[3]||1,t[4]||0,t[5]||0,t[6]||0,r)}}return new Date(e)};function le(e,t="HH:mm:ss",n={}){return F(()=>U(V(v(e)),v(t),n))}function K(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:a=!1}=n;let o=null;const s=p(!1);function i(){o&&(clearInterval(o),o=null)}function u(){s.value=!1,i()}function c(){const l=v(t);l<=0||(s.value=!0,a&&e(),i(),o=setInterval(e,l))}if(r&&g&&c(),T(t)||Y(t)){const l=P(t,()=>{s.value&&g&&c()});w(l)}return w(u),{isActive:s,pause:u,resume:c}}function X(e){var t;const n=v(e);return(t=n==null?void 0:n.$el)!=null?t:n}const y=g?window:void 0;function h(...e){let t,n,r,a;if(x(e[0])||Array.isArray(e[0])?([n,r,a]=e,t=y):[t,n,r,a]=e,!t)return j;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(l=>l()),o.length=0},i=(l,d,f,m)=>(l.addEventListener(d,f,m),()=>l.removeEventListener(d,f,m)),u=P(()=>[X(t),v(a)],([l,d])=>{s(),l&&o.push(...n.flatMap(f=>r.map(m=>i(l,f,m,d))))},{immediate:!0,flush:"post"}),c=()=>{u(),s()};return w(c),c}const _=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},S="__vueuse_ssr_handlers__";_[S]=_[S]||{};function Z(e,t={}){const{immediate:n=!0,window:r=y}=t,a=p(!1);let o=0,s=null;function i(l){if(!a.value||!r)return;const d=l-o;e({delta:d,timestamp:l}),o=l,s=r.requestAnimationFrame(i)}function u(){!a.value&&r&&(a.value=!0,s=r.requestAnimationFrame(i))}function c(){a.value=!1,s!=null&&r&&(r.cancelAnimationFrame(s),s=null)}return n&&u(),w(c),{isActive:R(a),pause:c,resume:u}}var J=Object.defineProperty,I=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,A=(e,t,n)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ne=(e,t)=>{for(var n in t||(t={}))ee.call(t,n)&&A(e,n,t[n]);if(I)for(var n of I(t))te.call(t,n)&&A(e,n,t[n]);return e};function ce(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=p(new Date),a=()=>r.value=new Date,o=n==="requestAnimationFrame"?Z(a,{immediate:!0}):K(a,n,{immediate:!0});return t?ne({now:r},o):r}var E;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(E||(E={}));var re=Object.defineProperty,D=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ae.call(t,n)&&M(e,n,t[n]);if(D)for(var n of D(t))se.call(t,n)&&M(e,n,t[n]);return e};const ie={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};oe({linear:k},ie);function fe(e={}){const{window:t=y,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:a=!0,includeScrollbar:o=!0}=e,s=p(n),i=p(r),u=()=>{t&&(o?(s.value=t.innerWidth,i.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,i.value=t.document.documentElement.clientHeight))};return u(),q(u),h("resize",u,{passive:!0}),a&&h("orientationchange",u,{passive:!0}),{width:s,height:i}}export{le as a,ce as b,fe as u};
|