mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-05 19:42:07 +08:00
2 lines
20 KiB
JavaScript
2 lines
20 KiB
JavaScript
var qt=typeof global=="object"&&global&&global.Object===Object&&global,$r=typeof self=="object"&&self&&self.Object===Object&&self,b=qt||$r||Function("return this")(),v=b.Symbol,Vt=Object.prototype,Or=Vt.hasOwnProperty,wr=Vt.toString,L=v?v.toStringTag:void 0;function Sr(t){var r=Or.call(t,L),e=t[L];try{t[L]=void 0;var n=!0}catch{}var a=wr.call(t);return n&&(r?t[L]=e:delete t[L]),a}var Ar=Object.prototype,jr=Ar.toString;function xr(t){return jr.call(t)}var Pr="[object Null]",Ir="[object Undefined]",mt=v?v.toStringTag:void 0;function A(t){return t==null?t===void 0?Ir:Pr:mt&&mt in Object(t)?Sr(t):xr(t)}function j(t){return t!=null&&typeof t=="object"}var Er="[object Symbol]";function K(t){return typeof t=="symbol"||j(t)&&A(t)==Er}function Zt(t,r){for(var e=-1,n=t==null?0:t.length,a=Array(n);++e<n;)a[e]=r(t[e],e,t);return a}var _=Array.isArray,Cr=1/0,$t=v?v.prototype:void 0,Ot=$t?$t.toString:void 0;function Jt(t){if(typeof t=="string")return t;if(_(t))return Zt(t,Jt)+"";if(K(t))return Ot?Ot.call(t):"";var r=t+"";return r=="0"&&1/t==-Cr?"-0":r}var Fr=/\s/;function Mr(t){for(var r=t.length;r--&&Fr.test(t.charAt(r)););return r}var Nr=/^\s+/;function Lr(t){return t&&t.slice(0,Mr(t)+1).replace(Nr,"")}function y(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}var wt=NaN,Dr=/^[-+]0x[0-9a-f]+$/i,Br=/^0b[01]+$/i,Ur=/^0o[0-7]+$/i,Rr=parseInt;function St(t){if(typeof t=="number")return t;if(K(t))return wt;if(y(t)){var r=typeof t.valueOf=="function"?t.valueOf():t;t=y(r)?r+"":r}if(typeof t!="string")return t===0?t:+t;t=Lr(t);var e=Br.test(t);return e||Ur.test(t)?Rr(t.slice(2),e?2:8):Dr.test(t)?wt:+t}function Qt(t){return t}var zr="[object AsyncFunction]",Gr="[object Function]",Hr="[object GeneratorFunction]",Kr="[object Proxy]";function kt(t){if(!y(t))return!1;var r=A(t);return r==Gr||r==Hr||r==zr||r==Kr}var k=b["__core-js_shared__"],At=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Wr(t){return!!At&&At in t}var Xr=Function.prototype,Yr=Xr.toString;function x(t){if(t!=null){try{return Yr.call(t)}catch{}try{return t+""}catch{}}return""}var qr=/[\\^$.*+?()[\]{}|]/g,Vr=/^\[object .+?Constructor\]$/,Zr=Function.prototype,Jr=Object.prototype,Qr=Zr.toString,kr=Jr.hasOwnProperty,te=RegExp("^"+Qr.call(kr).replace(qr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function re(t){if(!y(t)||Wr(t))return!1;var r=kt(t)?te:Vr;return r.test(x(t))}function ee(t,r){return t==null?void 0:t[r]}function P(t,r){var e=ee(t,r);return re(e)?e:void 0}var et=P(b,"WeakMap"),jt=Object.create,ne=function(){function t(){}return function(r){if(!y(r))return{};if(jt)return jt(r);t.prototype=r;var e=new t;return t.prototype=void 0,e}}();function ae(t,r,e){switch(e.length){case 0:return t.call(r);case 1:return t.call(r,e[0]);case 2:return t.call(r,e[0],e[1]);case 3:return t.call(r,e[0],e[1],e[2])}return t.apply(r,e)}function ie(t,r){var e=-1,n=t.length;for(r||(r=Array(n));++e<n;)r[e]=t[e];return r}var oe=800,ue=16,se=Date.now;function ce(t){var r=0,e=0;return function(){var n=se(),a=ue-(n-e);if(e=n,a>0){if(++r>=oe)return arguments[0]}else r=0;return t.apply(void 0,arguments)}}function fe(t){return function(){return t}}var H=function(){try{var t=P(Object,"defineProperty");return t({},"",{}),t}catch{}}(),le=H?function(t,r){return H(t,"toString",{configurable:!0,enumerable:!1,value:fe(r),writable:!0})}:Qt,pe=ce(le);function ge(t,r){for(var e=-1,n=t==null?0:t.length;++e<n&&r(t[e],e,t)!==!1;);return t}var de=9007199254740991,he=/^(?:0|[1-9]\d*)$/;function ot(t,r){var e=typeof t;return r=r??de,!!r&&(e=="number"||e!="symbol"&&he.test(t))&&t>-1&&t%1==0&&t<r}function tr(t,r,e){r=="__proto__"&&H?H(t,r,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[r]=e}function rr(t,r){return t===r||t!==t&&r!==r}var ye=Object.prototype,be=ye.hasOwnProperty;function ut(t,r,e){var n=t[r];(!(be.call(t,r)&&rr(n,e))||e===void 0&&!(r in t))&&tr(t,r,e)}function z(t,r,e,n){var a=!e;e||(e={});for(var i=-1,o=r.length;++i<o;){var u=r[i],s=void 0;s===void 0&&(s=t[u]),a?tr(e,u,s):ut(e,u,s)}return e}var xt=Math.max;function Te(t,r,e){return r=xt(r===void 0?t.length-1:r,0),function(){for(var n=arguments,a=-1,i=xt(n.length-r,0),o=Array(i);++a<i;)o[a]=n[r+a];a=-1;for(var u=Array(r+1);++a<r;)u[a]=n[a];return u[r]=e(o),ae(t,this,u)}}var ve=9007199254740991;function st(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ve}function ct(t){return t!=null&&st(t.length)&&!kt(t)}var _e=Object.prototype;function W(t){var r=t&&t.constructor,e=typeof r=="function"&&r.prototype||_e;return t===e}function me(t,r){for(var e=-1,n=Array(t);++e<t;)n[e]=r(e);return n}var $e="[object Arguments]";function Pt(t){return j(t)&&A(t)==$e}var er=Object.prototype,Oe=er.hasOwnProperty,we=er.propertyIsEnumerable,X=Pt(function(){return arguments}())?Pt:function(t){return j(t)&&Oe.call(t,"callee")&&!we.call(t,"callee")};function Se(){return!1}var nr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,It=nr&&typeof module=="object"&&module&&!module.nodeType&&module,Ae=It&&It.exports===nr,Et=Ae?b.Buffer:void 0,je=Et?Et.isBuffer:void 0,ft=je||Se,xe="[object Arguments]",Pe="[object Array]",Ie="[object Boolean]",Ee="[object Date]",Ce="[object Error]",Fe="[object Function]",Me="[object Map]",Ne="[object Number]",Le="[object Object]",De="[object RegExp]",Be="[object Set]",Ue="[object String]",Re="[object WeakMap]",ze="[object ArrayBuffer]",Ge="[object DataView]",He="[object Float32Array]",Ke="[object Float64Array]",We="[object Int8Array]",Xe="[object Int16Array]",Ye="[object Int32Array]",qe="[object Uint8Array]",Ve="[object Uint8ClampedArray]",Ze="[object Uint16Array]",Je="[object Uint32Array]",f={};f[He]=f[Ke]=f[We]=f[Xe]=f[Ye]=f[qe]=f[Ve]=f[Ze]=f[Je]=!0;f[xe]=f[Pe]=f[ze]=f[Ie]=f[Ge]=f[Ee]=f[Ce]=f[Fe]=f[Me]=f[Ne]=f[Le]=f[De]=f[Be]=f[Ue]=f[Re]=!1;function Qe(t){return j(t)&&st(t.length)&&!!f[A(t)]}function lt(t){return function(r){return t(r)}}var ar=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=ar&&typeof module=="object"&&module&&!module.nodeType&&module,ke=D&&D.exports===ar,tt=ke&&qt.process,C=function(){try{var t=D&&D.require&&D.require("util").types;return t||tt&&tt.binding&&tt.binding("util")}catch{}}(),Ct=C&&C.isTypedArray,ir=Ct?lt(Ct):Qe,tn=Object.prototype,rn=tn.hasOwnProperty;function or(t,r){var e=_(t),n=!e&&X(t),a=!e&&!n&&ft(t),i=!e&&!n&&!a&&ir(t),o=e||n||a||i,u=o?me(t.length,String):[],s=u.length;for(var l in t)(r||rn.call(t,l))&&!(o&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ot(l,s)))&&u.push(l);return u}function ur(t,r){return function(e){return t(r(e))}}var en=ur(Object.keys,Object),nn=Object.prototype,an=nn.hasOwnProperty;function sr(t){if(!W(t))return en(t);var r=[];for(var e in Object(t))an.call(t,e)&&e!="constructor"&&r.push(e);return r}function pt(t){return ct(t)?or(t):sr(t)}function on(t){var r=[];if(t!=null)for(var e in Object(t))r.push(e);return r}var un=Object.prototype,sn=un.hasOwnProperty;function cn(t){if(!y(t))return on(t);var r=W(t),e=[];for(var n in t)n=="constructor"&&(r||!sn.call(t,n))||e.push(n);return e}function Y(t){return ct(t)?or(t,!0):cn(t)}var fn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/;function pn(t,r){if(_(t))return!1;var e=typeof t;return e=="number"||e=="symbol"||e=="boolean"||t==null||K(t)?!0:ln.test(t)||!fn.test(t)||r!=null&&t in Object(r)}var U=P(Object,"create");function gn(){this.__data__=U?U(null):{},this.size=0}function dn(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}var hn="__lodash_hash_undefined__",yn=Object.prototype,bn=yn.hasOwnProperty;function Tn(t){var r=this.__data__;if(U){var e=r[t];return e===hn?void 0:e}return bn.call(r,t)?r[t]:void 0}var vn=Object.prototype,_n=vn.hasOwnProperty;function mn(t){var r=this.__data__;return U?r[t]!==void 0:_n.call(r,t)}var $n="__lodash_hash_undefined__";function On(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=U&&r===void 0?$n:r,this}function S(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}S.prototype.clear=gn;S.prototype.delete=dn;S.prototype.get=Tn;S.prototype.has=mn;S.prototype.set=On;function wn(){this.__data__=[],this.size=0}function q(t,r){for(var e=t.length;e--;)if(rr(t[e][0],r))return e;return-1}var Sn=Array.prototype,An=Sn.splice;function jn(t){var r=this.__data__,e=q(r,t);if(e<0)return!1;var n=r.length-1;return e==n?r.pop():An.call(r,e,1),--this.size,!0}function xn(t){var r=this.__data__,e=q(r,t);return e<0?void 0:r[e][1]}function Pn(t){return q(this.__data__,t)>-1}function In(t,r){var e=this.__data__,n=q(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this}function m(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}m.prototype.clear=wn;m.prototype.delete=jn;m.prototype.get=xn;m.prototype.has=Pn;m.prototype.set=In;var R=P(b,"Map");function En(){this.size=0,this.__data__={hash:new S,map:new(R||m),string:new S}}function Cn(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}function V(t,r){var e=t.__data__;return Cn(r)?e[typeof r=="string"?"string":"hash"]:e.map}function Fn(t){var r=V(this,t).delete(t);return this.size-=r?1:0,r}function Mn(t){return V(this,t).get(t)}function Nn(t){return V(this,t).has(t)}function Ln(t,r){var e=V(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this}function w(t){var r=-1,e=t==null?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}w.prototype.clear=En;w.prototype.delete=Fn;w.prototype.get=Mn;w.prototype.has=Nn;w.prototype.set=Ln;var Dn="Expected a function";function gt(t,r){if(typeof t!="function"||r!=null&&typeof r!="function")throw new TypeError(Dn);var e=function(){var n=arguments,a=r?r.apply(this,n):n[0],i=e.cache;if(i.has(a))return i.get(a);var o=t.apply(this,n);return e.cache=i.set(a,o)||i,o};return e.cache=new(gt.Cache||w),e}gt.Cache=w;var Bn=500;function Un(t){var r=gt(t,function(n){return e.size===Bn&&e.clear(),n}),e=r.cache;return r}var Rn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zn=/\\(\\)?/g,Gn=Un(function(t){var r=[];return t.charCodeAt(0)===46&&r.push(""),t.replace(Rn,function(e,n,a,i){r.push(a?i.replace(zn,"$1"):n||e)}),r});function Hn(t){return t==null?"":Jt(t)}function F(t,r){return _(t)?t:pn(t,r)?[t]:Gn(Hn(t))}var Kn=1/0;function Z(t){if(typeof t=="string"||K(t))return t;var r=t+"";return r=="0"&&1/t==-Kn?"-0":r}function dt(t,r){r=F(r,t);for(var e=0,n=r.length;t!=null&&e<n;)t=t[Z(r[e++])];return e&&e==n?t:void 0}function no(t,r,e){var n=t==null?void 0:dt(t,r);return n===void 0?e:n}function ht(t,r){for(var e=-1,n=r.length,a=t.length;++e<n;)t[a+e]=r[e];return t}var Ft=v?v.isConcatSpreadable:void 0;function Wn(t){return _(t)||X(t)||!!(Ft&&t&&t[Ft])}function Xn(t,r,e,n,a){var i=-1,o=t.length;for(e||(e=Wn),a||(a=[]);++i<o;){var u=t[i];e(u)?ht(a,u):a[a.length]=u}return a}function Yn(t){var r=t==null?0:t.length;return r?Xn(t):[]}function cr(t){return pe(Te(t,void 0,Yn),t+"")}var yt=ur(Object.getPrototypeOf,Object),qn="[object Object]",Vn=Function.prototype,Zn=Object.prototype,fr=Vn.toString,Jn=Zn.hasOwnProperty,Qn=fr.call(Object);function kn(t){if(!j(t)||A(t)!=qn)return!1;var r=yt(t);if(r===null)return!0;var e=Jn.call(r,"constructor")&&r.constructor;return typeof e=="function"&&e instanceof e&&fr.call(e)==Qn}function ta(t,r,e){var n=-1,a=t.length;r<0&&(r=-r>a?0:a+r),e=e>a?a:e,e<0&&(e+=a),a=r>e?0:e-r>>>0,r>>>=0;for(var i=Array(a);++n<a;)i[n]=t[n+r];return i}function ra(){this.__data__=new m,this.size=0}function ea(t){var r=this.__data__,e=r.delete(t);return this.size=r.size,e}function na(t){return this.__data__.get(t)}function aa(t){return this.__data__.has(t)}var ia=200;function oa(t,r){var e=this.__data__;if(e instanceof m){var n=e.__data__;if(!R||n.length<ia-1)return n.push([t,r]),this.size=++e.size,this;e=this.__data__=new w(n)}return e.set(t,r),this.size=e.size,this}function M(t){var r=this.__data__=new m(t);this.size=r.size}M.prototype.clear=ra;M.prototype.delete=ea;M.prototype.get=na;M.prototype.has=aa;M.prototype.set=oa;function ua(t,r){return t&&z(r,pt(r),t)}function sa(t,r){return t&&z(r,Y(r),t)}var lr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mt=lr&&typeof module=="object"&&module&&!module.nodeType&&module,ca=Mt&&Mt.exports===lr,Nt=ca?b.Buffer:void 0,Lt=Nt?Nt.allocUnsafe:void 0;function fa(t,r){if(r)return t.slice();var e=t.length,n=Lt?Lt(e):new t.constructor(e);return t.copy(n),n}function la(t,r){for(var e=-1,n=t==null?0:t.length,a=0,i=[];++e<n;){var o=t[e];r(o,e,t)&&(i[a++]=o)}return i}function pr(){return[]}var pa=Object.prototype,ga=pa.propertyIsEnumerable,Dt=Object.getOwnPropertySymbols,bt=Dt?function(t){return t==null?[]:(t=Object(t),la(Dt(t),function(r){return ga.call(t,r)}))}:pr;function da(t,r){return z(t,bt(t),r)}var ha=Object.getOwnPropertySymbols,gr=ha?function(t){for(var r=[];t;)ht(r,bt(t)),t=yt(t);return r}:pr;function ya(t,r){return z(t,gr(t),r)}function dr(t,r,e){var n=r(t);return _(t)?n:ht(n,e(t))}function ba(t){return dr(t,pt,bt)}function hr(t){return dr(t,Y,gr)}var nt=P(b,"DataView"),at=P(b,"Promise"),it=P(b,"Set"),Bt="[object Map]",Ta="[object Object]",Ut="[object Promise]",Rt="[object Set]",zt="[object WeakMap]",Gt="[object DataView]",va=x(nt),_a=x(R),ma=x(at),$a=x(it),Oa=x(et),T=A;(nt&&T(new nt(new ArrayBuffer(1)))!=Gt||R&&T(new R)!=Bt||at&&T(at.resolve())!=Ut||it&&T(new it)!=Rt||et&&T(new et)!=zt)&&(T=function(t){var r=A(t),e=r==Ta?t.constructor:void 0,n=e?x(e):"";if(n)switch(n){case va:return Gt;case _a:return Bt;case ma:return Ut;case $a:return Rt;case Oa:return zt}return r});var wa=Object.prototype,Sa=wa.hasOwnProperty;function Aa(t){var r=t.length,e=new t.constructor(r);return r&&typeof t[0]=="string"&&Sa.call(t,"index")&&(e.index=t.index,e.input=t.input),e}var Ht=b.Uint8Array;function Tt(t){var r=new t.constructor(t.byteLength);return new Ht(r).set(new Ht(t)),r}function ja(t,r){var e=r?Tt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}var xa=/\w*$/;function Pa(t){var r=new t.constructor(t.source,xa.exec(t));return r.lastIndex=t.lastIndex,r}var Kt=v?v.prototype:void 0,Wt=Kt?Kt.valueOf:void 0;function Ia(t){return Wt?Object(Wt.call(t)):{}}function Ea(t,r){var e=r?Tt(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}var Ca="[object Boolean]",Fa="[object Date]",Ma="[object Map]",Na="[object Number]",La="[object RegExp]",Da="[object Set]",Ba="[object String]",Ua="[object Symbol]",Ra="[object ArrayBuffer]",za="[object DataView]",Ga="[object Float32Array]",Ha="[object Float64Array]",Ka="[object Int8Array]",Wa="[object Int16Array]",Xa="[object Int32Array]",Ya="[object Uint8Array]",qa="[object Uint8ClampedArray]",Va="[object Uint16Array]",Za="[object Uint32Array]";function Ja(t,r,e){var n=t.constructor;switch(r){case Ra:return Tt(t);case Ca:case Fa:return new n(+t);case za:return ja(t,e);case Ga:case Ha:case Ka:case Wa:case Xa:case Ya:case qa:case Va:case Za:return Ea(t,e);case Ma:return new n;case Na:case Ba:return new n(t);case La:return Pa(t);case Da:return new n;case Ua:return Ia(t)}}function Qa(t){return typeof t.constructor=="function"&&!W(t)?ne(yt(t)):{}}var ka="[object Map]";function ti(t){return j(t)&&T(t)==ka}var Xt=C&&C.isMap,ri=Xt?lt(Xt):ti,ei="[object Set]";function ni(t){return j(t)&&T(t)==ei}var Yt=C&&C.isSet,ai=Yt?lt(Yt):ni,ii=1,oi=2,ui=4,yr="[object Arguments]",si="[object Array]",ci="[object Boolean]",fi="[object Date]",li="[object Error]",br="[object Function]",pi="[object GeneratorFunction]",gi="[object Map]",di="[object Number]",Tr="[object Object]",hi="[object RegExp]",yi="[object Set]",bi="[object String]",Ti="[object Symbol]",vi="[object WeakMap]",_i="[object ArrayBuffer]",mi="[object DataView]",$i="[object Float32Array]",Oi="[object Float64Array]",wi="[object Int8Array]",Si="[object Int16Array]",Ai="[object Int32Array]",ji="[object Uint8Array]",xi="[object Uint8ClampedArray]",Pi="[object Uint16Array]",Ii="[object Uint32Array]",c={};c[yr]=c[si]=c[_i]=c[mi]=c[ci]=c[fi]=c[$i]=c[Oi]=c[wi]=c[Si]=c[Ai]=c[gi]=c[di]=c[Tr]=c[hi]=c[yi]=c[bi]=c[Ti]=c[ji]=c[xi]=c[Pi]=c[Ii]=!0;c[li]=c[br]=c[vi]=!1;function B(t,r,e,n,a,i){var o,u=r&ii,s=r&oi,l=r&ui;if(e&&(o=a?e(t,n,a,i):e(t)),o!==void 0)return o;if(!y(t))return t;var $=_(t);if($){if(o=Aa(t),!u)return ie(t,o)}else{var g=T(t),I=g==br||g==pi;if(ft(t))return fa(t,u);if(g==Tr||g==yr||I&&!a){if(o=s||I?{}:Qa(t),!u)return s?ya(t,sa(o,t)):da(t,ua(o,t))}else{if(!c[g])return a?t:{};o=Ja(t,g,u)}}i||(i=new M);var E=i.get(t);if(E)return E;i.set(t,o),ai(t)?t.forEach(function(h){o.add(B(h,r,e,h,t,i))}):ri(t)&&t.forEach(function(h,d){o.set(d,B(h,r,e,d,t,i))});var J=l?s?hr:ba:s?Y:pt,G=$?void 0:J(t);return ge(G||t,function(h,d){G&&(d=h,h=t[d]),ut(o,d,B(h,r,e,d,t,i))}),o}var Ei=1,Ci=4;function ao(t){return B(t,Ei|Ci)}function Fi(t,r){return t!=null&&r in Object(t)}function Mi(t,r,e){r=F(r,t);for(var n=-1,a=r.length,i=!1;++n<a;){var o=Z(r[n]);if(!(i=t!=null&&e(t,o)))break;t=t[o]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&st(a)&&ot(o,a)&&(_(t)||X(t)))}function Ni(t,r){return t!=null&&Mi(t,r,Fi)}function Li(t){return function(r,e,n){for(var a=-1,i=Object(r),o=n(r),u=o.length;u--;){var s=o[++a];if(e(i[s],s,i)===!1)break}return r}}var Di=Li(),rt=function(){return b.Date.now()},Bi="Expected a function",Ui=Math.max,Ri=Math.min;function zi(t,r,e){var n,a,i,o,u,s,l=0,$=!1,g=!1,I=!0;if(typeof t!="function")throw new TypeError(Bi);r=St(r)||0,y(e)&&($=!!e.leading,g="maxWait"in e,i=g?Ui(St(e.maxWait)||0,r):i,I="trailing"in e?!!e.trailing:I);function E(p){var O=n,N=a;return n=a=void 0,l=p,o=t.apply(N,O),o}function J(p){return l=p,u=setTimeout(d,r),$?E(p):o}function G(p){var O=p-s,N=p-l,_t=r-O;return g?Ri(_t,i-N):_t}function h(p){var O=p-s,N=p-l;return s===void 0||O>=r||O<0||g&&N>=i}function d(){var p=rt();if(h(p))return vt(p);u=setTimeout(d,G(p))}function vt(p){return u=void 0,I&&n?E(p):(n=a=void 0,o)}function _r(){u!==void 0&&clearTimeout(u),l=0,n=s=a=u=void 0}function mr(){return u===void 0?o:vt(rt())}function Q(){var p=rt(),O=h(p);if(n=arguments,a=this,s=p,O){if(u===void 0)return J(s);if(g)return clearTimeout(u),u=setTimeout(d,r),E(s)}return u===void 0&&(u=setTimeout(d,r)),o}return Q.cancel=_r,Q.flush=mr,Q}function Gi(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}function Hi(t){return typeof t=="function"?t:Qt}function io(t,r){return t==null?t:Di(t,Hi(r),Y)}function Ki(t,r){return r.length<2?t:dt(t,ta(r,0,-1))}var Wi="[object Map]",Xi="[object Set]",Yi=Object.prototype,qi=Yi.hasOwnProperty;function oo(t){if(t==null)return!0;if(ct(t)&&(_(t)||typeof t=="string"||typeof t.splice=="function"||ft(t)||ir(t)||X(t)))return!t.length;var r=T(t);if(r==Wi||r==Xi)return!t.size;if(W(t))return!sr(t).length;for(var e in t)if(qi.call(t,e))return!1;return!0}function Vi(t,r){return r=F(r,t),t=Ki(t,r),t==null||delete t[Z(Gi(r))]}function Zi(t){return kn(t)?void 0:t}var Ji=1,Qi=2,ki=4,uo=cr(function(t,r){var e={};if(t==null)return e;var n=!1;r=Zt(r,function(i){return i=F(i,t),n||(n=i.length>1),i}),z(t,hr(t),e),n&&(e=B(e,Ji|Qi|ki,Zi));for(var a=r.length;a--;)Vi(e,r[a]);return e});function vr(t,r,e,n){if(!y(t))return t;r=F(r,t);for(var a=-1,i=r.length,o=i-1,u=t;u!=null&&++a<i;){var s=Z(r[a]),l=e;if(s==="__proto__"||s==="constructor"||s==="prototype")return t;if(a!=o){var $=u[s];l=void 0,l===void 0&&(l=y($)?$:ot(r[a+1])?[]:{})}ut(u,s,l),u=u[s]}return t}function to(t,r,e){for(var n=-1,a=r.length,i={};++n<a;){var o=r[n],u=dt(t,o);e(u,o)&&vr(i,F(o,t),u)}return i}function ro(t,r){return to(t,r,function(e,n){return Ni(t,n)})}var so=cr(function(t,r){return t==null?{}:ro(t,r)});function co(t,r,e){return t==null?t:vr(t,r,e)}var eo="Expected a function";function fo(t,r,e){var n=!0,a=!0;if(typeof t!="function")throw new TypeError(eo);return y(e)&&(n="leading"in e?!!e.leading:n,a="trailing"in e?!!e.trailing:a),zi(t,r,{leading:n,maxWait:r,trailing:a})}export{ao as c,zi as d,io as f,no as g,oo as i,uo as o,so as p,co as s,fo as t};
|