![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /opt/mattermost/client/ |
Upload File : |
/*! For license information please see 9867.6a0bf83a4fef7d2ee11d.js.LICENSE.txt */ (self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[9867],{50792:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,n,s,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new r(n,s||t,o),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,s=n.length,o=new Array(s);r<s;r++)o[r]=n[r].fn;return o},a.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,r,s,o){var a=i?i+t:t;if(!this._events[a])return!1;var h,u,c=this._events[a],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,s),!0;case 6:return c.fn.call(c.context,e,n,r,s,o),!0}for(u=1,h=new Array(p-1);u<p;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var l,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),p){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,r);break;default:if(!h)for(l=1,h=new Array(p-1);l<p;l++)h[l-1]=arguments[l];c[u].fn.apply(c[u].context,h)}}return!0},a.prototype.on=function(t,e,i){return s(this,t,e,i,!1)},a.prototype.once=function(t,e,i){return s(this,t,e,i,!0)},a.prototype.removeListener=function(t,e,n,r){var s=i?i+t:t;if(!this._events[s])return this;if(!e)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==e||r&&!a.once||n&&a.context!==n||o(this,s);else{for(var h=0,u=[],c=a.length;h<c;h++)(a[h].fn!==e||r&&!a[h].once||n&&a[h].context!==n)&&u.push(a[h]);u.length?this._events[s]=1===u.length?u[0]:u:o(this,s)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&o(this,e)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,t.exports=a},70727:function(t){!function(e){var i=0,n=!1,r=!1;try{var s=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,s)}catch(t){}var o=function(t){var e=t.target,n=window.innerWidth/window.document.documentElement.clientWidth;if(!(t.touches.length>1||1!==n)){for(;e!==document.body&&e!==document;){var r=window.getComputedStyle(e);if(!r)break;if("INPUT"===e.nodeName&&"range"===e.getAttribute("type"))return;var s=r.getPropertyValue("-webkit-overflow-scrolling"),o=r.getPropertyValue("overflow-y"),a=parseInt(r.getPropertyValue("height"),10),h="touch"===s&&("auto"===o||"scroll"===o),u=e.scrollHeight>e.offsetHeight;if(h&&u){var c=t.touches?t.touches[0].screenY:t.screenY,p=i<=c&&0===e.scrollTop,l=i>=c&&e.scrollHeight-e.scrollTop===a;return void((p||l)&&t.preventDefault())}e=e.parentNode}t.preventDefault()}},a=function(t){i=t.touches?t.touches[0].screenY:t.screenY},h=function(){window.addEventListener("touchstart",a,!!r&&{passive:!1}),window.addEventListener("touchmove",o,!!r&&{passive:!1}),n=!0},u=document.createElement("div");document.documentElement.appendChild(u),u.style.WebkitOverflowScrolling="touch";var c="getComputedStyle"in window&&"touch"===window.getComputedStyle(u)["-webkit-overflow-scrolling"];document.documentElement.removeChild(u),c&&h();var p={enable:h,disable:function(){window.removeEventListener("touchstart",a,!1),window.removeEventListener("touchmove",o,!1),n=!1},isEnabled:function(){return n},isScrollSupported:c};t.exports&&(t.exports=p),"function"==typeof e.define?(0,e.define)("iNoBounce",[],(function(){return p})):e.iNoBounce=p}(this)},77234:function(t,e,i){var n=i(88538);t.exports=function(){"use strict";var t=void 0;"undefined"!=typeof window&&(t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t||void 0===n||"node"!==n.title||(t=setImmediate);var e=t=t||function(t){window.setTimeout(t,1e3/60)},i=Array.prototype.concat,r=Array.prototype.slice;function s(t){return e(t)}function o(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1)}var a={};function h(t){if(a[t])return a[t];var e=t.replace("#","");3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var i=e.match(/.{2}/g);if(!i||i.length<3)throw new Error("Expected a color string of format #rrggbb");var n={r:parseInt(i[0],16),g:parseInt(i[1],16),b:parseInt(i[2],16)};return a[t]=n,n}function u(t,e,i){var n=t.toString(16),r=e.toString(16),s=i.toString(16);return"#"+(n=n.length<2?"0"+n:n)+(r=r.length<2?"0"+r:r)+(s.length<2?"0"+s:s)}var c=Object.freeze({bind:function(t,e){for(var n=arguments.length,s=Array(n>2?n-2:0),o=2;o<n;o++)s[o-2]=arguments[o];return function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];t.apply(e,i.call(s,r.call(o)))}},extend:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},onFrame:s,removeFirst:o,hexToRGB:h,rgbToHex:u});function p(t,e,i,n,r){return n+(t-e)/(i-e)*(r-n)}var l=Object.freeze({mapValueInRange:p,interpolateColor:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments[5],o=h(e),a=h(i),c=Math.floor(p(t,n,r,o.r,a.r)),l=Math.floor(p(t,n,r,o.g,a.g)),f=Math.floor(p(t,n,r,o.b,a.b));return s?"rgb("+c+","+l+","+f+")":u(c,l,f)},degreesToRadians:function(t){return t*Math.PI/180},radiansToDegrees:function(t){return 180*t/Math.PI}});function f(t){return 3.62*(t-30)+194}function d(t){return 3*(t-8)+25}var v=Object.freeze({tensionFromOrigamiValue:f,origamiValueFromTension:function(t){return(t-194)/3.62+30},frictionFromOrigamiValue:d,origamiFromFriction:function(t){return(t-25)/3+8}}),m=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},y=function(){function t(){m(this,t),this.springSystem=null}return t.prototype.run=function(){var t=w.call(this);s((function(){t.loop(Date.now())}))},t}(),_=function(){function t(e){m(this,t),this.springSystem=null,this.time=0,this.running=!1,this.timestep=e||16.667}return t.prototype.run=function(){var t=w.call(this);if(!this.running){for(this.running=!0;!t.getIsIdle();)t.loop(this.time+=this.timestep);this.running=!1}},t}(),S=function(){function t(){m(this,t),this.springSystem=null,this.time=0,this.running=!1}return t.prototype.run=function(){},t.prototype.step=function(t){w.call(this).loop(this.time+=t)},t}();function w(){if(null==this.springSystem)throw new Error("cannot run looper without a springSystem");return this.springSystem}var E=Object.freeze({AnimationLooper:y,SimulationLooper:_,SteppingSimulationLooper:S}),T=function(){function t(e,i){m(this,t),this.bounciness=e,this.speed=i;var n=this.normalize(e/1.7,0,20);n=this.projectNormal(n,0,.8);var r=this.normalize(i/1.7,0,20);this.bouncyTension=this.projectNormal(r,.5,200),this.bouncyFriction=this.quadraticOutInterpolation(n,this.b3Nobounce(this.bouncyTension),.01)}return t.prototype.normalize=function(t,e,i){return(t-e)/(i-e)},t.prototype.projectNormal=function(t,e,i){return e+t*(i-e)},t.prototype.linearInterpolation=function(t,e,i){return t*i+(1-t)*e},t.prototype.quadraticOutInterpolation=function(t,e,i){return this.linearInterpolation(2*t-t*t,e,i)},t.prototype.b3Friction1=function(t){return 7e-4*Math.pow(t,3)-.031*Math.pow(t,2)+.64*t+1.28},t.prototype.b3Friction2=function(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2},t.prototype.b3Friction3=function(t){return 45e-8*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84},t.prototype.b3Nobounce=function(t){return t<=18?this.b3Friction1(t):t>18&&t<=44?this.b3Friction2(t):this.b3Friction3(t)},t}(),b=function(){function t(e,i){m(this,t),this.tension=e,this.friction=i}return t.fromOrigamiTensionAndFriction=function(e,i){return new t(f(e),d(i))},t.fromBouncinessAndSpeed=function(e,i){var n=new T(e,i);return t.fromOrigamiTensionAndFriction(n.bouncyTension,n.bouncyFriction)},t.coastingConfigWithOrigamiFriction=function(e){return new t(0,d(e))},t}();b.DEFAULT_ORIGAMI_SPRING_CONFIG=b.fromOrigamiTensionAndFriction(40,7);var I=function t(){m(this,t),this.position=0,this.velocity=0},C=function(){function t(e){m(this,t),this.listeners=[],this._startValue=0,this._currentState=new I,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new I,this._restSpeedThreshold=.001,this._tempState=new I,this._timeAccumulator=0,this._wasAtRest=!0,this._id="s"+t._ID++,this._springSystem=e}return t.prototype.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},t.prototype.getId=function(){return this._id},t.prototype.setSpringConfig=function(t){return this._springConfig=t,this},t.prototype.getSpringConfig=function(){return this._springConfig},t.prototype.setCurrentValue=function(t,e){return this._startValue=t,this._currentState.position=t,e||this.setAtRest(),this.notifyPositionUpdated(!1,!1),this},t.prototype.getStartValue=function(){return this._startValue},t.prototype.getCurrentValue=function(){return this._currentState.position},t.prototype.getCurrentDisplacementDistance=function(){return this.getDisplacementDistanceForState(this._currentState)},t.prototype.getDisplacementDistanceForState=function(t){return Math.abs(this._endValue-t.position)},t.prototype.setEndValue=function(t){if(this._endValue===t&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=t,this._springSystem.activateSpring(this.getId());for(var e=0,i=this.listeners.length;e<i;e++){var n=this.listeners[e].onSpringEndStateChange;n&&n(this)}return this},t.prototype.getEndValue=function(){return this._endValue},t.prototype.setVelocity=function(t){return t===this._currentState.velocity||(this._currentState.velocity=t,this._springSystem.activateSpring(this.getId())),this},t.prototype.getVelocity=function(){return this._currentState.velocity},t.prototype.setRestSpeedThreshold=function(t){return this._restSpeedThreshold=t,this},t.prototype.getRestSpeedThreshold=function(){return this._restSpeedThreshold},t.prototype.setRestDisplacementThreshold=function(t){this._displacementFromRestThreshold=t},t.prototype.getRestDisplacementThreshold=function(){return this._displacementFromRestThreshold},t.prototype.setOvershootClampingEnabled=function(t){return this._overshootClampingEnabled=t,this},t.prototype.isOvershootClampingEnabled=function(){return this._overshootClampingEnabled},t.prototype.isOvershooting=function(){var t=this._startValue,e=this._endValue;return this._springConfig.tension>0&&(t<e&&this.getCurrentValue()>e||t>e&&this.getCurrentValue()<e)},t.prototype.advance=function(e,i){var n=this.isAtRest();if(!n||!this._wasAtRest){var r=i;i>t.MAX_DELTA_TIME_SEC&&(r=t.MAX_DELTA_TIME_SEC),this._timeAccumulator+=r;for(var s=this._springConfig.tension,o=this._springConfig.friction,a=this._currentState.position,h=this._currentState.velocity,u=this._tempState.position,c=this._tempState.velocity,p=void 0,l=void 0,f=void 0,d=void 0,v=void 0,m=void 0,g=void 0,y=void 0;this._timeAccumulator>=t.SOLVER_TIMESTEP_SEC;)this._timeAccumulator-=t.SOLVER_TIMESTEP_SEC,this._timeAccumulator<t.SOLVER_TIMESTEP_SEC&&(this._previousState.position=a,this._previousState.velocity=h),p=h,l=s*(this._endValue-u)-o*h,u=a+p*t.SOLVER_TIMESTEP_SEC*.5,f=c=h+l*t.SOLVER_TIMESTEP_SEC*.5,d=s*(this._endValue-u)-o*c,u=a+f*t.SOLVER_TIMESTEP_SEC*.5,v=c=h+d*t.SOLVER_TIMESTEP_SEC*.5,m=s*(this._endValue-u)-o*c,u=a+v*t.SOLVER_TIMESTEP_SEC,g=c=h+m*t.SOLVER_TIMESTEP_SEC,y=1/6*(l+2*(d+m)+(s*(this._endValue-u)-o*c)),a+=1/6*(p+2*(f+v)+g)*t.SOLVER_TIMESTEP_SEC,h+=y*t.SOLVER_TIMESTEP_SEC;this._tempState.position=u,this._tempState.velocity=c,this._currentState.position=a,this._currentState.velocity=h,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/t.SOLVER_TIMESTEP_SEC),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),n=!0);var _=!1;this._wasAtRest&&(this._wasAtRest=!1,_=!0);var S=!1;n&&(this._wasAtRest=!0,S=!0),this.notifyPositionUpdated(_,S)}},t.prototype.notifyPositionUpdated=function(t,e){for(var i=0,n=this.listeners.length;i<n;i++){var r=this.listeners[i];t&&r.onSpringActivate&&r.onSpringActivate(this),r.onSpringUpdate&&r.onSpringUpdate(this),e&&r.onSpringAtRest&&r.onSpringAtRest(this)}},t.prototype.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},t.prototype.wasAtRest=function(){return this._wasAtRest},t.prototype.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||0===this._springConfig.tension)},t.prototype.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},t.prototype._interpolate=function(t){this._currentState.position=this._currentState.position*t+this._previousState.position*(1-t),this._currentState.velocity=this._currentState.velocity*t+this._previousState.velocity*(1-t)},t.prototype.getListeners=function(){return this.listeners},t.prototype.addListener=function(t){return this.listeners.push(t),this},t.prototype.removeListener=function(t){return o(this.listeners,t),this},t.prototype.removeAllListeners=function(){return this.listeners=[],this},t.prototype.currentValueIsApproximately=function(t){return Math.abs(this.getCurrentValue()-t)<=this.getRestDisplacementThreshold()},t}();C._ID=0,C.MAX_DELTA_TIME_SEC=.064,C.SOLVER_TIMESTEP_SEC=.001;var A=function(){function t(e){m(this,t),this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={},this.looper=e||new y,this.looper.springSystem=this}return t.prototype.setLooper=function(t){this.looper=t,t.springSystem=this},t.prototype.createSpring=function(t,e){var i;return i=void 0===t||void 0===e?b.DEFAULT_ORIGAMI_SPRING_CONFIG:b.fromOrigamiTensionAndFriction(t,e),this.createSpringWithConfig(i)},t.prototype.createSpringWithBouncinessAndSpeed=function(t,e){var i;return i=void 0===t||void 0===e?b.DEFAULT_ORIGAMI_SPRING_CONFIG:b.fromBouncinessAndSpeed(t,e),this.createSpringWithConfig(i)},t.prototype.createSpringWithConfig=function(t){var e=new C(this);return this.registerSpring(e),e.setSpringConfig(t),e},t.prototype.getIsIdle=function(){return this._isIdle},t.prototype.getSpringById=function(t){return this._springRegistry[t]},t.prototype.getAllSprings=function(){var t=[];for(var e in this._springRegistry)this._springRegistry.hasOwnProperty(e)&&t.push(this._springRegistry[e]);return t},t.prototype.registerSpring=function(t){this._springRegistry[t.getId()]=t},t.prototype.deregisterSpring=function(t){o(this._activeSprings,t),delete this._springRegistry[t.getId()]},t.prototype.advance=function(t,e){for(;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(var i=0,n=this._activeSprings.length;i<n;i++){var r=this._activeSprings[i];r.systemShouldAdvance()?r.advance(t/1e3,e/1e3):this._idleSpringIndices.push(this._activeSprings.indexOf(r))}for(;this._idleSpringIndices.length>0;){var s=this._idleSpringIndices.pop();s>=0&&this._activeSprings.splice(s,1)}},t.prototype.loop=function(t){var e=void 0;-1===this._lastTimeMillis&&(this._lastTimeMillis=t-1);var i=t-this._lastTimeMillis;this._lastTimeMillis=t;var n=0,r=this.listeners.length;for(n=0;n<r;n++)(e=this.listeners[n]).onBeforeIntegrate&&e.onBeforeIntegrate(this);for(this.advance(t,i),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),n=0;n<r;n++)(e=this.listeners[n]).onAfterIntegrate&&e.onAfterIntegrate(this);this._isIdle||this.looper.run()},t.prototype.activateSpring=function(t){var e=this._springRegistry[t];-1===this._activeSprings.indexOf(e)&&this._activeSprings.push(e),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},t.prototype.addListener=function(t){this.listeners.push(t)},t.prototype.removeListener=function(t){o(this.listeners,t)},t.prototype.removeAllListeners=function(){this.listeners=[]},t}();return g({},E,{OrigamiValueConverter:v,MathUtil:l,Spring:C,SpringConfig:b,SpringSystem:A,util:g({},c,l)})}()},79030:(t,e,i)=>{"use strict";i.d(e,{A:()=>j});var n=i(50792);class r extends Error{constructor(t){super(t),this.name="TimeoutError"}}class s extends Error{constructor(t){super(),this.name="AbortError",this.message=t}}const o=t=>void 0===globalThis.DOMException?new s(t):new DOMException(t),a=t=>{const e=void 0===t.reason?o("This operation was aborted."):t.reason;return e instanceof Error?e:o(e)};var h,u=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};class c{constructor(){h.set(this,[])}enqueue(t,e){const i={priority:(e={priority:0,...e}).priority,run:t};if(this.size&&u(this,h,"f")[this.size-1].priority>=e.priority)return void u(this,h,"f").push(i);const n=function(t,e){let i=0,n=t.length;for(;n>0;){const s=Math.trunc(n/2);let o=i+s;r=t[o],e.priority-r.priority<=0?(i=++o,n-=s+1):n=s}var r;return i}(u(this,h,"f"),i);u(this,h,"f").splice(n,0,i)}dequeue(){const t=u(this,h,"f").shift();return null==t?void 0:t.run}filter(t){return u(this,h,"f").filter((e=>e.priority===t.priority)).map((t=>t.run))}get size(){return u(this,h,"f").length}}h=new WeakMap;var p,l,f,d,v,m,g,y,_,S,w,E,T,b,I,C,A,O,M,R,V,P,F,L,x,k,N=function(t,e,i,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(t,i):r?r.value=i:e.set(t,i),i},D=function(t,e,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(t):n?n.value:e.get(t)};const W=new r;class z extends Error{}class j extends n{constructor(t){var e,i,n,r;if(super(),p.add(this),l.set(this,void 0),f.set(this,void 0),d.set(this,0),v.set(this,void 0),m.set(this,void 0),g.set(this,0),y.set(this,void 0),_.set(this,void 0),S.set(this,void 0),w.set(this,void 0),E.set(this,0),T.set(this,void 0),b.set(this,void 0),I.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!("number"==typeof(t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:c,...t}).intervalCap&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(i=null===(e=t.intervalCap)||void 0===e?void 0:e.toString())&&void 0!==i?i:""}\` (${typeof t.intervalCap})`);if(void 0===t.interval||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(r=null===(n=t.interval)||void 0===n?void 0:n.toString())&&void 0!==r?r:""}\` (${typeof t.interval})`);N(this,l,t.carryoverConcurrencyCount,"f"),N(this,f,t.intervalCap===Number.POSITIVE_INFINITY||0===t.interval,"f"),N(this,v,t.intervalCap,"f"),N(this,m,t.interval,"f"),N(this,S,new t.queueClass,"f"),N(this,w,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,N(this,I,!0===t.throwOnTimeout,"f"),N(this,b,!1===t.autoStart,"f")}get concurrency(){return D(this,T,"f")}set concurrency(t){if(!("number"==typeof t&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);N(this,T,t,"f"),D(this,p,"m",x).call(this)}async add(t,e={}){return new Promise(((i,n)=>{D(this,S,"f").enqueue((async()=>{var r,s,o;N(this,E,(s=D(this,E,"f"),++s),"f"),N(this,d,(o=D(this,d,"f"),++o),"f");try{if(null===(r=e.signal)||void 0===r?void 0:r.aborted)return void n(new z("The task was aborted."));const s=void 0===this.timeout&&void 0===e.timeout?t({signal:e.signal}):function(t,e,i,n){let r;const s=new Promise(((s,o)=>{if("number"!=typeof e||1!==Math.sign(e))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${e}\``);if(e!==Number.POSITIVE_INFINITY){if((n={customTimers:{setTimeout,clearTimeout},...n}).signal){const{signal:t}=n;t.aborted&&o(a(t)),t.addEventListener("abort",(()=>{o(a(t))}))}r=n.customTimers.setTimeout.call(void 0,(()=>{try{s(i())}catch(t){o(t)}}),e),(async()=>{try{s(await t)}catch(t){o(t)}finally{n.customTimers.clearTimeout.call(void 0,r)}})()}else s(t)}));return s.clear=()=>{clearTimeout(r),r=void 0},s}(Promise.resolve(t({signal:e.signal})),void 0===e.timeout?this.timeout:e.timeout,(()=>{(void 0===e.throwOnTimeout?D(this,I,"f"):e.throwOnTimeout)&&n(W)})),o=await s;i(o),this.emit("completed",o)}catch(t){n(t),this.emit("error",t)}D(this,p,"m",O).call(this)}),e),D(this,p,"m",P).call(this),this.emit("add")}))}async addAll(t,e){return Promise.all(t.map((async t=>this.add(t,e))))}start(){return D(this,b,"f")?(N(this,b,!1,"f"),D(this,p,"m",x).call(this),this):this}pause(){N(this,b,!0,"f")}clear(){N(this,S,new(D(this,w,"f")),"f")}async onEmpty(){0!==D(this,S,"f").size&&await D(this,p,"m",k).call(this,"empty")}async onSizeLessThan(t){D(this,S,"f").size<t||await D(this,p,"m",k).call(this,"next",(()=>D(this,S,"f").size<t))}async onIdle(){0===D(this,E,"f")&&0===D(this,S,"f").size||await D(this,p,"m",k).call(this,"idle")}get size(){return D(this,S,"f").size}sizeBy(t){return D(this,S,"f").filter(t).length}get pending(){return D(this,E,"f")}get isPaused(){return D(this,b,"f")}}l=new WeakMap,f=new WeakMap,d=new WeakMap,v=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,_=new WeakMap,S=new WeakMap,w=new WeakMap,E=new WeakMap,T=new WeakMap,b=new WeakMap,I=new WeakMap,p=new WeakSet,C=function(){return D(this,f,"f")||D(this,d,"f")<D(this,v,"f")},A=function(){return D(this,E,"f")<D(this,T,"f")},O=function(){var t;N(this,E,(t=D(this,E,"f"),--t),"f"),D(this,p,"m",P).call(this),this.emit("next")},M=function(){this.emit("empty"),0===D(this,E,"f")&&this.emit("idle")},R=function(){D(this,p,"m",L).call(this),D(this,p,"m",F).call(this),N(this,_,void 0,"f")},V=function(){const t=Date.now();if(void 0===D(this,y,"f")){const e=D(this,g,"f")-t;if(!(e<0))return void 0===D(this,_,"f")&&N(this,_,setTimeout((()=>{D(this,p,"m",R).call(this)}),e),"f"),!0;N(this,d,D(this,l,"f")?D(this,E,"f"):0,"f")}return!1},P=function(){if(0===D(this,S,"f").size)return D(this,y,"f")&&clearInterval(D(this,y,"f")),N(this,y,void 0,"f"),D(this,p,"m",M).call(this),!1;if(!D(this,b,"f")){const t=!D(this,p,"a",V);if(D(this,p,"a",C)&&D(this,p,"a",A)){const e=D(this,S,"f").dequeue();return!!e&&(this.emit("active"),e(),t&&D(this,p,"m",F).call(this),!0)}}return!1},F=function(){D(this,f,"f")||void 0!==D(this,y,"f")||(N(this,y,setInterval((()=>{D(this,p,"m",L).call(this)}),D(this,m,"f")),"f"),N(this,g,Date.now()+D(this,m,"f"),"f"))},L=function(){0===D(this,d,"f")&&0===D(this,E,"f")&&D(this,y,"f")&&(clearInterval(D(this,y,"f")),N(this,y,void 0,"f")),N(this,d,D(this,l,"f")?D(this,E,"f"):0,"f"),D(this,p,"m",x).call(this)},x=function(){for(;D(this,p,"m",P).call(this););},k=async function(t,e){return new Promise((i=>{const n=()=>{e&&!e()||(this.off(t,n),i())};this.on(t,n)}))}}}]); //# sourceMappingURL=9867.6a0bf83a4fef7d2ee11d.js.map