ray-template/assets/@vueuse.a0b06385.js
chuan_wuhao d790dcb5bc 打包
2023-01-06 14:31:50 +08:00

2 lines
2.3 KiB
JavaScript

import{g as y,o as h,n as m,a as E,b,u as P,r as p,w as C}from"./@vue.6f9b3ecc.js";var v;const s=typeof window<"u",Q=e=>typeof e=="string",d=()=>{};s&&((v=window==null?void 0:window.navigator)==null?void 0:v.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function T(e){return typeof e=="function"?e():P(e)}function N(e){return e}function S(e){return E()?(b(e),!0):!1}function W(e,n=!0){y()?h(e):n?e():m(e)}function x(e){var n;const t=T(e);return(n=t==null?void 0:t.$el)!=null?n:t}const _=s?window:void 0;s&&window.document;s&&window.navigator;s&&window.location;function O(...e){let n,t,a,r;if(Q(e[0])?([t,a,r]=e,n=_):[n,t,a,r]=e,!n)return d;let i=d;const u=C(()=>x(n),l=>{i(),l&&(l.addEventListener(t,a,r),i=()=>{l.removeEventListener(t,a,r),i=d})},{immediate:!0,flush:"post"}),o=()=>{u(),i()};return S(o),o}const f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},c="__vueuse_ssr_handlers__";f[c]=f[c]||{};f[c];var w;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(w||(w={}));var L=Object.defineProperty,I=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,g=(e,n,t)=>n in e?L(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,U=(e,n)=>{for(var t in n||(n={}))H.call(n,t)&&g(e,t,n[t]);if(I)for(var t of I(n))B.call(n,t)&&g(e,t,n[t]);return e};const j={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]};U({linear:N},j);function z(e={}){const{window:n=_,initialWidth:t=1/0,initialHeight:a=1/0,listenOrientation:r=!0}=e,i=p(t),u=p(a),o=()=>{n&&(i.value=n.innerWidth,u.value=n.innerHeight)};return o(),W(o),O("resize",o,{passive:!0}),r&&O("orientationchange",o,{passive:!0}),{width:i,height:u}}export{z as u};