chaoticbackup.github.io/build/vendor.js
2020-03-01 21:51:59 -05:00

2 lines
840 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! For license information please see vendor.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(t,e,n){"use strict";t.exports=n(1005)},function(t,e,n){var r=n(9),o=n(18),i=n(30),a=n(26),s=n(40),u=function(t,e,n){var c,l,f,p,h=t&u.F,d=t&u.G,y=t&u.S,v=t&u.P,m=t&u.B,g=d?r:y?r[e]||(r[e]={}):(r[e]||{}).prototype,b=d?o:o[e]||(o[e]={}),_=b.prototype||(b.prototype={});for(c in d&&(n=e),n)f=((l=!h&&g&&void 0!==g[c])?g:n)[c],p=m&&l?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,g&&a(g,c,f,t&u.U),b[c]!=f&&i(b,c,p),v&&_[c]!=f&&(_[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"h",(function(){return f})),n.d(e,"j",(function(){return p})),n.d(e,"k",(function(){return h}));const r=new WeakSet,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,c=new WeakMap,l=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap},function(t,e,n){"use strict";(function(t,r){n.d(e,"a",(function(){return k})),n.d(e,"b",(function(){return qt})),n.d(e,"c",(function(){return bt})),n.d(e,"d",(function(){return pt})),n.d(e,"e",(function(){return ft})),n.d(e,"f",(function(){return Kt})),n.d(e,"g",(function(){return et})),n.d(e,"h",(function(){return ne})),n.d(e,"i",(function(){return E})),n.d(e,"j",(function(){return ae})),n.d(e,"k",(function(){return je})),n.d(e,"l",(function(){return Ie})),n.d(e,"m",(function(){return We})),n.d(e,"n",(function(){return Q})),n.d(e,"o",(function(){return fe})),n.d(e,"p",(function(){return Qt})),n.d(e,"q",(function(){return Wt})),n.d(e,"r",(function(){return he})),n.d(e,"s",(function(){return ut}));var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var c=[];Object.freeze(c);var l={};function f(){return++jt.mobxGuid}function p(t){throw h(!1,t),"X"}function h(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(l);function d(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var y=function(){};function v(t){return null!==t&&"object"==typeof t}function m(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function g(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return v(t)&&!0===t[n]}}function _(t){return t instanceof Map}function w(t){return t instanceof Set}function x(t){var e=new Set;for(var n in t)e.add(n);return Object.getOwnPropertySymbols(t).forEach((function(n){Object.getOwnPropertyDescriptor(t,n).enumerable&&e.add(n)})),Array.from(e)}function O(t){return t&&t.toString?t.toString():new String(t).toString()}function S(t){return null===t?null:"object"==typeof t?""+t:t}var k=Symbol("mobx administration"),T=function(){function t(t){void 0===t&&(t="Atom@"+f()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=X.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Nt(this)},t.prototype.reportChanged=function(){It(),function(t){if(t.lowestObserverState===X.STALE)return;t.lowestObserverState=X.STALE,t.observers.forEach((function(e){e.dependenciesState===X.UP_TO_DATE&&(e.isTracing!==J.NONE&&Ft(e,t),e.onBecomeStale()),e.dependenciesState=X.STALE}))}(this),Rt()},t.prototype.toString=function(){return this.name},t}(),C=b("Atom",T);function E(t,e,n){void 0===e&&(e=y),void 0===n&&(n=y);var r,o=new T(t);return e!==y&&ee("onBecomeObserved",o,e,r),n!==y&&te(o,n),o}var A={identity:function(t,e){return t===e},structural:function(t,e){return Ke(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return Ke(t,e,1)}},j=Symbol("mobx did run lazy initializers"),P=Symbol("mobx pending decorators"),D={},M={};function I(t,e){var n=e?D:M;return n[t]||(n[t]={configurable:!0,enumerable:e,get:function(){return R(this),this[t]},set:function(e){R(this),this[t]=e}})}function R(t){var e,n;if(!0!==t[j]){var r=t[P];if(r){g(t,j,!0);var o=u(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var i=a(o),s=i.next();!s.done;s=i.next()){var c=r[s.value];c.propertyCreator(t,c.prop,c.descriptor,c.decoratorTarget,c.decoratorArguments)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}}}}function N(t,e){return function(){var n,r=function(r,o,a,s){if(!0===s)return e(r,o,a,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,P)){var u=r[P];g(r,P,i({},u))}return r[P][o]={prop:o,propertyCreator:e,descriptor:a,decoratorTarget:r,decoratorArguments:n},I(o,t)};return F(arguments)?(n=c,r.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),r)}}function F(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function q(t,e,n){return le(t)?t:Array.isArray(t)?Q.array(t,{name:n}):m(t)?Q.object(t,void 0,{name:n}):_(t)?Q.map(t,{name:n}):w(t)?Q.set(t,{name:n}):t}function V(t){return t}function L(e){h(e);var n=N(!0,(function(t,n,r,o,i){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Ve(t).addObservableProp(n,a,e)})),r=(void 0!==t&&t.env,n);return r.enhancer=e,r}var z={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function B(t){return null==t?z:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(z);var U=L(q),W=L((function(t,e,n){return null==t||We(t)||je(t)||Ie(t)||Fe(t)?t:Array.isArray(t)?Q.array(t,{name:n,deep:!1}):m(t)?Q.object(t,void 0,{name:n,deep:!1}):_(t)?Q.map(t,{name:n,deep:!1}):w(t)?Q.set(t,{name:n,deep:!1}):p(!1)})),$=L(V),H=L((function(t,e,n){return Ke(t,e)?e:t}));function G(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?V:q}var K={box:function(t,e){arguments.length>2&&Y("box");var n=B(e);return new xt(t,G(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Y("array");var n=B(e);return ke(t,G(n),n.name)},map:function(t,e){arguments.length>2&&Y("map");var n=B(e);return new Me(t,G(n),n.name)},set:function(t,e){arguments.length>2&&Y("set");var n=B(e);return new Ne(t,G(n),n.name)},object:function(t,e,n){"string"==typeof arguments[1]&&Y("object");var r=B(n);if(!1===r.proxy)return re({},t,e,r);var o=oe(r),i=re({},void 0,void 0,r),a=me(i);return ie(a,t,e,o),a},ref:$,shallow:W,deep:U,struct:H},Q=function(t,e,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return U.apply(null,arguments);if(le(t))return t;var r=m(t)?Q.object(t,e,n):Array.isArray(t)?Q.array(t,e):_(t)?Q.map(t,e):w(t)?Q.set(t,e):t;if(r!==t)return r;p(!1)};function Y(t){p("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(K).forEach((function(t){return Q[t]=K[t]}));var X,J,Z=N(!1,(function(t,e,n,r,o){var a=n.get,s=n.set,u=o[0]||{};Ve(t).addComputedProp(t,e,i({get:a,set:s,context:t},u))})),tt=Z({equals:A.structural}),et=function(t,e,n){if("string"==typeof e)return Z.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return Z.apply(null,arguments);var r="object"==typeof e?e:{};return r.get=t,r.set="function"==typeof e?e:r.set,r.name=r.name||t.name||"",new Ot(r)};et.struct=tt,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(X||(X={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(J||(J={}));var nt=function(t){this.cause=t};function rt(t){return t instanceof nt}function ot(t){switch(t.dependenciesState){case X.UP_TO_DATE:return!1;case X.NOT_TRACKING:case X.STALE:return!0;case X.POSSIBLY_STALE:for(var e=ft(!0),n=ct(),r=t.observing,o=r.length,i=0;i<o;i++){var a=r[i];if(St(a)){if(jt.disableErrorBoundaries)a.get();else try{a.get()}catch(t){return lt(n),pt(e),!0}if(t.dependenciesState===X.STALE)return lt(n),pt(e),!0}}return ht(t),lt(n),pt(e),!1}}function it(t){var e=t.observers.size>0;jt.computationDepth>0&&e&&p(!1),jt.allowStateChanges||!e&&"strict"!==jt.enforceActions||p(!1)}function at(t,e,n){var r=ft(!0);ht(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++jt.runId;var o,i=jt.trackingDerivation;if(jt.trackingDerivation=t,!0===jt.disableErrorBoundaries)o=e.call(n);else try{o=e.call(n)}catch(t){o=new nt(t)}return jt.trackingDerivation=i,function(t){for(var e=t.observing,n=t.observing=t.newObserving,r=X.UP_TO_DATE,o=0,i=t.unboundDepsCount,a=0;a<i;a++){0===(s=n[a]).diffValue&&(s.diffValue=1,o!==a&&(n[o]=s),o++),s.dependenciesState>r&&(r=s.dependenciesState)}n.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(s=e[i]).diffValue&&Dt(s,t),s.diffValue=0}for(;o--;){var s;1===(s=n[o]).diffValue&&(s.diffValue=0,Pt(s,t))}r!==X.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}(t),pt(r),o}function st(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)Dt(e[n],t);t.dependenciesState=X.NOT_TRACKING}function ut(t){var e=ct();try{return t()}finally{lt(e)}}function ct(){var t=jt.trackingDerivation;return jt.trackingDerivation=null,t}function lt(t){jt.trackingDerivation=t}function ft(t){var e=jt.allowStateReads;return jt.allowStateReads=t,e}function pt(t){jt.allowStateReads=t}function ht(t){if(t.dependenciesState!==X.UP_TO_DATE){t.dependenciesState=X.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=X.UP_TO_DATE}}var dt=0,yt=1,vt=Object.getOwnPropertyDescriptor((function(){}),"name");vt&&vt.configurable;function mt(t,e,n){var r=function(){return gt(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function gt(t,e,n,r){var o=function(t,e,n){var r=0;var o=ct();It();var i=_t(!0),a=ft(!0),s={prevDerivation:o,prevAllowStateChanges:i,prevAllowStateReads:a,notifySpy:!1,startTime:r,actionId:yt++,parentActionId:dt};return dt=s.actionId,s}();try{return e.apply(n,r)}catch(t){throw o.error=t,t}finally{!function(t){dt!==t.actionId&&p("invalid action stack. did you forget to finish an action?");dt=t.parentActionId,void 0!==t.error&&(jt.suppressReactionErrors=!0);wt(t.prevAllowStateChanges),pt(t.prevAllowStateReads),Rt(),lt(t.prevDerivation),t.notifySpy&&!1;jt.suppressReactionErrors=!1}(o)}}function bt(t,e){var n,r=_t(t);try{n=e()}finally{wt(r)}return n}function _t(t){var e=jt.allowStateChanges;return jt.allowStateChanges=t,e}function wt(t){jt.allowStateChanges=t}var xt=function(t){function e(e,n,r,o,i){void 0===r&&(r="ObservableValue@"+f()),void 0===o&&(o=!0),void 0===i&&(i=A.default);var a=t.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=i,a.hasUnreportedChange=!1,a.value=n(e,void 0,r),a}return function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==jt.UNCHANGED){0,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(it(this),ge(this)){var e=_e(this,{object:this,type:"update",newValue:t});if(!e)return jt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?jt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),we(this)&&Oe(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return be(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),xe(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return S(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(T),Ot=(b("ObservableValue",xt),function(){function t(t){this.dependenciesState=X.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=X.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+f(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=J.NONE,h(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+f(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?A.structural:A.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==X.UP_TO_DATE)return;t.lowestObserverState=X.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===X.UP_TO_DATE&&(e.dependenciesState=X.POSSIBLY_STALE,e.isTracing!==J.NONE&&Ft(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&p("Cycle detected in computation "+this.name+": "+this.derivation),0!==jt.inBatch||0!==this.observers.size||this.keepAlive?(Nt(this),ot(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===X.STALE)return;t.lowestObserverState=X.STALE,t.observers.forEach((function(e){e.dependenciesState===X.POSSIBLY_STALE?e.dependenciesState=X.STALE:e.dependenciesState===X.UP_TO_DATE&&(t.lowestObserverState=X.UP_TO_DATE)}))}(this)):ot(this)&&(this.warnAboutUntrackedRead(),It(),this.value=this.computeValue(!1),Rt());var t=this.value;if(rt(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(rt(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){h(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else h(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===X.NOT_TRACKING,n=this.computeValue(!0),r=e||rt(t)||rt(n)||!this.equals(t,n);return r&&(this.value=n),r},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,jt.computationDepth++,t)e=at(this,this.derivation,this.scope);else if(!0===jt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return jt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var n=this,r=!0,o=void 0;return Xt((function(){var i=n.get();if(!r||e){var a=ct();t({type:"update",object:n,newValue:i,oldValue:o}),lt(a)}r=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}()),St=b("ComputedValue",Ot),kt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Ct(){return"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:Tt}var Et=!0,At=!1,jt=function(){var t=Ct();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Et=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new kt).version&&(Et=!1),Et?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new kt):(setTimeout((function(){At||p("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new kt)}();function Pt(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Dt(t,e){t.observers.delete(e),0===t.observers.size&&Mt(t)}function Mt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,jt.pendingUnobservations.push(t))}function It(){jt.inBatch++}function Rt(){if(0==--jt.inBatch){Lt();for(var t=jt.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Ot&&n.suspend())}jt.pendingUnobservations=[]}}function Nt(t){var e=jt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&jt.inBatch>0&&Mt(t),!1)}function Ft(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===J.BREAK){var n=[];!function t(e,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+e.name),e.dependencies&&e.dependencies.forEach((function(e){return t(e,n,r+1)}))}(ae(t),n,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof Ot?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var qt=function(){function t(t,e,n,r){void 0===t&&(t="Reaction@"+f()),void 0===r&&(r=!1),this.name=t,this.onInvalidate=e,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=X.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+f(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=J.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,jt.pendingReactions.push(this),Lt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(It(),this._isScheduled=!1,ot(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Rt()}},t.prototype.track=function(t){if(!this.isDisposed){It();0,this._isRunning=!0;var e=at(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),rt(e)&&this.reportExceptionInDerivation(e.cause),Rt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(jt.disableErrorBoundaries)throw t;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";jt.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,t),jt.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(It(),st(this),Rt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[k]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!1;"boolean"==typeof t[t.length-1]&&(n=t.pop());var r=pe(t);if(!r)return p(!1);r.isTracing===J.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled");r.isTracing=n?J.BREAK:J.LOG}(this,t)},t}();var Vt=function(t){return t()};function Lt(){jt.inBatch>0||jt.isRunningReactions||Vt(zt)}function zt(){jt.isRunningReactions=!0;for(var t=jt.pendingReactions,e=0;t.length>0;){100==++e&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+t[0]),t.splice(0));for(var n=t.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}jt.isRunningReactions=!1}var Bt=b("Reaction",qt);function Ut(t){var e=Vt;Vt=function(n){return t((function(){return e(n)}))}}function Wt(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function $t(){p(!1)}function Ht(t){return function(e,n,r){if(r){if(r.value)return{value:mt(t,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Gt(t).apply(this,arguments)}}function Gt(t){return function(e,n,r){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(e){g(this,n,Kt(t,e))}})}}var Kt=function(t,e,n,r){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?Ht(t):!0!==r?Ht(e).apply(null,arguments):void g(t,e,mt(t.name||e,n.value,this))};function Qt(t,e){"string"==typeof t||t.name;return gt(0,"function"==typeof t?t:e,this,void 0)}function Yt(t,e,n){g(t,e,mt(e,n.bind(t)))}function Xt(t,e){void 0===e&&(e=l);var n,r=e&&e.name||t.name||"Autorun@"+f();if(!e.scheduler&&!e.delay)n=new qt(r,(function(){this.track(a)}),e.onError,e.requiresObservable);else{var o=Zt(e),i=!1;n=new qt(r,(function(){i||(i=!0,o((function(){i=!1,n.isDisposed||n.track(a)})))}),e.onError,e.requiresObservable)}function a(){t(n)}return n.schedule(),n.getDisposer()}Kt.bound=function(t,e,n,r){return!0===r?(Yt(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Yt(this,e,n.value||n.initializer.call(this)),this[e]},set:$t}:{enumerable:!1,configurable:!0,set:function(t){Yt(this,e,t)},get:function(){}}};var Jt=function(t){return t()};function Zt(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Jt}function te(t,e,n){return ee("onBecomeUnobserved",t,e,n)}function ee(t,e,n,r){var o="function"==typeof r?$e(e,n):$e(e),i="function"==typeof r?r:n,a=t+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[t]?p(!1):function(){var t=o[a];t&&(t.delete(i),0===t.size&&delete o[a])}}function ne(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,a=t.reactionRequiresObservable,s=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((jt.pendingReactions.length||jt.inBatch||jt.isRunningReactions)&&p("isolateGlobalState should be called before MobX is running any reactions"),At=!0,Et&&(0==--Ct().__mobxInstanceCount&&(Ct().__mobxGlobals=void 0),jt=new kt)),void 0!==e){var u=void 0;switch(e){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:p("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}jt.enforceActions=u,jt.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(jt.computedRequiresReaction=!!n),void 0!==a&&(jt.reactionRequiresObservable=!!a),void 0!==s&&(jt.observableRequiresReaction=!!s,jt.allowStateReads=!jt.observableRequiresReaction),void 0!==r&&(jt.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),jt.disableErrorBoundaries=!!o),i&&Ut(i)}function re(t,e,n,r){var o=oe(r=B(r));return R(t),Ve(t,r.name,o.enhancer),e&&ie(t,e,n,o),t}function oe(t){return t.defaultDecorator||(!1===t.deep?$:U)}function ie(t,e,n,r){var o,i;It();try{var s=x(e);try{for(var u=a(s),c=u.next();!c.done;c=u.next()){var l=c.value,f=Object.getOwnPropertyDescriptor(e,l);0;var p=(n&&l in n?n[l]:f.get?Z:r)(t,l,f,!0);p&&Object.defineProperty(t,l,p)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}}finally{Rt()}}function ae(t,e){return se($e(t,e))}function se(t){var e,n,r={name:t.name};return t.observing&&t.observing.length>0&&(r.dependencies=(e=t.observing,n=[],e.forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n).map(se)),r}function ue(){this.message="FLOW_CANCELLED"}function ce(t,e){return null!=t&&(void 0!==e?!!We(t)&&t[k].values.has(e):We(t)||!!t[k]||C(t)||Bt(t)||St(t))}function le(t){return 1!==arguments.length&&p(!1),ce(t)}function fe(t,e,n,r){return"function"==typeof n?function(t,e,n,r){return He(t,e).observe(n,r)}(t,e,n,r):function(t,e,n){return He(t).observe(e,n)}(t,e,n)}ue.prototype=Object.create(Error.prototype);function pe(t){switch(t.length){case 0:return jt.trackingDerivation;case 1:return $e(t[0]);case 2:return $e(t[0],t[1])}}function he(t,e){void 0===e&&(e=void 0),It();try{return t.apply(e)}finally{Rt()}}function de(t){return t[k]}function ye(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ve={has:function(t,e){if(e===k||"constructor"===e||e===j)return!0;var n=de(t);return ye(e)?n.has(e):e in t},get:function(t,e){if(e===k||"constructor"===e||e===j)return t[e];var n=de(t),r=n.values.get(e);if(r instanceof T){var o=r.get();return void 0===o&&n.has(e),o}return ye(e)&&n.has(e),t[e]},set:function(t,e,n){return!!ye(e)&&(function t(e,n,r){if(2!==arguments.length||Fe(e))if(We(e)){var o=e[k],i=o.values.get(n);i?o.write(n,r):o.addObservableProp(n,r,o.defaultEnhancer)}else if(Ie(e))e.set(n,r);else if(Fe(e))e.add(n);else{if(!je(e))return p(!1);"number"!=typeof n&&(n=parseInt(n,10)),h(n>=0,"Not a valid index: '"+n+"'"),It(),n>=e.length&&(e.length=n+1),e[n]=r,Rt()}else{It();var a=n;try{for(var s in a)t(e,s,a[s])}finally{Rt()}}}(t,e,n),!0)},deleteProperty:function(t,e){return!!ye(e)&&(de(t).remove(e),!0)},ownKeys:function(t){return de(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return p("Dynamic observable objects cannot be frozen"),!1}};function me(t){var e=new Proxy(t,ve);return t[k].proxy=e,e}function ge(t){return void 0!==t.interceptors&&t.interceptors.length>0}function be(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),d((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function _e(t,e){var n=ct();try{for(var r=u(t.interceptors||[]),o=0,i=r.length;o<i&&(h(!(e=r[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{lt(n)}}function we(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function xe(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),d((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Oe(t,e){var n=ct(),r=t.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](e);lt(n)}}var Se={get:function(t,e){return e===k?t[k]:"length"===e?t[k].getArrayLength():"number"==typeof e?Ce.get.call(t,e):"string"!=typeof e||isNaN(e)?Ce.hasOwnProperty(e)?Ce[e]:t[e]:Ce.get.call(t,parseInt(e))},set:function(t,e,n){return"length"===e&&t[k].setArrayLength(n),"number"==typeof e&&Ce.set.call(t,e,n),"symbol"==typeof e||isNaN(e)?t[e]=n:Ce.set.call(t,parseInt(e),n),!0},preventExtensions:function(t){return p("Observable arrays cannot be frozen"),!1}};function ke(t,e,n,r){void 0===n&&(n="ObservableArray@"+f()),void 0===r&&(r=!1);var o,i,a,s=new Te(n,e,r);o=s.values,i=k,a=s,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:a});var u=new Proxy(s.values,Se);if(s.proxy=u,t&&t.length){var c=_t(!0);s.spliceWithArray(0,0,t),wt(c)}return u}var Te=function(){function t(t,e,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new T(t||"ObservableArray@"+f()),this.enhancer=function(n,r){return e(n,r,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return be(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),xe(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var n=new Array(t-e),r=0;r<t-e;r++)n[r]=void 0;this.spliceWithArray(e,0,n)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,n){var r=this;it(this.atom);var o=this.values.length;if(void 0===t?t=0:t>o?t=o:t<0&&(t=Math.max(0,o+t)),e=1===arguments.length?o-t:null==e?0:Math.max(0,Math.min(e,o-t)),void 0===n&&(n=c),ge(this)){var i=_e(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:n});if(!i)return c;e=i.removedCount,n=i.added}n=0===n.length?n:n.map((function(t){return r.enhancer(t,void 0)}));var a=this.spliceItemsIntoValues(t,e,n);return 0===e&&0===n.length||this.notifyArraySplice(t,n,a),this.dehanceValues(a)},t.prototype.spliceItemsIntoValues=function(t,e,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,u([t,e],n));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,n){var r=!this.owned&&!1,o=we(this),i=o||r?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:n}:null;this.atom.reportChanged(),o&&Oe(this,i)},t.prototype.notifyArraySplice=function(t,e,n){var r=!this.owned&&!1,o=we(this),i=o||r?{object:this.proxy,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Oe(this,i)},t}(),Ce={intercept:function(t){return this[k].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[k].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[k];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this[k];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,n)},spliceWithArray:function(t,e,n){return this[k].spliceWithArray(t,e,n)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[k];return n.spliceWithArray(n.values.length,0,t),n.values.length},pop:function(){return this.splice(Math.max(this[k].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[k];return n.spliceWithArray(0,0,t),n.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[k],n=e.dehanceValues(e.values).indexOf(t);return n>-1&&(this.splice(n,1),!0)},get:function(t){var e=this[k];if(e){if(t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t]);console.warn("[mobx.array] Attempt to read an array index ("+t+") that is out of bounds ("+e.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(t,e){var n=this[k],r=n.values;if(t<r.length){it(n.atom);var o=r[t];if(ge(n)){var i=_e(n,{type:"update",object:n.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=n.enhancer(e,o))!==o&&(r[t]=e,n.notifyArrayChildUpdate(t,e,o))}else{if(t!==r.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+r.length);n.spliceWithArray(t,0,[e])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(t){Ce[t]=function(){var e=this[k];e.atom.reportObserved();var n=e.dehanceValues(e.values);return n[t].apply(n,arguments)}}));var Ee,Ae=b("ObservableArrayAdministration",Te);function je(t){return v(t)&&Ae(t[k])}var Pe,De={},Me=function(){function t(t,e,n){if(void 0===e&&(e=q),void 0===n&&(n="ObservableMap@"+f()),this.enhancer=e,this.name=n,this[Ee]=De,this._keysAtom=E(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!jt.trackingDerivation)return this._has(t);var n=this._hasMap.get(t);if(!n){var r=n=new xt(this._has(t),V,this.name+"."+O(t)+"?",!1);this._hasMap.set(t,r),te(r,(function(){return e._hasMap.delete(t)}))}return n.get()},t.prototype.set=function(t,e){var n=this._has(t);if(ge(this)){var r=_e(this,{type:n?"update":"add",object:this,newValue:e,name:t});if(!r)return this;e=r.newValue}return n?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if(ge(this)&&!(r=_e(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var n=we(this),r=n?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return he((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),n&&Oe(this,r),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var n=this._hasMap.get(t);n&&n.setNewValue(e)},t.prototype._updateValue=function(t,e){var n=this._data.get(t);if((e=n.prepareNewValue(e))!==jt.UNCHANGED){var r=we(this),o=r?{type:"update",object:this,oldValue:n.value,name:t,newValue:e}:null;0,n.setNewValue(e),r&&Oe(this,o)}},t.prototype._addValue=function(t,e){var n=this;it(this._keysAtom),he((function(){var r=new xt(e,n.enhancer,n.name+"."+O(t),!1);n._data.set(t,r),e=r.value,n._updateHasMapEntry(t,!0),n._keysAtom.reportChanged()}));var r=we(this),o=r?{type:"add",object:this,name:t,newValue:e}:null;r&&Oe(this,o)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=0,n=Array.from(this.keys());return Xe({next:function(){return e<n.length?{value:t.get(n[e++]),done:!1}:{done:!0}}})},t.prototype.entries=function(){var t=this,e=0,n=Array.from(this.keys());return Xe({next:function(){if(e<n.length){var r=n[e++];return{value:[r,t.get(r)],done:!1}}return{done:!0}}})},t.prototype[(Ee=k,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var n,r;try{for(var o=a(this),i=o.next();!i.done;i=o.next()){var u=s(i.value,2),c=u[0],l=u[1];t.call(e,l,c,this)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype.merge=function(t){var e=this;return Ie(t)&&(t=t.toJS()),he((function(){m(t)?x(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=s(t,2),r=n[0],o=n[1];return e.set(r,o)})):_(t)?(t.constructor!==Map&&p("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,n){return e.set(n,t)}))):null!=t&&p("Cannot initialize map from "+t)})),this},t.prototype.clear=function(){var t=this;he((function(){ut((function(){var e,n;try{for(var r=a(t.keys()),o=r.next();!o.done;o=r.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return he((function(){var n,r=m(n=t)?Object.keys(n):Array.isArray(n)?n.map((function(t){return s(t,1)[0]})):_(n)||Ie(n)?Array.from(n.keys()):p("Cannot get keys from '"+n+"'");Array.from(e.keys()).filter((function(t){return-1===r.indexOf(t)})).forEach((function(t){return e.delete(t)})),e.merge(t)})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,n={};try{for(var r=a(this),o=r.next();!o.done;o=r.next()){var i=s(o.value,2),u=i[0],c=i[1];n["symbol"==typeof u?u:O(u)]=c}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return O(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return xe(this,t)},t.prototype.intercept=function(t){return be(this,t)},t}(),Ie=b("ObservableMap",Me),Re={},Ne=function(){function t(t,e,n){if(void 0===e&&(e=q),void 0===n&&(n="ObservableSet@"+f()),this.name=n,this[Pe]=Re,this._data=new Set,this._atom=E(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,r){return e(t,r,n)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;he((function(){ut((function(){var e,n;try{for(var r=a(t._data.values()),o=r.next();!o.done;o=r.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var n,r;try{for(var o=a(this),i=o.next();!i.done;i=o.next()){var s=i.value;t.call(e,s,s,this)}}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((it(this._atom),ge(this))&&!(r=_e(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){he((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var n=we(this),r=n?{type:"add",object:this,newValue:t}:null;0,n&&Oe(this,r)}return this},t.prototype.delete=function(t){var e=this;if(ge(this)&&!(r=_e(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var n=we(this),r=n?{type:"delete",object:this,oldValue:t}:null;return he((function(){e._atom.reportChanged(),e._data.delete(t)})),n&&Oe(this,r),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),n=Array.from(this.values());return Xe({next:function(){var r=t;return t+=1,r<n.length?{value:[e[r],n[r]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,n=Array.from(this._data.values());return Xe({next:function(){return e<n.length?{value:t.dehanceValue(n[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return Fe(t)&&(t=t.toJS()),he((function(){Array.isArray(t)||w(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&p("Cannot initialize set from "+t)})),this},t.prototype.observe=function(t,e){return xe(this,t)},t.prototype.intercept=function(t){return be(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(Pe=k,Symbol.iterator)]=function(){return this.values()},t}(),Fe=b("ObservableSet",Ne),qe=function(){function t(t,e,n,r){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=n,this.defaultEnhancer=r,this.keysAtom=new T(n+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var n=this.target,r=this.values.get(t);if(r instanceof Ot)r.set(e);else{if(ge(this)){if(!(i=_e(this,{type:"update",object:this.proxy||n,name:t,newValue:e})))return;e=i.newValue}if((e=r.prepareNewValue(e))!==jt.UNCHANGED){var o=we(this),i=o?{type:"update",object:this.proxy||n,oldValue:r.value,name:t,newValue:e}:null;0,r.setNewValue(e),o&&Oe(this,i)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),n=e.get(t);if(n)return n.get();var r=!!this.values.get(t);return n=new xt(r,V,this.name+"."+O(t)+"?",!1),e.set(t,n),n.get()},t.prototype.addObservableProp=function(t,e,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(ge(this)){var o=_e(this,{object:this.proxy||r,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new xt(e,n,this.name+"."+O(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(r,t,function(t){return Le[t]||(Le[t]={configurable:!0,enumerable:!0,get:function(){return this[k].read(t)},set:function(e){this[k].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,n){var r,o,i,a=this.target;n.name=n.name||this.name+"."+O(e),this.values.set(e,new Ot(n)),(t===a||(r=t,o=e,!(i=Object.getOwnPropertyDescriptor(r,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return ze[t]||(ze[t]={configurable:jt.computedConfigurable,enumerable:!1,get:function(){return Be(this).read(t)},set:function(e){Be(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(ge(this))if(!(a=_e(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{It();var n=we(this),r=this.values.get(t),o=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!1)}delete this.target[t];var a=n?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;0,n&&Oe(this,a)}finally{Rt()}}},t.prototype.illegalAccess=function(t,e){console.warn("Property '"+e+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},t.prototype.observe=function(t,e){return xe(this,t)},t.prototype.intercept=function(t){return be(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var n=we(this),r=n?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(n&&Oe(this,r),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var n=[];try{for(var r=a(this.values),o=r.next();!o.done;o=r.next()){var i=s(o.value,2),u=i[0];i[1]instanceof xt&&n.push(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t}();function Ve(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n=q),Object.prototype.hasOwnProperty.call(t,k))return t[k];m(t)||(e=(t.constructor.name||"ObservableObject")+"@"+f()),e||(e="ObservableObject@"+f());var r=new qe(t,new Map,O(e),n);return g(t,k,r),r}var Le=Object.create(null),ze=Object.create(null);function Be(t){var e=t[k];return e||(R(t),t[k])}var Ue=b("ObservableObjectAdministration",qe);function We(t){return!!v(t)&&(R(t),Ue(t[k]))}function $e(t,e){if("object"==typeof t&&null!==t){if(je(t))return void 0!==e&&p(!1),t[k].atom;if(Fe(t))return t[k];if(Ie(t)){var n=t;return void 0===e?n._keysAtom:((r=n._data.get(e)||n._hasMap.get(e))||p(!1),r)}var r;if(R(t),e&&!t[k]&&t[e],We(t))return e?((r=t[k].values.get(e))||p(!1),r):p(!1);if(C(t)||St(t)||Bt(t))return t}else if("function"==typeof t&&Bt(t[k]))return t[k];return p(!1)}function He(t,e){return t||p("Expecting some object"),void 0!==e?He($e(t,e)):C(t)||St(t)||Bt(t)||Ie(t)||Fe(t)?t:(R(t),t[k]?t[k]:void p(!1))}var Ge=Object.prototype.toString;function Ke(t,e,n){return void 0===n&&(n=-1),function t(e,n,r,o,i){if(e===n)return 0!==e||1/e==1/n;if(null==e||null==n)return!1;if(e!=e)return n!=n;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;var s=Ge.call(e);if(s!==Ge.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:0==+e?1/+e==1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}e=Qe(e),n=Qe(n);var u="[object Array]"===s;if(!u){if("object"!=typeof e||"object"!=typeof n)return!1;var c=e.constructor,l=n.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];var f=(o=o||[]).length;for(;f--;)if(o[f]===e)return i[f]===n;if(o.push(e),i.push(n),u){if((f=e.length)!==n.length)return!1;for(;f--;)if(!t(e[f],n[f],r-1,o,i))return!1}else{var p=Object.keys(e),h=void 0;if(f=p.length,Object.keys(n).length!==f)return!1;for(;f--;)if(h=p[f],!Ye(n,h)||!t(e[h],n[h],r-1,o,i))return!1}return o.pop(),i.pop(),!0}(t,e,n)}function Qe(t){return je(t)?t.slice():_(t)||Ie(t)||w(t)||Fe(t)?Array.from(t.entries()):t}function Ye(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Xe(t){return t[Symbol.iterator]=Je,t}function Je(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Wt,extras:{getDebugName:function(t,e){return(void 0!==e?$e(t,e):We(t)||Ie(t)||Fe(t)?He(t):$e(t)).name}},$mobx:k})}).call(this,n(206),n(159))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7);const o=(t,e)=>{Object(r.a)(t,e,"channelCount"),Object(r.a)(t,e,"channelCountMode"),Object(r.a)(t,e,"channelInterpretation")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}));const r=-34028234663852886e22,o=-r},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>t.context===e},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n)=>{const r=e[n];void 0!==r&&r!==t[n]&&(t[n]=r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n)=>{const r=e[n];void 0!==r&&r!==t[n].value&&(t[n].value=r)}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(12);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(23);const i=t=>Object(o.a)(r.c,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","InvalidStateError")}catch(t){return t.code=11,t.name="InvalidStateError",t}}},function(t,e,n){var r=n(110)("wks"),o=n(66),i=n(9).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(42),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(23);const i=t=>Object(o.a)(r.b,t)},function(t,e,n){t.exports=!n(10)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(11),o=n(172),i=n(56),a=Object.defineProperty;e.f=n(20)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","NotSupportedError")}catch(t){return t.code=9,t.name="NotSupportedError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>{const n=t.get(e);if(void 0===n)throw new Error("A value with the given key could not be found.");return n}},function(t,e,n){var r=n(52);t.exports=function(t){return Object(r(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(t.connect=e.connect.bind(e),t.disconnect=e.disconnect.bind(e),t)},function(t,e,n){var r=n(9),o=n(30),i=n(29),a=n(66)("src"),s=n(824),u=(""+s).split("toString");n(18).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var r=n(1),o=n(10),i=n(52),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),s+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){"use strict";e.a=function(t,e){if(!t)throw new Error("Invariant failed")}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(21),o=n(65);t.exports=n(20)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(103),o=n(52);t.exports=function(t){return r(o(t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>"inputs"in t},function(t,e,n){"use strict";function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(16);function o(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var a=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],a=e&&e.split("/")||[],s=t&&o(t),u=e&&o(e),c=s||u;if(t&&o(t)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var l=a[a.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,p=a.length;p>=0;p--){var h=a[p];"."===h?i(a,p):".."===h?(i(a,p),f++):f&&(i(a,p),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&o(a[0])||a.unshift("");var d=a.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"==typeof e||"object"==typeof n){var r=s(e),o=s(n);return r!==e||o!==n?t(r,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},c=n(28);function l(t){return"/"===t.charAt(0)?t:"/"+t}function f(t){return"/"===t.charAt(0)?t.substr(1):t}function p(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function h(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function d(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function y(t,e,n,o){var i;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(i=Object(r.a)({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function v(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function m(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}n.d(e,"a",(function(){return w})),n.d(e,"b",(function(){return T})),n.d(e,"d",(function(){return E})),n.d(e,"c",(function(){return y})),n.d(e,"f",(function(){return v})),n.d(e,"e",(function(){return d}));var g=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(t,e){e(window.confirm(t))}function _(){try{return window.history.state||{}}catch(t){return{}}}function w(t){void 0===t&&(t={}),g||Object(c.a)(!1);var e,n=window.history,o=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t,s=a.forceRefresh,u=void 0!==s&&s,f=a.getUserConfirmation,v=void 0===f?b:f,w=a.keyLength,x=void 0===w?6:w,O=t.basename?h(l(t.basename)):"";function S(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname+o.search+o.hash;return O&&(i=p(i,O)),y(i,r,n)}function k(){return Math.random().toString(36).substr(2,x)}var T=m();function C(t){Object(r.a)(V,t),V.length=n.length,T.notifyListeners(V.location,V.action)}function E(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||P(S(t.state))}function A(){P(S(_()))}var j=!1;function P(t){if(j)j=!1,C();else{T.confirmTransitionTo(t,"POP",v,(function(e){e?C({action:"POP",location:t}):function(t){var e=V.location,n=M.indexOf(e.key);-1===n&&(n=0);var r=M.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(j=!0,R(o))}(t)}))}}var D=S(_()),M=[D.key];function I(t){return O+d(t)}function R(t){n.go(t)}var N=0;function F(t){1===(N+=t)&&1===t?(window.addEventListener("popstate",E),i&&window.addEventListener("hashchange",A)):0===N&&(window.removeEventListener("popstate",E),i&&window.removeEventListener("hashchange",A))}var q=!1;var V={length:n.length,action:"POP",location:D,createHref:I,push:function(t,e){var r=y(t,e,k(),V.location);T.confirmTransitionTo(r,"PUSH",v,(function(t){if(t){var e=I(r),i=r.key,a=r.state;if(o)if(n.pushState({key:i,state:a},null,e),u)window.location.href=e;else{var s=M.indexOf(V.location.key),c=M.slice(0,s+1);c.push(r.key),M=c,C({action:"PUSH",location:r})}else window.location.href=e}}))},replace:function(t,e){var r=y(t,e,k(),V.location);T.confirmTransitionTo(r,"REPLACE",v,(function(t){if(t){var e=I(r),i=r.key,a=r.state;if(o)if(n.replaceState({key:i,state:a},null,e),u)window.location.replace(e);else{var s=M.indexOf(V.location.key);-1!==s&&(M[s]=r.key),C({action:"REPLACE",location:r})}else window.location.replace(e)}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(t){void 0===t&&(t=!1);var e=T.setPrompt(t);return q||(F(1),q=!0),function(){return q&&(q=!1,F(-1)),e()}},listen:function(t){var e=T.appendListener(t);return F(1),function(){F(-1),e()}}};return V}var x={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+f(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:f,decodePath:l},slash:{encodePath:l,decodePath:l}};function O(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function S(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function k(t){window.location.replace(O(window.location.href)+"#"+t)}function T(t){void 0===t&&(t={}),g||Object(c.a)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),o=n.getUserConfirmation,i=void 0===o?b:o,a=n.hashType,s=void 0===a?"slash":a,u=t.basename?h(l(t.basename)):"",f=x[s],v=f.encodePath,_=f.decodePath;function w(){var t=_(S());return u&&(t=p(t,u)),y(t)}var T=m();function C(t){Object(r.a)(V,t),V.length=e.length,T.notifyListeners(V.location,V.action)}var E=!1,A=null;function j(){var t,e,n=S(),r=v(n);if(n!==r)k(r);else{var o=w(),a=V.location;if(!E&&(e=o,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(A===d(o))return;A=null,function(t){if(E)E=!1,C();else{T.confirmTransitionTo(t,"POP",i,(function(e){e?C({action:"POP",location:t}):function(t){var e=V.location,n=I.lastIndexOf(d(e));-1===n&&(n=0);var r=I.lastIndexOf(d(t));-1===r&&(r=0);var o=n-r;o&&(E=!0,R(o))}(t)}))}}(o)}}var P=S(),D=v(P);P!==D&&k(D);var M=w(),I=[d(M)];function R(t){e.go(t)}var N=0;function F(t){1===(N+=t)&&1===t?window.addEventListener("hashchange",j):0===N&&window.removeEventListener("hashchange",j)}var q=!1;var V={length:e.length,action:"POP",location:M,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=O(window.location.href)),n+"#"+v(u+d(t))},push:function(t,e){var n=y(t,void 0,void 0,V.location);T.confirmTransitionTo(n,"PUSH",i,(function(t){if(t){var e=d(n),r=v(u+e);if(S()!==r){A=e,function(t){window.location.hash=t}(r);var o=I.lastIndexOf(d(V.location)),i=I.slice(0,o+1);i.push(e),I=i,C({action:"PUSH",location:n})}else C()}}))},replace:function(t,e){var n=y(t,void 0,void 0,V.location);T.confirmTransitionTo(n,"REPLACE",i,(function(t){if(t){var e=d(n),r=v(u+e);S()!==r&&(A=e,k(r));var o=I.indexOf(d(V.location));-1!==o&&(I[o]=e),C({action:"REPLACE",location:n})}}))},go:R,goBack:function(){R(-1)},goForward:function(){R(1)},block:function(t){void 0===t&&(t=!1);var e=T.setPrompt(t);return q||(F(1),q=!0),function(){return q&&(q=!1,F(-1)),e()}},listen:function(t){var e=T.appendListener(t);return F(1),function(){F(-1),e()}}};return V}function C(t,e,n){return Math.min(Math.max(t,e),n)}function E(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,o=e.initialEntries,i=void 0===o?["/"]:o,a=e.initialIndex,s=void 0===a?0:a,u=e.keyLength,c=void 0===u?6:u,l=m();function f(t){Object(r.a)(_,t),_.length=_.entries.length,l.notifyListeners(_.location,_.action)}function p(){return Math.random().toString(36).substr(2,c)}var h=C(s,0,i.length-1),v=i.map((function(t){return y(t,void 0,"string"==typeof t?p():t.key||p())})),g=d;function b(t){var e=C(_.index+t,0,_.entries.length-1),r=_.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?f({action:"POP",location:r,index:e}):f()}))}var _={length:v.length,action:"POP",location:v[h],index:h,entries:v,createHref:g,push:function(t,e){var r=y(t,e,p(),_.location);l.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=_.index+1,n=_.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),f({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=y(t,e,p(),_.location);l.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(_.entries[_.index]=r,f({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(t){var e=_.index+t;return e>=0&&e<_.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return _}},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=t.decodeAudioData(e.buffer,()=>{});return void 0!==n&&(n.catch(()=>{}),!0)}catch(t){}return!1}},function(t,e,n){t.exports=n(203)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","IndexSizeError")}catch(t){return t.code=1,t.name="IndexSizeError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r)=>{for(const e of t)if(n(e)){if(r)return!1;throw Error("The set contains at least one similar element.")}return t.add(e),!0}},function(t,e,n){var r=n(41);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(104),o=n(65),i=n(31),a=n(56),s=n(29),u=n(172),c=Object.getOwnPropertyDescriptor;e.f=n(20)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(1),o=n(18),i=n(10);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(40),o=n(103),i=n(24),a=n(17),s=n(188);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,f=6==t,p=5==t||f,h=e||s;return function(e,s,d){for(var y,v,m=i(e),g=o(m),b=r(s,d,3),_=a(g.length),w=0,x=n?h(e,_):u?h(e,0):void 0;_>w;w++)if((p||w in g)&&(v=b(y=g[w],w,m),t))if(n)x[w]=v;else if(v)switch(t){case 3:return!0;case 5:return y;case 6:return w;case 2:x.push(y)}else if(l)return!1;return f?-1:c||l?l:x}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(54);const i=t=>{if(r.a.has(t))throw new Error("The AudioNode is already stored.");r.a.add(t),Object(o.a)(t).forEach(t=>t(!0))}},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"AudioContext",(function(){return to})),n.d(e,"AudioWorkletNode",(function(){return so})),n.d(e,"OfflineAudioContext",(function(){return lo})),n.d(e,"isAnyAudioContext",(function(){return fo})),n.d(e,"isAnyAudioNode",(function(){return po})),n.d(e,"isAnyAudioParam",(function(){return ho})),n.d(e,"isAnyOfflineAudioContext",(function(){return yo}));var r=n(49),o=n(163),i=n(663),a=n(664),s=n(807),u=n(665),c=n(666),l=n(667),f=n(668),p=n(669),h=n(670),d=n(671),y=n(672),v=n(673),m=n(804),g=n(674),b=n(675),_=n(676),w=n(810),x=n(677),O=n(678),S=n(679),k=n(680),T=n(681),C=n(682),E=n(683),A=n(684),j=n(685),P=n(686),D=n(687),M=n(688),I=n(689),R=n(690),N=n(691),F=n(692),q=n(693),V=n(694),L=n(811),z=n(695),B=n(696),U=n(697),W=n(812),$=n(698),H=n(699),G=n(700),K=n(701),Q=n(702),Y=n(703),X=n(704),J=n(705),Z=n(706),tt=n(707),et=n(708),nt=n(709),rt=n(710),ot=n(711),it=n(813),at=n(712),st=n(713),ut=n(38),ct=n(100),lt=n(14),ft=n(714),pt=n(715),ht=n(716),dt=n(717),yt=n(718),vt=n(719),mt=n(720),gt=n(721),bt=n(722),_t=n(723),wt=(n(724),n(725)),xt=n(726),Ot=n(727),St=n(728),kt=n(729),Tt=n(730),Ct=n(731),Et=n(808),At=n(732),jt=n(809),Pt=n(733),Dt=n(734),Mt=n(735),It=n(736),Rt=n(814),Nt=n(805),Ft=n(737),qt=n(738),Vt=n(815),Lt=n(739),zt=n(740),Bt=n(741),Ut=n(742),Wt=n(743),$t=n(744),Ht=n(745),Gt=n(746),Kt=n(747),Qt=n(748),Yt=n(749),Xt=n(750),Jt=n(751),Zt=n(752),te=n(753),ee=n(754),ne=n(755),re=n(756),oe=n(757),ie=n(758),ae=n(759),se=n(760),ue=n(22),ce=n(761),le=n(762),fe=n(763),pe=n(764),he=n(765),de=n(766),ye=n(767),ve=n(768),me=n(769),ge=n(770),be=n(771),_e=n(772),we=n(773),xe=n(774),Oe=(n(775),n(776)),Se=n(777),ke=n(778),Te=n(779),Ce=(n(780),n(781),n(782),n(783),n(784)),Ee=n(785),Ae=n(786),je=(n(787),n(788),n(789),n(790),n(791),n(792)),Pe=(n(793),n(164)),De=n(794),Me=n(795),Ie=n(796),Re=n(797),Ne=n(798),Fe=n(799),qe=n(800),Ve=n(801),Le=n(2),ze=n(96),Be=n(97),Ue=n(19),We=n(79),$e=n(13),He=n(80),Ge=n(23),Ke=n(39),Qe=n(62),Ye=n(165),Xe=n(50),Je=n(107),Ze=n(95),tn=n(36),en=(n(802),n(803)),nn=n(81);n(207),n(291);const rn=Object(k.a)(new Map,new WeakMap),on=Object(Ie.a)(),an=Object(Jt.a)(on),sn=Object(bt.a)(an),un=Object(Pt.a)(on),cn=Object(rt.a)(sn,un,an),ln=Object(Mt.a)(cn),fn=Object(Et.a)(rn,ut.a,ln),pn=Object(et.a)(Ue.a),hn=Object(ve.a)(Ue.a,pn,Xe.a),dn=Object(c.a)(fn,$e.a,hn),yn=new WeakMap,vn=Object(ot.a)(Le.g),mn=new WeakMap,gn=Object(Y.a)(nn.a),bn=Object(vt.a)(on),_n=Object(mt.a)(on),wn=Object(m.a)(Object(i.a)(Le.b),yn,rn,Object(st.a)(Le.h,Be.a,Ue.a,$e.a,He.a,Qe.a),ut.a,ct.a,ue.a,Object(z.a)(ze.a,Le.h,Ue.a,$e.a,He.a,vn,Qe.a,sn),Object(W.a)(mn,Ue.a,Ge.a),gn,vn,bn,_n,sn),xn=Object(u.a)(wn,dn,ut.a,fn,vn,sn),On=new WeakSet,Sn=Object(At.a)(on),kn=Object(R.a)(new Uint32Array(1)),Tn=Object(Re.a)(kn,ut.a),Cn=Object(Ne.a)(kn),En=Object(l.a)(On,rn,ue.a,Sn,an,Object(xe.a)(Sn),Tn,Cn),An=Object(Ce.a)(ln),jn=Object(Ee.a)(ln),Pn=Object(Ae.a)(ln),Dn=Object(qe.a)(ln),Mn=Object(me.a)(pn,We.a,Xe.a),In=Object(j.a)(Mn),Rn=Object(jt.a)(rn,ln,Object(Oe.a)(ln),Object(Se.a)(an),Object(ke.a)(ln),Object(Te.a)(ln),An,jn,Pn,en.a,Object(Fe.a)(Je.a),Dn),Nn=Object(ye.a)(Object(nt.a)(We.a),Mn),Fn=Object(p.a)(In,Rn,$e.a,Nn,hn),qn=Object(g.a)(Object(a.a)(Le.d),mn,Le.e,b.a,r.createCancelAndHoldAutomationEvent,r.createCancelScheduledValuesAutomationEvent,r.createExponentialRampToValueAutomationEvent,r.createLinearRampToValueAutomationEvent,r.createSetTargetAutomationEvent,r.createSetValueAutomationEvent,r.createSetValueCurveAutomationEvent,un),Vn=Object(f.a)(wn,Fn,qn,lt.a,Rn,vn,sn,nn.a),Ln=Object(Ht.a)(ln),zn=Object(d.a)(wn,y.a,ut.a,lt.a,Object(Dt.a)(Ln,Je.a),vn,sn,hn),Bn=Object(Ft.a)(ln),Un=Object(S.a)(In,Bn,$e.a,Nn,hn),Wn=Object(O.a)(wn,qn,Un,ct.a,Bn,vn,sn),$n=Object(Ct.a)(Ke.a,bn),Hn=Object(Ve.a)(lt.a,ln,$n),Gn=Object(qt.a)(ln,Hn),Kn=Object(C.a)(Gn,$e.a,hn),Qn=Object(T.a)(wn,Kn,Gn,vn,sn),Yn=Object(Vt.a)(ln),Xn=Object(A.a)(Yn,$e.a,hn),Jn=Object(E.a)(wn,Xn,Yn,vn,sn),Zn=Object(zt.a)(Rn,Ln,$n),tr=Object(Lt.a)(rn,ln,Zn,An,Pn),er=Object(I.a)(In,tr,$e.a,Nn,hn),nr=Object(M.a)(wn,qn,er,tr,vn,sn,nn.a),rr=Object(Ut.a)(ln,Ln,$n),or=Object(Bt.a)(ln,rr,ue.a,Je.a),ir=Object(F.a)(or,$e.a,hn),ar=Object(N.a)(wn,ir,or,vn,sn),sr=Object(Wt.a)(ln),ur=Object(U.a)(In,sr,$e.a,Nn,hn),cr=Object(B.a)(wn,qn,ur,sr,vn,sn),lr=Object($t.a)(ln,ue.a),fr=Object(G.a)(In,lr,$e.a,Nn,hn),pr=Object(H.a)(wn,qn,fr,lr,ue.a,vn,sn),hr=Object(tt.a)(In,Ln,$e.a,Nn,hn),dr=Object(Z.a)(wn,qn,hr,Ln,vn,sn),yr=Object(re.a)(ln),vr=Object(Kt.a)(ct.a,lt.a,yr,ue.a),mr=Object(ge.a)(rn,Ln,yr,Object(je.a)(Ln,an)),gr=Object(at.a)(Rn,ln,$e.a,an,hn,mr),br=Object(Gt.a)(ln,vr),_r=Object(it.a)(wn,br,gr,vn,sn),wr=Object(v.a)(qn,Gn,tr,yr,sn),xr=Object(kt.a)(zn,wr,gn,nn.a),Or=Object(Zt.a)(rn,ln,An,jn,Pn,Dn),Sr=Object(fe.a)(In,Or,$e.a,Nn,hn),kr=Object(le.a)(wn,qn,lt.a,Or,Sr,vn,sn,nn.a),Tr=Object(D.a)(Rn),Cr=Object(se.a)(Tr,lt.a,ln,Ln,Ye.a,$n),Er=Object(ae.a)(Tr,lt.a,ln,Cr,Ye.a,$n,Je.a),Ar=Object(ee.a)(ze.a,lt.a,ln,Gn,Ln,yr,Er,ue.a,Be.a,$n),jr=Object(te.a)(ln,Ar),Pr=Object(he.a)(In,jr,$e.a,Nn,hn),Dr=Object(pe.a)(wn,qn,jr,Pr,vn,sn),Mr=Object(ne.a)(cn),Ir=Object(de.a)(Mr,vn,new WeakSet),Rr=Object(ie.a)(Gn,Yn,Ln,Er,ue.a,$n),Nr=Object(oe.a)(ln,Rr,ue.a),Fr=Object(we.a)(In,Nr,$e.a,Nn,hn),qr=Object(_e.a)(wn,qn,Nr,Fr,vn,sn),Vr=Object(Me.a)(Er,$e.a,hn),Lr=Object(De.a)(wn,lt.a,Er,Vr,vn,sn),zr=Object(_t.a)(on),Br=Object(X.a)(on),Ur=zr?Object(s.a)(o.a,ue.a,Object(Q.a)(on),Br,Object(J.a)(o.a),cn,vn,new WeakMap,new WeakMap):void 0,Wr=Object(yt.a)(un),$r=Object(gt.a)(Wr,sn),Hr=Object(L.a)(On,rn,V.a,K.a,new WeakSet,vn,$r,sn,an,Ze.a,tn.a,Tn,Cn),Gr=Object(x.a)(Ur,xn,En,Vn,Wn,Qn,Jn,nr,ar,Hr,cr,pr,dr,_r,xr,kr,Dr,Ir,qr,Lr),Kr=Object(Qt.a)(ln),Qr=Object(wt.a)(wn,Kr,ue.a,vn,sn),Yr=Object(Yt.a)(ln),Xr=Object(xt.a)(wn,Yr,ue.a,vn,sn),Jr=Object(Xt.a)(lt.a,ln),Zr=Object(Ot.a)(wn,Jr,ue.a,vn,sn),to=Object(h.a)(Gr,lt.a,ue.a,Pe.a,Qr,Xr,Zr,un),eo=Object(P.a)(ut.a),no=Object($.a)(ut.a),ro=Object(Nt.a)(yn,eo,ut.a,lt.a,Gn,Yn,tr,Ln,yr,ue.a,no,Br,$n),oo=Object(Rt.a)(lt.a,ln,ro,ue.a,sn),io=Object(It.a)(on),ao=Object(w.a)(In,eo,Rn,Gn,Yn,tr,Ln,no,Br,$e.a,io,an,Nn,hn,mr),so=zr?Object(_.a)(wn,qn,ao,oo,dr,vn,sn,io,nn.a):void 0,uo=(Object(St.a)(lt.a,ue.a,Pe.a,xr,un),Object(q.a)(ue.a,an)),co=Object(be.a)(On,rn,pn,mr,Ze.a,Tn,Cn),lo=(Object(Tt.a)(rn,lt.a,uo,xr,co),Object(ce.a)(Gr,rn,lt.a,uo,co)),fo=Object(ft.a)(Le.g,Wr),po=Object(pt.a)(Le.c,bn),ho=Object(ht.a)(Le.e,_n),yo=Object(dt.a)(Le.g,sn)},function(t,e,n){!function(t,e,n,r){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n,r=r&&r.hasOwnProperty("default")?r.default:r;var o=function(t,e,n){return{endTime:e,insertTime:n,type:"exponentialRampToValue",value:t}},i=function(t,e,n){return{endTime:e,insertTime:n,type:"linearRampToValue",value:t}},a=function(t,e){return{startTime:e,type:"setValue",value:t}},s=function(t,e,n){return{duration:n,startTime:e,type:"setValueCurve",values:t}},u=function(t,e,n){var r=n.startTime,o=n.target,i=n.timeConstant;return o+(e-o)*Math.exp((r-t)/i)},c=function(t){return"exponentialRampToValue"===t.type},l=function(t){return"linearRampToValue"===t.type},f=function(t){return c(t)||l(t)},p=function(t){return"setValue"===t.type},h=function(t){return"setValueCurve"===t.type},d=function t(e,n,r,o){var i=e[n];return void 0===i?o:f(i)||p(i)?i.value:h(i)?i.values[i.values.length-1]:u(r,t(e,n-1,i.startTime,o),i)},y=function(t,e,n,r,o){return void 0===n?[r.insertTime,o]:f(n)?[n.endTime,n.value]:p(n)?[n.startTime,n.value]:h(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,d(t,e-1,n.startTime,o)]},v=function(t){return"cancelAndHold"===t.type},m=function(t){return"cancelScheduledValues"===t.type},g=function(t){return v(t)||m(t)?t.cancelTime:c(t)||l(t)?t.endTime:t.startTime},b=function(t,e,n,r){var o=r.endTime,i=r.value;return n===i?i:0<n&&0<i||n<0&&i<0?n*Math.pow(i/n,(t-e)/(o-e)):0},_=function(t,e,n,r){return n+(t-e)/(r.endTime-e)*(r.value-n)},w=function(t,e){var n=e.duration,r=e.startTime,o=e.values;return function(t,e){var n=Math.floor(e),r=Math.ceil(e);return n===r?t[n]:(1-(e-n))*t[n]+(1-(r-e))*t[r]}(o,(t-r)/n*(o.length-1))},x=function(t){return"setTarget"===t.type},O=function(){function t(e){n(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return r(t,[{key:Symbol.iterator,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(t){var e=g(t);if(v(t)||m(t)){var n=this._automationEvents.findIndex((function(t){return g(t)>=e})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),v(t)){var u=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&f(r)){if(x(u))throw new Error("The internal list is malformed.");var p=h(u)?u.startTime+u.duration:g(u),d=h(u)?u.values[u.values.length-1]:u.value,y=c(r)?b(e,p,d,r):_(e,p,d,r),w=c(r)?o(y,e,this._currenTime):i(y,e,this._currenTime);this._automationEvents.push(w)}void 0!==u&&x(u)&&this._automationEvents.push(a(this.getValue(e),e)),void 0!==u&&h(u)&&u.startTime+u.duration>e&&(this._automationEvents[this._automationEvents.length-1]=s(new Float32Array([6,7]),u.startTime,e-u.startTime))}}else{var O=this._automationEvents.findIndex((function(t){return g(t)>e})),S=-1===O?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[O-1];if(void 0!==S&&h(S)&&g(S)+S.duration>e)return!1;var k=c(t)?o(t.value,t.endTime,this._currenTime):l(t)?i(t.value,e,this._currenTime):t;if(-1===O)this._automationEvents.push(k);else{if(h(t)&&e+t.duration>g(this._automationEvents[O]))return!1;this._automationEvents.splice(O,0,k)}}return!0}},{key:"flush",value:function(t){var e=this._automationEvents.findIndex((function(e){return g(e)>t}));if(e>1){var n=this._automationEvents.slice(e-1),r=n[0];x(r)&&n.unshift(a(d(this._automationEvents,e-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(t){if(0===this._automationEvents.length)return this._defaultValue;var n=this._automationEvents[this._automationEvents.length-1],r=this._automationEvents.findIndex((function(e){return g(e)>t})),o=this._automationEvents[r],i=g(n)<=t?n:this._automationEvents[r-1];if(void 0!==i&&x(i)&&(void 0===o||!f(o)||o.insertTime>t))return u(t,d(this._automationEvents,r-2,i.startTime,this._defaultValue),i);if(void 0!==i&&p(i)&&(void 0===o||!f(o)))return i.value;if(void 0!==i&&h(i)&&(void 0===o||!f(o)||i.startTime+i.duration>t))return t<i.startTime+i.duration?w(t,i):i.values[i.values.length-1];if(void 0!==i&&f(i)&&(void 0===o||!f(o)))return i.value;if(void 0!==o&&c(o)){var a=y(this._automationEvents,r-1,i,o,this._defaultValue),s=e(a,2),v=s[0],m=s[1];return b(t,v,m,o)}if(void 0!==o&&l(o)){var O=y(this._automationEvents,r-1,i,o,this._defaultValue),S=e(O,2),k=S[0],T=S[1];return _(t,k,T,o)}return this._defaultValue}}]),t}();t.AutomationEventList=O,t.createCancelAndHoldAutomationEvent=function(t){return{cancelTime:t,type:"cancelAndHold"}},t.createCancelScheduledValuesAutomationEvent=function(t){return{cancelTime:t,type:"cancelScheduledValues"}},t.createExponentialRampToValueAutomationEvent=function(t,e){return{endTime:e,type:"exponentialRampToValue",value:t}},t.createLinearRampToValueAutomationEvent=function(t,e){return{endTime:e,type:"linearRampToValue",value:t}},t.createSetTargetAutomationEvent=function(t,e,n){return{startTime:e,target:t,timeConstant:n,type:"setTarget"}},t.createSetValueAutomationEvent=a,t.createSetValueCurveAutomationEvent=s,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(818),n(82),n(63))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);const o=t=>r.h.has(t)},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(20)){var r=n(67),o=n(9),i=n(10),a=n(1),s=n(121),u=n(154),c=n(40),l=n(88),f=n(65),p=n(30),h=n(89),d=n(42),y=n(17),v=n(199),m=n(69),g=n(56),b=n(29),_=n(105),w=n(12),x=n(24),O=n(146),S=n(70),k=n(72),T=n(71).f,C=n(148),E=n(66),A=n(15),j=n(45),P=n(111),D=n(106),M=n(150),I=n(86),R=n(114),N=n(87),F=n(149),q=n(190),V=n(21),L=n(43),z=V.f,B=L.f,U=o.RangeError,W=o.TypeError,$=o.Uint8Array,H=Array.prototype,G=u.ArrayBuffer,K=u.DataView,Q=j(0),Y=j(2),X=j(3),J=j(4),Z=j(5),tt=j(6),et=P(!0),nt=P(!1),rt=M.values,ot=M.keys,it=M.entries,at=H.lastIndexOf,st=H.reduce,ut=H.reduceRight,ct=H.join,lt=H.sort,ft=H.slice,pt=H.toString,ht=H.toLocaleString,dt=A("iterator"),yt=A("toStringTag"),vt=E("typed_constructor"),mt=E("def_constructor"),gt=s.CONSTR,bt=s.TYPED,_t=s.VIEW,wt=j(1,(function(t,e){return Tt(D(t,t[mt]),e)})),xt=i((function(){return 1===new $(new Uint16Array([1]).buffer)[0]})),Ot=!!$&&!!$.prototype.set&&i((function(){new $(1).set({})})),St=function(t,e){var n=d(t);if(n<0||n%e)throw U("Wrong offset!");return n},kt=function(t){if(w(t)&&bt in t)return t;throw W(t+" is not a typed array!")},Tt=function(t,e){if(!(w(t)&&vt in t))throw W("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return Et(D(t,t[mt]),e)},Et=function(t,e){for(var n=0,r=e.length,o=Tt(t,r);r>n;)o[n]=e[n++];return o},At=function(t,e,n){z(t,e,{get:function(){return this._d[n]}})},jt=function(t){var e,n,r,o,i,a,s=x(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,p=C(s);if(null!=p&&!O(p)){for(a=p.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(f&&u>2&&(l=c(l,arguments[2],2)),e=0,n=y(s.length),o=Tt(this,n);n>e;e++)o[e]=f?l(s[e],e):s[e];return o},Pt=function(){for(var t=0,e=arguments.length,n=Tt(this,e);e>t;)n[t]=arguments[t++];return n},Dt=!!$&&i((function(){ht.call(new $(1))})),Mt=function(){return ht.apply(Dt?ft.call(kt(this)):kt(this),arguments)},It={copyWithin:function(t,e){return q.call(kt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return J(kt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(kt(this),arguments)},filter:function(t){return Ct(this,Y(kt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Z(kt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(kt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(kt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(kt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(kt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(kt(this),arguments)},lastIndexOf:function(t){return at.apply(kt(this),arguments)},map:function(t){return wt(kt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(kt(this),arguments)},reduceRight:function(t){return ut.apply(kt(this),arguments)},reverse:function(){for(var t,e=kt(this).length,n=Math.floor(e/2),r=0;r<n;)t=this[r],this[r++]=this[--e],this[e]=t;return this},some:function(t){return X(kt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return lt.call(kt(this),t)},subarray:function(t,e){var n=kt(this),r=n.length,o=m(t,r);return new(D(n,n[mt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,y((void 0===e?r:m(e,r))-o))}},Rt=function(t,e){return Ct(this,ft.call(kt(this),t,e))},Nt=function(t){kt(this);var e=St(arguments[1],1),n=this.length,r=x(t),o=y(r.length),i=0;if(o+e>n)throw U("Wrong length!");for(;i<o;)this[e+i]=r[i++]},Ft={entries:function(){return it.call(kt(this))},keys:function(){return ot.call(kt(this))},values:function(){return rt.call(kt(this))}},qt=function(t,e){return w(t)&&t[bt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Vt=function(t,e){return qt(t,e=g(e,!0))?f(2,t[e]):B(t,e)},Lt=function(t,e,n){return!(qt(t,e=g(e,!0))&&w(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?z(t,e,n):(t[e]=n.value,t)};gt||(L.f=Vt,V.f=Lt),a(a.S+a.F*!gt,"Object",{getOwnPropertyDescriptor:Vt,defineProperty:Lt}),i((function(){pt.call({})}))&&(pt=ht=function(){return ct.call(this)});var zt=h({},It);h(zt,Ft),p(zt,dt,Ft.values),h(zt,{slice:Rt,set:Nt,constructor:function(){},toString:pt,toLocaleString:Mt}),At(zt,"buffer","b"),At(zt,"byteOffset","o"),At(zt,"byteLength","l"),At(zt,"length","e"),z(zt,yt,{get:function(){return this[bt]}}),t.exports=function(t,e,n,u){var c=t+((u=!!u)?"Clamped":"")+"Array",f="get"+t,h="set"+t,d=o[c],m=d||{},g=d&&k(d),b=!d||!s.ABV,x={},O=d&&d.prototype,C=function(t,n){z(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[f](n*e+r.o,xt)}(this,n)},set:function(t){return function(t,n,r){var o=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,xt)}(this,n,t)},enumerable:!0})};b?(d=n((function(t,n,r,o){l(t,d,c,"_d");var i,a,s,u,f=0,h=0;if(w(n)){if(!(n instanceof G||"ArrayBuffer"==(u=_(n))||"SharedArrayBuffer"==u))return bt in n?Et(d,n):jt.call(d,n);i=n,h=St(r,e);var m=n.byteLength;if(void 0===o){if(m%e)throw U("Wrong length!");if((a=m-h)<0)throw U("Wrong length!")}else if((a=y(o)*e)+h>m)throw U("Wrong length!");s=a/e}else s=v(n),i=new G(a=s*e);for(p(t,"_d",{b:i,o:h,l:a,e:s,v:new K(i)});f<s;)C(t,f++)})),O=d.prototype=S(zt),p(O,"constructor",d)):i((function(){d(1)}))&&i((function(){new d(-1)}))&&R((function(t){new d,new d(null),new d(1.5),new d(t)}),!0)||(d=n((function(t,n,r,o){var i;return l(t,d,c),w(n)?n instanceof G||"ArrayBuffer"==(i=_(n))||"SharedArrayBuffer"==i?void 0!==o?new m(n,St(r,e),o):void 0!==r?new m(n,St(r,e)):new m(n):bt in n?Et(d,n):jt.call(d,n):new m(v(n))})),Q(g!==Function.prototype?T(m).concat(T(g)):T(m),(function(t){t in d||p(d,t,m[t])})),d.prototype=O,r||(O.constructor=d));var E=O[dt],A=!!E&&("values"==E.name||null==E.name),j=Ft.values;p(d,vt,!0),p(O,bt,c),p(O,_t,!0),p(O,mt,d),(u?new d(1)[yt]==c:yt in O)||z(O,yt,{get:function(){return c}}),x[c]=d,a(a.G+a.W+a.F*(d!=m),x),a(a.S,c,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i((function(){m.of.call(d,1)})),c,{from:jt,of:Pt}),"BYTES_PER_ELEMENT"in O||p(O,"BYTES_PER_ELEMENT",e),a(a.P,c,It),N(c),a(a.P+a.F*Ot,c,{set:Nt}),a(a.P+a.F*!A,c,Ft),r||O.toString==pt||(O.toString=pt),a(a.P+a.F*i((function(){new d(1).slice()})),c,{slice:Rt}),a(a.P+a.F*(i((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!i((function(){O.toLocaleString.call([1,2])}))),c,{toLocaleString:Mt}),I[c]=A?E:j,r||A||p(O,dt,j)}}else t.exports=function(){}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(23);const i=t=>Object(o.a)(r.i,t)},,function(t,e,n){var r=n(12);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r=n(66)("meta"),o=n(12),i=n(29),a=n(21).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(10)((function(){return u(Object.preventExtensions({}))})),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}}(),t.exports=n(1006)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(54);const i=t=>{if(!r.a.has(t))throw new Error("The AudioNode is not stored.");r.a.delete(t),Object(o.a)(t).forEach(t=>t(!1))}},function(t,e,n){"use strict";var r=n(33),o=n(0),i=n.n(o),a=n(76),s=n.n(a),u=n(34),c=n(161),l=n.n(c),f=n(661),p=n.n(f);function h(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var d=i.a.createContext||function(t,e){var n,r,i="__create-react-context-"+p()()+"__",a=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=h(e.props.value),e}l()(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[i]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,o=t.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof e?e(r,o):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var i,a},r.render=function(){return this.props.children},n}(o.Component);a.childContextTypes=((n={})[i]=s.a.object.isRequired,n);var u=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}l()(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},r.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},r.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},r.getValue=function(){return this.context[i]?this.context[i].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(o.Component);return u.contextTypes=((r={})[i]=s.a.object,r),{Provider:a,Consumer:u}},y=n(28),v=n(16),m=n(162),g=n.n(m),b=(n(158),n(47)),_=n(662),w=n.n(_);n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return D})),n.d(e,"c",(function(){return O})),n.d(e,"d",(function(){return q})),n.d(e,"e",(function(){return x})),n.d(e,"f",(function(){return P})),n.d(e,"g",(function(){return V}));var x=function(t){var e=d();return e.displayName=t,e}("Router"),O=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}Object(r.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(x.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},e}(i.a.Component);i.a.Component;var S=function(t){function e(){return t.apply(this,arguments)||this}Object(r.a)(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(i.a.Component);var k={},T=0;function C(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(k[t])return k[t];var e=g.a.compile(t);return T<1e4&&(k[t]=e,T++),e}(t)(e,{pretty:!0})}function E(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return i.a.createElement(x.Consumer,null,(function(t){t||Object(y.a)(!1);var r=t.history,a=t.staticContext,s=o?r.push:r.replace,c=Object(u.c)(e?"string"==typeof n?C(n,e.params):Object(v.a)({},n,{pathname:C(n.pathname,e.params)}):n);return a?(s(c),null):i.a.createElement(S,{onMount:function(){s(c)},onUpdate:function(t,e){var n=Object(u.c)(e.to);Object(u.f)(n,Object(v.a)({},c,{key:n.key}))||s(c)},to:n})}))}var A={},j=0;function P(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=A[n]||(A[n]={});if(r[t])return r[t];var o=[],i={regexp:g()(t,o,e),keys:o};return j<1e4&&(r[t]=i,j++),i}(n,{end:i,strict:s,sensitive:c}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var l=u[0],f=u.slice(1),p=t===l;return i&&!p?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:p,params:a.reduce((function(t,e,n){return t[e.name]=f[n],t}),{})}}),null)}var D=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement(x.Consumer,null,(function(e){e||Object(y.a)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?P(n.pathname,t.props):e.match,o=Object(v.a)({},e,{location:n,match:r}),a=t.props,s=a.children,u=a.component,c=a.render;return Array.isArray(s)&&0===s.length&&(s=null),i.a.createElement(x.Provider,{value:o},o.match?s?"function"==typeof s?s(o):s:u?i.a.createElement(u,o):c?c(o):null:"function"==typeof s?s(o):null)}))},e}(i.a.Component);function M(t){return"/"===t.charAt(0)?t:"/"+t}function I(t,e){if(!t)return e;var n=M(t);return 0!==e.pathname.indexOf(n)?e:Object(v.a)({},e,{pathname:e.pathname.substr(n.length)})}function R(t){return"string"==typeof t?t:Object(u.e)(t)}function N(t){return function(){Object(y.a)(!1)}}function F(){}i.a.Component;var q=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e.prototype.render=function(){var t=this;return i.a.createElement(x.Consumer,null,(function(e){e||Object(y.a)(!1);var n,r,o=t.props.location||e.location;return i.a.Children.forEach(t.props.children,(function(t){if(null==r&&i.a.isValidElement(t)){n=t;var a=t.props.path||t.props.from;r=a?P(o.pathname,Object(v.a)({},t.props,{path:a})):e.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},e}(i.a.Component);function V(t){var e="withRouter("+(t.displayName||t.name)+")",n=function(e){var n=e.wrappedComponentRef,r=Object(b.a)(e,["wrappedComponentRef"]);return i.a.createElement(x.Consumer,null,(function(e){return e||Object(y.a)(!1),i.a.createElement(t,Object(v.a)({},r,e,{ref:n}))}))};return n.displayName=e,n.WrappedComponent=t,w()(n,t)}i.a.useContext},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(77);const o=t=>Object(r.a)(t[0])},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);const o=t=>r.a.has(t)},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}},function(t,e){t.exports=function(t,e,n,r,o){var i={};return Object.keys(r).forEach((function(t){i[t]=r[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports=!1},function(t,e,n){var r=n(174),o=n(133);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(42),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(11),o=n(175),i=n(133),a=n(132)("IE_PROTO"),s=function(){},u=function(){var t,e=n(130)("iframe"),r=i.length;for(e.style.display="none",n(134).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(174),o=n(133).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(29),o=n(24),i=n(132)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(15)("unscopables"),o=Array.prototype;null==o[r]&&n(30)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e,n){var r=n(12);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.childInteractiveProps=e.defaultTapTimeCutoff=e.queueTime=e.knownProps=e.knownRoleTags=e.nonBlurrableTags=e.statePropOptionKeys=e.stateProps=e.iStates=e.otherEvents=e.touchEvents=e.mouseEvents=e.passiveEventSupport=e.deviceHasMouse=e.deviceHasTouch=e.deviceType=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.enterKeyTrigger=function(t,e){return"select"!==t&&("input"!==t||"checkbox"!==e&&"radio"!==e)},e.spaceKeyTrigger=function(t,e){return"button"===t||"select"===t||"input"===t&&("checkbox"===e||"radio"===e||"submit"===e)},e.dummyEvent=function(t){return{type:t,persist:function(){},preventDefault:function(){},stopPropagation:function(){}}};var o,i=n(1020),a=(o=i)&&o.__esModule?o:{default:o};e.deviceType=a.default.deviceType,e.deviceHasTouch=a.default.hasTouch,e.deviceHasMouse=a.default.hasMouse,e.passiveEventSupport=a.default.passiveEvents,e.mouseEvents={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp"},e.touchEvents={touchstart:"onTouchStart",touchend:"onTouchEnd",touchcancel:"onTouchCancel"},e.otherEvents={focus:"onFocus",blur:"onBlur",keydown:"onKeyDown",keyup:"onKeyUp",dragstart:"onDragStart",dragend:"onDragEnd"};var s=e.iStates={normal:!0,hover:!0,hoverActive:!0,touchActive:!0,keyActive:!0},u=e.stateProps=r({},s,{active:!0,focus:!0,focusFromTab:!0,focusFromMouse:!0,focusFromTouch:!0}),c=(e.statePropOptionKeys=["style","className"],e.nonBlurrableTags={input:!0,textarea:!0,select:!0});e.knownRoleTags=r({},c,{button:!0,a:!0,area:!0});e.knownProps=r({},u,{children:!0,as:!0,style:!0,className:!0,wrapperStyle:!0,wrapperClassName:!0,onStateChange:!0,setStateCallback:!0,onClick:!0,onTapTwo:!0,onTapThree:!0,onTapFour:!0,onLongPress:!0,tapTimeCutoff:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseDown:!0,onMouseUp:!0,onTouchStart:!0,onTouchMove:!0,onTouchEnd:!0,onTouchCancel:!0,onFocus:!0,onBlur:!0,onKeyDown:!0,onKeyUp:!0,forceState:!0,initialState:!0,refDOMNode:!0,mutableProps:!0,useBrowserOutlineFocus:!0,useBrowserCursor:!0,touchActiveTapOnly:!0,extraTouchNoTap:!0,focusToggleOff:!0,stylePriority:!0,nonContainedChild:!0,interactiveChild:!0}),e.queueTime=600,e.defaultTapTimeCutoff=500;e.childInteractiveProps={showOnParent:!0,onParentNormal:!0,onParentHover:!0,onParentActive:!0,onParentHoverActive:!0,onParentTouchActive:!0,onParentKeyActive:!0,onParentFocus:!0,onParentFocusFromTab:!0,onParentFocusFromMouse:!0,onParentFocusFromTouch:!0}},function(t,e,n){t.exports=n(1016)()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>"context"in t},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>"context"in t},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(23);const i=t=>Object(o.a)(r.d,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(2),o=n(23);const i=t=>Object(o.a)(r.e,t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>{const r={value:t};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"==typeof e?e.call(t,n):e.handleEvent.call(t,n)}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return m}));var r=n(60),o=n(33),i=n(0),a=n.n(i),s=n(34),u=(n(76),n(16)),c=n(47),l=n(28),f=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=Object(s.a)(e.props),e}return Object(o.a)(e,t),e.prototype.render=function(){return a.a.createElement(r.c,{history:this.history,children:this.props.children})},e}(a.a.Component);a.a.Component;var p=function(t,e){return"function"==typeof t?t(e):t},h=function(t,e){return"string"==typeof t?Object(s.c)(t,null,null,e):t},d=function(t){return t},y=a.a.forwardRef;void 0===y&&(y=d);var v=y((function(t,e){var n=t.innerRef,r=t.navigate,o=t.onClick,i=Object(c.a)(t,["innerRef","navigate","onClick"]),s=i.target,l=Object(u.a)({},i,{onClick:function(t){try{o&&o(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return l.ref=d!==y&&e||n,a.a.createElement("a",l)}));var m=y((function(t,e){var n=t.component,o=void 0===n?v:n,i=t.replace,s=t.to,f=t.innerRef,m=Object(c.a)(t,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(t){t||Object(l.a)(!1);var n=t.history,r=h(p(s,t.location),t.location),c=r?n.createHref(r):"",v=Object(u.a)({},m,{href:c,navigate:function(){var e=p(s,t.location);(i?n.replace:n.push)(e)}});return d!==y?v.ref=e||f:v.innerRef=f,a.a.createElement(o,v)}))})),g=function(t){return t},b=a.a.forwardRef;void 0===b&&(b=g);b((function(t,e){var n=t["aria-current"],o=void 0===n?"page":n,i=t.activeClassName,s=void 0===i?"active":i,f=t.activeStyle,d=t.className,y=t.exact,v=t.isActive,_=t.location,w=t.strict,x=t.style,O=t.to,S=t.innerRef,k=Object(c.a)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(t){t||Object(l.a)(!1);var n=_||t.location,i=h(p(O,n),n),c=i.pathname,T=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=T?Object(r.f)(n.pathname,{path:T,exact:y,strict:w}):null,E=!!(v?v(C,n):C),A=E?function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(d,s):d,j=E?Object(u.a)({},x,{},f):x,P=Object(u.a)({"aria-current":E&&o||null,className:A,style:j,to:i},k);return g!==b?P.ref=e||S:P.innerRef=S,a.a.createElement(m,P)}))}))},function(t,e,n){var r=n(21).f,o=n(29),i=n(15)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(1),o=n(52),i=n(10),a=n(136),s="["+a+"]",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e,n){var o={},s=i((function(){return!!a[t]()||"…"!="…"[t]()})),u=o[t]=s?e(f):a[t];n&&(o[n]=u),r(r.P+r.F*s,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(9),o=n(21),i=n(20),a=n(15)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(26);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(38);const o=t=>{var e;t.getChannelData=(e=t.getChannelData,n=>{try{return e.call(t,n)}catch(t){if(12===t.code)throw Object(r.a)();throw t}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{var e;t.start=(e=t.start,(n=0,r=0,o)=>{if("number"==typeof o&&o<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");e.call(t,n,r,o)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{var e;t.stop=(e=t.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");e.call(t,n)})}},function(t,e){function n(t,e,n,r,o,i,a){try{var s=t[i](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function s(t){n(a,o,i,s,u,"next",t)}function u(t){n(a,o,i,s,u,"throw",t)}s(void 0)}))}}},function(t,e,n){"use strict";e.parse=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var n={},o=e||{},a=t.split(i),u=o.decode||r,c=0;c<a.length;c++){var l=a[c],f=l.indexOf("=");if(!(f<0)){var p=l.substr(0,f).trim(),h=l.substr(++f,l.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),null==n[p]&&(n[p]=s(h,u))}}return n},e.serialize=function(t,e,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(t))throw new TypeError("argument name is invalid");var s=i(e);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var u=t+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(c)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");u+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");u+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(u+="; HttpOnly");r.secure&&(u+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"strict":u+="; SameSite=Strict";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(t,e){try{return e(t)}catch(e){return t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(32);const o=(t,e,n,o)=>{if(Object(r.a)(e)){const r=e.inputs[o];return t.connect(r,n,0),[r,n,0]}return t.connect(e,n,o),[e,n,o]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(32);const o=(t,e,n,o)=>{Object(r.a)(e)?t.disconnect(e.inputs[o],n,0):t.disconnect(e,n,o)}},function(t,e,n){"use strict";function r(t,e,n,r,o){if("function"==typeof t.copyFromChannel)0===e[n].byteLength&&(e[n]=new Float32Array(128)),t.copyFromChannel(e[n],r,o);else{const i=t.getChannelData(r);if(0===e[n].byteLength)e[n]=i.slice(o,o+128);else{const t=new Float32Array(i.buffer,o*Float32Array.BYTES_PER_ELEMENT,128);e[n].set(t)}}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>{const n=[];for(let r=0;r<t;r+=1){const t=[],o="number"==typeof e?e:e[r];for(let e=0;e<o;e+=1)t.push(new Float32Array(128));n.push(t)}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","InvalidAccessError")}catch(t){return t.code=15,t.name="InvalidAccessError",t}}},,function(t,e){t.exports=function(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}},function(t,e,n){var r=n(51);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(51),o=n(15)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(11),o=n(41),i=n(15)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r)=>{let o=Object.getPrototypeOf(t);for(;!o.hasOwnProperty(e);)o=Object.getPrototypeOf(o);const{get:i,set:a}=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,{get:n(i),set:r(a)})}},function(t,e,n){"use strict";var r=n(0),o=n.n(r),i=n(47),a=n(16);function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var u=n(33),c=n(659),l=n.n(c);function f(t,e){if(!t){var n=new Error("loadable: "+e);throw n.framesToPop=1,n.name="Invariant Violation",n}}var p=o.a.createContext();var h=function(t){return t};function d(t){var e=t.resolve,n=void 0===e?h:e,r=t.render,c=t.onLoad;function l(t,e){void 0===e&&(e={});var l=function(t){return"function"==typeof t?{requireAsync:t}:t}(t),h={};function d(t){return e.cacheKey?e.cacheKey(t):l.resolve?l.resolve(t):null}var y,v=function(t){function o(n){var r;return(r=t.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:d(n)},r.promise=null,f(!n.__chunkExtractor||l.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===e.ssr||(l.requireAsync(n).catch((function(){})),r.loadSync(),n.__chunkExtractor.addChunk(l.chunkName(n))),s(r)):(!1!==e.ssr&&l.isReady&&l.isReady(n)&&r.loadSync(),r)}Object(u.a)(o,t),o.getDerivedStateFromProps=function(t,e){var n=d(t);return Object(a.a)({},e,{cacheKey:n,loading:e.loading||e.cacheKey!==n})};var p=o.prototype;return p.componentDidMount=function(){this.mounted=!0,this.state.loading?this.loadAsync():this.state.error||this.triggerOnLoad()},p.componentDidUpdate=function(t,e){e.cacheKey!==this.state.cacheKey&&(this.promise=null,this.loadAsync())},p.componentWillUnmount=function(){this.mounted=!1},p.safeSetState=function(t,e){this.mounted&&this.setState(t,e)},p.triggerOnLoad=function(){var t=this;c&&setTimeout((function(){c(t.state.result,t.props)}))},p.loadSync=function(){if(this.state.loading)try{var t=l.requireSync(this.props),e=n(t,{Loadable:g});this.state.result=e,this.state.loading=!1}catch(t){this.state.error=t}},p.getCacheKey=function(){return d(this.props)||JSON.stringify(this.props)},p.getCache=function(){return h[this.getCacheKey()]},p.setCache=function(t){h[this.getCacheKey()]=t},p.loadAsync=function(){var t=this;if(!this.promise){var r=this.props,o=(r.__chunkExtractor,r.forwardedRef,Object(i.a)(r,["__chunkExtractor","forwardedRef"]));this.promise=l.requireAsync(o).then((function(r){var o=n(r,{Loadable:g});e.suspense&&t.setCache(o),t.safeSetState({result:n(r,{Loadable:g}),loading:!1},(function(){return t.triggerOnLoad()}))})).catch((function(e){t.safeSetState({error:e,loading:!1})}))}return this.promise},p.render=function(){var t=this.props,n=t.forwardedRef,o=t.fallback,s=(t.__chunkExtractor,Object(i.a)(t,["forwardedRef","fallback","__chunkExtractor"])),u=this.state,c=u.error,l=u.loading,f=u.result;if(e.suspense){var p=this.getCache();if(!p)throw this.loadAsync();return r({loading:!1,fallback:null,result:p,options:e,props:Object(a.a)({},s,{ref:n})})}if(c)throw c;var h=o||e.fallback||null;return l?h:r({loading:l,fallback:h,result:f,options:e,props:Object(a.a)({},s,{ref:n})})},o}(o.a.Component),m=(y=v,function(t){return o.a.createElement(p.Consumer,null,(function(e){return o.a.createElement(y,Object.assign({__chunkExtractor:e},t))}))}),g=o.a.forwardRef((function(t,e){return o.a.createElement(m,Object.assign({forwardedRef:e},t))}));return g.preload=function(t){l.requireAsync(t)},g.load=function(t){return l.requireAsync(t)},g}return{loadable:l,lazy:function(t,e){return l(t,Object(a.a)({},e,{suspense:!0}))}}}var y=d({resolve:function(t,e){var n=e.Loadable,r=t.__esModule?t.default:t.default||t;return l()(n,r,{preload:!0}),r},render:function(t){var e=t.result,n=t.props;return o.a.createElement(e,n)}}),v=y.loadable,m=y.lazy,g=d({onLoad:function(t,e){t&&e.forwardedRef&&("function"==typeof e.forwardedRef?e.forwardedRef(t):e.forwardedRef.current=t)},render:function(t){var e=t.result,n=t.loading,r=t.props;return!n&&r.children?r.children(e):null}}),b=g.loadable,_=g.lazy;var w=v;w.lib=b,m.lib=_;e.a=w},,function(t,e,n){var r=n(18),o=n(9),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(67)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(31),o=n(17),i=n(69);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=o(u.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(51);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(15)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(11);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(105),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";n(192);var r=n(26),o=n(30),i=n(10),a=n(52),s=n(15),u=n(151),c=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=s(t),h=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=h?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e})):void 0;if(!h||!d||"replace"===t&&!l||"split"===t&&!f){var y=/./[p],v=n(a,p,""[t],(function(t,e,n,r,o){return e.exec===u?h&&!o?{done:!0,value:y.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),m=v[0],g=v[1];r(String.prototype,t,m),o(RegExp.prototype,p,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},function(t,e,n){var r=n(40),o=n(187),i=n(146),a=n(11),s=n(17),u=n(148),c={},l={};(e=t.exports=function(t,e,n,f,p){var h,d,y,v,m=p?function(){return t}:u(t),g=r(n,f,e?2:1),b=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(h=s(t.length);h>b;b++)if((v=e?g(a(d=t[b])[0],d[1]):g(t[b]))===c||v===l)return v}else for(y=m.call(t);!(d=y.next()).done;)if((v=o(y,g,d.value,e))===c||v===l)return v}).BREAK=c,e.RETURN=l},function(t,e,n){var r=n(9).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(9),o=n(1),i=n(26),a=n(89),s=n(57),u=n(118),c=n(88),l=n(12),f=n(10),p=n(114),h=n(84),d=n(137);t.exports=function(t,e,n,y,v,m){var g=r[t],b=g,_=v?"set":"add",w=b&&b.prototype,x={},O=function(t){var e=w[t];i(w,t,"delete"==t||"has"==t?function(t){return!(m&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(m||w.forEach&&!f((function(){(new b).entries().next()})))){var S=new b,k=S[_](m?{}:-0,1)!=S,T=f((function(){S.has(1)})),C=p((function(t){new b(t)})),E=!m&&f((function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)}));C||((b=e((function(e,n){c(e,b,t);var r=d(new g,e,b);return null!=n&&u(n,v,r[_],r),r}))).prototype=w,w.constructor=b),(T||E)&&(O("delete"),O("has"),v&&O("get")),(E||k)&&O(_),m&&w.clear&&delete w.clear}else b=y.getConstructor(e,t,v,_),a(b.prototype,n),s.NEED=!0;return h(b,t),x[t]=b,o(o.G+o.W+o.F*(b!=g),x),m||y.setStrong(b,t,v),b}},function(t,e,n){for(var r,o=n(9),i=n(30),a=n(66),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,f=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(r=o[p[f++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c<arguments.length;c++){for(var l in n=Object(arguments[c]))o.call(n,l)&&(u[l]=n[l]);if(r){s=r(n);for(var f=0;f<s.length;f++)i.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>void 0===t||"number"==typeof t||"string"==typeof t&&("balanced"===t||"interactive"===t||"playback"===t)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));class r{constructor(t){this._map=new Map(t)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(t,e=null){return this._map.forEach((n,r)=>t.call(e,n,r,this))}get(t){return this._map.get(t)}has(t){return this._map.has(t)}keys(){return this._map.keys()}values(){return this._map.values()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o)=>{"function"==typeof t.copyToChannel?0!==e[n].byteLength&&t.copyToChannel(e[n],r,o):0!==e[n].byteLength&&t.getChannelData(r).set(e[n],o)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o,i,a,s,u,c,l)=>{const f=c.length;let p=s;for(let s=0;s<f;s+=1){let f=n[0]*c[s];for(let e=1;e<o;e+=1){const r=p-e&u-1;f+=n[e]*i[r],f-=t[e]*a[r]}for(let t=o;t<r;t+=1)f+=n[t]*i[p-t&u-1];for(let n=o;n<e;n+=1)f-=t[n]*a[p-n&u-1];i[p]=c[s],a[p]=f,p=p+1&u-1,l[s]=f}return p}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>null===t?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*e)))))},function(t,e,n){"use strict";var r=n(3),o=n(0),i=n.n(o),a=n(58);if(!o.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.q)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var s=!1;function u(){return s}var c=function(){return(c=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(t){return t.current?Object(r.j)(t.current):"<unknown>"}var p=[];function h(){var t=l(Object(o.useState)(0),2)[1];return Object(o.useCallback)((function(){t((function(t){return t+1}))}),[])}var d={};function y(t,e,n){if(void 0===e&&(e="observed"),void 0===n&&(n=d),u())return t();var i=(n.useForceUpdate||h)(),a=Object(o.useRef)(null);a.current||(a.current=new r.b("observer("+e+")",(function(){i()})));var s,c,l=function(){a.current&&!a.current.isDisposed&&(a.current.dispose(),a.current=null)};if(Object(o.useDebugValue)(a,f),function(t){Object(o.useEffect)((function(){return t}),p)}((function(){l()})),a.current.track((function(){try{s=t()}catch(t){c=t}})),c)throw l(),c;return s}function v(t,e){if(u())return t;var n,r,i,a=c({forwardRef:!1},e),s=t.displayName||t.name,l=function(e,n){return y((function(){return t(e,n)}),s)};return l.displayName=s,n=a.forwardRef?Object(o.memo)(Object(o.forwardRef)(l)):Object(o.memo)(l),r=t,i=n,Object.keys(r).forEach((function(t){r.hasOwnProperty(t)&&!m[t]&&Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(r,t))})),n.displayName=s,n}var m={$$typeof:!0,render:!0,compare:!0,type:!0};function g(t){var e=t.children,n=t.render,r=e||n;return"function"!=typeof r?null:y(r)}function b(t,e,n,r,o){var i="children"===e?"render":"children",a="function"==typeof t[e],s="function"==typeof t[i];return a&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):a||s?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}g.propTypes={children:b,render:b},g.displayName="Observer";n.d(e,"a",(function(){return K})),n.d(e,"b",(function(){return U}));var _=0;var w={};function x(t){return w[t]||(w[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+_+")";return _++,e}(t)),w[t]}function O(t,e){if(S(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.hasOwnProperty.call(e,n[o])||!S(t[n[o]],e[n[o]]))return!1;return!0}function S(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var k={$$typeof:1,render:1,compare:1,type:1,childContextTypes:1,contextType:1,contextTypes:1,defaultProps:1,getDefaultProps:1,getDerivedStateFromError:1,getDerivedStateFromProps:1,mixins:1,propTypes:1};function T(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var C=x("patchMixins"),E=x("patchedDefinition");function A(t,e){for(var n=this,r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.locks++;try{var a;return null!=t&&(a=t.apply(this,o)),a}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(n,o)}))}}function j(t,e){return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];A.call.apply(A,[this,t,e].concat(r))}}function P(t,e,n){var r=function(t,e){var n=t[C]=t[C]||{},r=n[e]=n[e]||{};return r.locks=r.locks||0,r.methods=r.methods||[],r}(t,e);r.methods.indexOf(n)<0&&r.methods.push(n);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[E]){var i=t[e],a=function t(e,n,r,o,i){var a,s=j(i,o);return(a={})[E]=!0,a.get=function(){return s},a.set=function(i){if(this===e)s=j(i,o);else{var a=t(this,n,r,o,i);Object.defineProperty(this,n,a)}},a.configurable=!0,a.enumerable=r,a}(t,e,o?o.enumerable:void 0,r,i);Object.defineProperty(t,e,a)}}var D=r.a||"$mobx",M=x("isUnmounted"),I=x("skipRender"),R=x("isForcingUpdate");function N(t){var e=t.prototype;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==o.PureComponent)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==q)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=q;V(e,"props"),V(e,"state");var n=e.render;return e.render=function(){return F.call(this,n)},P(e,"componentWillUnmount",(function(){if(!0!==u()){if(this.render[D])this.render[D].dispose();else;this[M]=!0}})),t}function F(t){var e=this;if(!0===u())return t.call(this);T(this,I,!1),T(this,R,!1);var n,i=(n=this).displayName||n.name||n.constructor&&(n.constructor.displayName||n.constructor.name)||"<component>",a=t.bind(this),s=!1,c=new r.b(i+".render()",(function(){if(!s&&(s=!0,!0!==e[M])){var t=!0;try{T(e,R,!0),e[I]||o.Component.prototype.forceUpdate.call(e),t=!1}finally{T(e,R,!1),t&&c.dispose()}}}));function l(){s=!1;var t=void 0,e=void 0;if(c.track((function(){try{e=Object(r.c)(!1,a)}catch(e){t=e}})),t)throw t;return e}return c.reactComponent=this,l[D]=c,this.render=l,l.call(this)}function q(t,e){return u()&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==e||!O(this.props,t)}function V(t,e){var n=x("reactProp_"+e+"_valueHolder"),o=x("reactProp_"+e+"_atomHolder");function i(){return this[o]||T(this,o,Object(r.i)("reactive "+e)),this[o]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return r.e&&r.d&&(t=Object(r.e)(!0)),i.call(this).reportObserved(),r.e&&r.d&&Object(r.d)(t),this[n]},set:function(t){this[R]||O(this[n],t)?T(this,n,t):(T(this,n,t),T(this,I,!0),i.call(this).reportChanged(),T(this,I,!1))}})}var L="function"==typeof Symbol&&Symbol.for,z=L?Symbol.for("react.forward_ref"):"function"==typeof o.forwardRef&&Object(o.forwardRef)((function(t){return null})).$$typeof,B=L?Symbol.for("react.memo"):"function"==typeof o.memo&&Object(o.memo)((function(t){return null})).$$typeof;function U(t){if(!0===t.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),B&&t.$$typeof===B)throw new Error("Mobx observer: You are trying to use 'observer' on function component wrapped to either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(z&&t.$$typeof===z){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(o.forwardRef)((function(){var t=arguments;return Object(o.createElement)(g,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(o.Component,t)?N(t):v(t)}function W(){return(W=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var $=i.a.createContext({});function H(t,e,n,r){var o,a,s,u=i.a.forwardRef((function(n,r){var o=W({},n),a=i.a.useContext($);return Object.assign(o,t(a||{},o)||{}),r&&(o.ref=r),i.a.createElement(e,o)}));return r&&(u=U(u)),u.isMobxInjector=!0,o=e,a=u,s=Object.getOwnPropertyNames(Object.getPrototypeOf(o)),Object.getOwnPropertyNames(o).forEach((function(t){k[t]||-1!==s.indexOf(t)||Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(o,t))})),u.wrappedComponent=e,u.displayName=function(t,e){var n,r=t.displayName||t.name||t.constructor&&t.constructor.name||"Component";n=e?"inject-with-"+e+"("+r+")":"inject("+r+")";return n}(e,n),u}function G(t){return function(e,n){return t.forEach((function(t){if(!(t in n)){if(!(t in e))throw new Error("MobX injector: Store '"+t+"' is not available! Make sure it is provided by some Provider");n[t]=e[t]}})),n}}function K(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("function"==typeof arguments[0]){var r=arguments[0];return function(t){return H(r,t,r.name,!0)}}return function(t){return H(G(e),t,e.join("-"),!1)}}if(!o.Component)throw new Error("mobx-react requires React to be available");if(!r.n)throw new Error("mobx-react requires mobx to be available");"function"==typeof a.unstable_batchedUpdates&&Object(r.h)({reactionScheduler:a.unstable_batchedUpdates})},,function(t,e,n){var r=n(12),o=n(9).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){e.f=n(15)},function(t,e,n){var r=n(110)("keys"),o=n(66);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(9).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(12),o=n(11),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(40)(Function.call,n(43).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(t,e,n){var r=n(12),o=n(135).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(42),o=n(52);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(42),o=n(52);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u))<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(67),o=n(1),i=n(26),a=n(30),s=n(86),u=n(186),c=n(84),l=n(72),f=n(15)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,y,v,m){u(n,e,d);var g,b,_,w=function(t){if(!p&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",O="values"==y,S=!1,k=t.prototype,T=k[f]||k["@@iterator"]||y&&k[y],C=T||w(y),E=y?O?w("entries"):C:void 0,A="Array"==e&&k.entries||T;if(A&&(_=l(A.call(new t)))!==Object.prototype&&_.next&&(c(_,x,!0),r||"function"==typeof _[f]||a(_,f,h)),O&&T&&"values"!==T.name&&(S=!0,C=function(){return T.call(this)}),r&&!m||!p&&!S&&k[f]||a(k,f,C),s[e]=C,s[x]=h,y)if(g={values:O?C:w("values"),keys:v?C:w("keys"),entries:E},m)for(b in g)b in k||i(k,b,g[b]);else o(o.P+o.F*(p||S),e,g);return g}},function(t,e,n){var r=n(144),o=n(52);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var r=n(12),o=n(51),i=n(15)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(15)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(86),o=n(15)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(21),o=n(65);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(105),o=n(15)("iterator"),i=n(86);t.exports=n(18).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){"use strict";var r=n(24),o=n(69),i=n(17);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(73),o=n(191),i=n(86),a=n(31);t.exports=n(142)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,o,i=n(115),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(t){var e,n,r,o,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",i.call(u))),c&&(e=u.lastIndex),r=a.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),l&&r&&r.length>1&&s.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),t.exports=u},function(t,e,n){"use strict";var r=n(141)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r,o,i,a=n(40),s=n(180),u=n(134),c=n(130),l=n(9),f=l.process,p=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,y=l.Dispatch,v=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},b=function(t){g.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},h=function(t){delete m[t]},"process"==n(51)(f)?r=function(t){f.nextTick(a(g,t,1))}:y&&y.now?r=function(t){y.now(a(g,t,1))}:d?(i=(o=new d).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:p,clear:h}},function(t,e,n){"use strict";var r=n(9),o=n(20),i=n(67),a=n(121),s=n(30),u=n(89),c=n(10),l=n(88),f=n(42),p=n(17),h=n(199),d=n(71).f,y=n(21).f,v=n(149),m=n(84),g=r.ArrayBuffer,b=r.DataView,_=r.Math,w=r.RangeError,x=r.Infinity,O=g,S=_.abs,k=_.pow,T=_.floor,C=_.log,E=_.LN2,A=o?"_b":"buffer",j=o?"_l":"byteLength",P=o?"_o":"byteOffset";function D(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,u=(1<<s)-1,c=u>>1,l=23===e?k(2,-24)-k(2,-77):0,f=0,p=t<0||0===t&&1/t<0?1:0;for((t=S(t))!=t||t===x?(o=t!=t?1:0,r=u):(r=T(C(t)/E),t*(i=k(2,-r))<1&&(r--,i*=2),(t+=r+c>=1?l/i:l*k(2,1-c))*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(t*i-1)*k(2,e),r+=c):(o=t*k(2,c-1)*k(2,e),r=0));e>=8;a[f++]=255&o,o/=256,e-=8);for(r=r<<e|o,s+=e;s>0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*p,a}function M(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,s=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-x:x;r+=k(2,e),l-=a}return(c?-1:1)*r*k(2,l-e)}function I(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function R(t){return[255&t]}function N(t){return[255&t,t>>8&255]}function F(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function q(t){return D(t,52,8)}function V(t){return D(t,23,4)}function L(t,e,n){y(t.prototype,e,{get:function(){return this[n]}})}function z(t,e,n,r){var o=h(+n);if(o+e>t[j])throw w("Wrong index!");var i=t[A]._b,a=o+t[P],s=i.slice(a,a+e);return r?s:s.reverse()}function B(t,e,n,r,o,i){var a=h(+n);if(a+e>t[j])throw w("Wrong index!");for(var s=t[A]._b,u=a+t[P],c=r(+o),l=0;l<e;l++)s[u+l]=c[i?l:e-l-1]}if(a.ABV){if(!c((function(){g(1)}))||!c((function(){new g(-1)}))||c((function(){return new g,new g(1.5),new g(NaN),"ArrayBuffer"!=g.name}))){for(var U,W=(g=function(t){return l(this,g),new O(h(t))}).prototype=O.prototype,$=d(O),H=0;$.length>H;)(U=$[H++])in g||s(g,U,O[U]);i||(W.constructor=g)}var G=new b(new g(2)),K=b.prototype.setInt8;G.setInt8(0,2147483648),G.setInt8(1,2147483649),!G.getInt8(0)&&G.getInt8(1)||u(b.prototype,{setInt8:function(t,e){K.call(this,t,e<<24>>24)},setUint8:function(t,e){K.call(this,t,e<<24>>24)}},!0)}else g=function(t){l(this,g,"ArrayBuffer");var e=h(t);this._b=v.call(new Array(e),0),this[j]=e},b=function(t,e,n){l(this,b,"DataView"),l(t,g,"DataView");var r=t[j],o=f(e);if(o<0||o>r)throw w("Wrong offset!");if(o+(n=void 0===n?r-o:p(n))>r)throw w("Wrong length!");this[A]=t,this[P]=o,this[j]=n},o&&(L(g,"byteLength","_l"),L(b,"buffer","_b"),L(b,"byteLength","_l"),L(b,"byteOffset","_o")),u(b.prototype,{getInt8:function(t){return z(this,1,t)[0]<<24>>24},getUint8:function(t){return z(this,1,t)[0]},getInt16:function(t){var e=z(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=z(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return I(z(this,4,t,arguments[1]))},getUint32:function(t){return I(z(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return M(z(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return M(z(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){B(this,1,t,R,e)},setUint8:function(t,e){B(this,1,t,R,e)},setInt16:function(t,e){B(this,2,t,N,e,arguments[2])},setUint16:function(t,e){B(this,2,t,N,e,arguments[2])},setInt32:function(t,e){B(this,4,t,F,e,arguments[2])},setUint32:function(t,e){B(this,4,t,F,e,arguments[2])},setFloat32:function(t,e){B(this,4,t,V,e,arguments[2])},setFloat64:function(t,e){B(this,8,t,q,e,arguments[2])}});m(g,"ArrayBuffer"),m(b,"DataView"),s(b.prototype,a.VIEW,!0),e.ArrayBuffer=g,e.DataView=b},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(205)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";t.exports=n(1009)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notifyOfNext=function(t,e){var n=function t(e){s===Number.MAX_SAFE_INTEGER&&(s=0);return s++,void 0===a[e][s]?s:t(e)}(t);return a[t][n]=i[t].push({id:n,callback:e})-1,n},e.cancelNotifyOfNext=function(t,e){"undefined"!==a[t][e]&&(i[t][a[t][e]].callback=u,delete a[t][e])},e.notifyOfAll=function(t,e){t.forEach((function(t){o[t]=e}))};var r=n(75),o={},i={},a={},s=0;var u=function(){};function c(t){o[t.type](t)}function l(t){if(0!==i[t.type].length){t.persist=u;var e=[],n={};i[t.type].forEach((function(r){"reNotifyOfNext"===r.callback(t)&&(n[r.id]=e.push(r)-1)})),i[t.type]=e,a[t.type]=n}}function f(t){c(t),l(t)}function p(t,e,n,o){i[e]=[],a[e]={},t.addEventListener(e,n,r.passiveEventSupport?{capture:o,passive:"click"!==e}:o)}if(r.deviceHasTouch&&(p(window,"click",c,!0),Object.keys(r.touchEvents).forEach((function(t){p(document,t,"touchstart"===t?f:c,!0)}))),r.deviceHasMouse){Object.keys(r.mouseEvents).forEach((function(t){p(document,t,"mouseenter"===t?f:c,!("mouseenter"===t||"mouseleave"===t))})),p(document,"dragstart",l,!0),r.passiveEventSupport&&p(document,"scroll",l,!0),i.mutation=[],a.mutation={};var h=(0,r.dummyEvent)("mutation");(window.MutationObserver?new MutationObserver(l.bind(null,h)):{observe:function(){}}).observe(document,{childList:!0,attributes:!0,subtree:!0,characterData:!0})}["focus","blur"].forEach((function(t){p(window,t,l,!1)})),p(document,"keydown",c,!0)},function(t,e){t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}},function(t,e,n){var r=n(1018);t.exports=h,t.exports.parse=i,t.exports.compile=function(t,e){return s(i(t,e))},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,a=0,s="",l=e&&e.delimiter||"/";null!=(n=o.exec(t));){var f=n[0],p=n[1],h=n.index;if(s+=t.slice(a,h),a=h+f.length,p)s+=p[1];else{var d=t[a],y=n[2],v=n[3],m=n[4],g=n[5],b=n[6],_=n[7];s&&(r.push(s),s="");var w=null!=y&&null!=d&&d!==y,x="+"===b||"*"===b,O="?"===b||"*"===b,S=n[2]||l,k=m||g;r.push({name:v||i++,prefix:y||"",delimiter:S,optional:O,repeat:x,partial:w,asterisk:!!_,pattern:k?c(k):_?".*":"[^"+u(S)+"]+?"})}}return a<t.length&&(s+=t.substr(a)),s&&r.push(s),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function s(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,o){for(var i="",s=n||{},u=(o||{}).pretty?a:encodeURIComponent,c=0;c<t.length;c++){var l=t[c];if("string"!=typeof l){var f,p=s[l.name];if(null==p){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(p)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(f=u(p[h]),!e[c].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===h?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(p).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(p),!e[c].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');i+=l.prefix+f}}else i+=l}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t.sensitive?"":"i"}function p(t,e,n){r(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",s=0;s<t.length;s++){var c=t[s];if("string"==typeof c)a+=u(c);else{var p=u(c.prefix),h="(?:"+c.pattern+")";e.push(c),c.repeat&&(h+="(?:"+p+h+")*"),a+=h=c.optional?c.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var d=u(n.delimiter||"/"),y=a.slice(-d.length)===d;return o||(a=(y?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&y?"":"(?="+d+"|$)",l(new RegExp("^"+a,f(n)),e)}function h(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(h(t[o],e,n).source);return l(new RegExp("(?:"+r.join("|")+")",f(n)),e)}(t,e,n):function(t,e,n){return p(i(t,n),e,n)}(t,e,n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","AbortError")}catch(t){return t.code=20,t.name="AbortError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","UnknownError")}catch(t){return t.name="UnknownError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{if(null===t)return!1;const e=t.length;return e%2!=0?0!==t[Math.floor(e/2)]:t[e/2-1]+t[e/2]!==0}},function(t,e,n){var r=n(1014),o=n(817);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?o(t):e}},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(e)}t.exports=n},function(t,e,n){var r=n(1015);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},function(t,e,n){(function(r,o){var i,a,s;a=[],void 0===(s="function"==typeof(i=function(){return function(){"use strict";var t=Object.prototype.hasOwnProperty,e={copyProperties:function(t,e){var n;for(n in t)e[n]=t[n]},resolveTransformObject:function(t,n,r){var o,i;if("number"!=typeof r&&(r=0),++r>=10)return t;for(o in t)"string"==typeof t[o]&&0===t[o].indexOf("[%lktxp]")?(i=t[o].substring(8),n.hasOwnProperty(i)&&(t[o]=n[i])):"object"==typeof t[o]&&(t[o]=e.resolveTransformObject(t[o],n,r));return t},resolveTransformParams:function(t,n){var r,o,i=[];if(void 0===n)return t;for(r=0;r<t.length;r++)o=y(t[r],"shallow-recurse-objects"),i.push(e.resolveTransformObject(o,n));return i},getIn:function(t,e,n){if(null!=t){if(!n)return t[e];if("string"==typeof e&&(e=e.split(".")),!Array.isArray(e))throw new Error("path must be a string or array. Found "+typeof e);for(var r=0,o=e.length;null!=t&&r<o;)t=t[e[r++]];return r&&r==o?t:void 0}}},i={aeq:a,lt:s,gt:u};function a(t,e){var n,r,o,i;if(t===e)return!0;if(!t||!e||!0===t||!0===e||t!=t||e!=e){switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t==t?9:0}switch(e){case void 0:case null:i=1;break;case!1:i=3;break;case!0:i=4;break;case"":i=5;break;default:i=e==e?9:0}if(9!==o||9!==i)return o===i}return n=Number(t),r=Number(e),n==n||r==r?n===r:(n=t.toString())==(r=e.toString())}function s(t,e,n){var r,o,i,a;if(!t||!e||!0===t||!0===e||t!=t||e!=e){switch(t){case void 0:case null:i=1;break;case!1:i=3;break;case!0:i=4;break;case"":i=5;break;default:i=t==t?9:0}switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}if(9!==i||9!==a)return i===a?n:i<a}return r=Number(t),o=Number(e),r==r&&o==o?r<o||!(r>o)&&n:r==r&&o!=o||(o!=o||r==r)&&(t<e||!(t>e)&&(t==e?n:(r=t.toString())<(o=e.toString())||r==o&&n))}function u(t,e,n){var r,o,i,a;if(!t||!e||!0===t||!0===e||t!=t||e!=e){switch(t){case void 0:case null:i=1;break;case!1:i=3;break;case!0:i=4;break;case"":i=5;break;default:i=t==t?9:0}switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e==e?9:0}if(9!==i||9!==a)return i===a?n:i>a}return r=Number(t),o=Number(e),r==r&&o==o?r>o||!(r<o)&&n:(r!=r||o==o)&&(o==o&&r!=r||t>e||!(t<e)&&(t==e?n:(r=t.toString())>(o=e.toString())||r==o&&n))}function c(t,e,n){return i.aeq(t,e)?0:i.lt(t,e,!1)?n?1:-1:i.gt(t,e,!1)?n?-1:1:0}function l(t,e,n,r,o){var i,a=o||0,s=e[a],u=!1;if("object"==typeof t&&s in t&&(i=t[s]),a+1>=e.length)u=n(i,r);else if(Array.isArray(i))for(var c=0,f=i.length;c<f&&!0!==(u=l(i[c],e,n,r,a+1));c+=1);else u=l(i,e,n,r,a+1);return u}function f(e){return"string"==typeof e||Array.isArray(e)?function(t){return-1!==e.indexOf(t)}:"object"==typeof e&&null!==e?function(n){return t.call(e,n)}:null}function p(e,n){for(var r in n)if(t.call(n,r))return h[r](e,n[r]);return!1}var h={$eq:function(t,e){return t===e},$aeq:function(t,e){return t==e},$ne:function(t,e){return e!=e?t==t:t!==e},$dteq:function(t,e){return i.aeq(t,e)},$gt:function(t,e){return i.gt(t,e,!1)},$gte:function(t,e){return i.gt(t,e,!0)},$lt:function(t,e){return i.lt(t,e,!1)},$lte:function(t,e){return i.lt(t,e,!0)},$jgt:function(t,e){return t>e},$jgte:function(t,e){return t>=e},$jlt:function(t,e){return t<e},$jlte:function(t,e){return t<=e},$between:function(t,e){return null!=t&&i.gt(t,e[0],!0)&&i.lt(t,e[1],!0)},$jbetween:function(t,e){return null!=t&&t>=e[0]&&t<=e[1]},$in:function(t,e){return-1!==e.indexOf(t)},$nin:function(t,e){return-1===e.indexOf(t)},$keyin:function(t,e){return t in e},$nkeyin:function(t,e){return!(t in e)},$definedin:function(t,e){return void 0!==e[t]},$undefinedin:function(t,e){return void 0===e[t]},$regex:function(t,e){return e.test(t)},$containsString:function(t,e){return"string"==typeof t&&-1!==t.indexOf(e)},$containsNone:function(t,e){return!h.$containsAny(t,e)},$containsAny:function(t,e){var n=f(t);return null!==n&&(Array.isArray(e)?e.some(n):n(e))},$contains:function(t,e){var n=f(t);return null!==n&&(Array.isArray(e)?e.every(n):n(e))},$elemMatch:function(t,e){return!!Array.isArray(t)&&t.some((function(t){return Object.keys(e).every((function(n){var r=e[n];return"object"==typeof r&&r||(r={$eq:r}),-1!==n.indexOf(".")?l(t,n.split("."),p,e[n]):p(t[n],r)}))}))},$type:function(t,e){var n=typeof t;return"object"===n&&(Array.isArray(t)?n="array":t instanceof Date&&(n="date")),"object"!=typeof e?n===e:p(n,e)},$finite:function(t,e){return e===isFinite(t)},$size:function(t,e){return!!Array.isArray(t)&&("object"!=typeof e?t.length===e:p(t.length,e))},$len:function(t,e){return"string"==typeof t&&("object"!=typeof e?t.length===e:p(t.length,e))},$where:function(t,e){return!0===e(t)},$not:function(t,e){return!p(t,e)},$and:function(t,e){for(var n=0,r=e.length;n<r;n+=1)if(!p(t,e[n]))return!1;return!0},$or:function(t,e){for(var n=0,r=e.length;n<r;n+=1)if(p(t,e[n]))return!0;return!1},$exists:function(t,e){return e?void 0!==t:void 0===t}},d={$eq:h.$eq,$aeq:!0,$dteq:!0,$gt:!0,$gte:!0,$lt:!0,$lte:!0,$in:!0,$between:!0};function y(t,e){if(null==t)return null;var n;switch(e||"parse-stringify"){case"parse-stringify":n=JSON.parse(JSON.stringify(t));break;case"jquery-extend-deep":n=jQuery.extend(!0,{},t);break;case"shallow":n=Object.create(t.constructor.prototype),Object.keys(t).map((function(e){n[e]=t[e]}));break;case"shallow-assign":n=Object.create(t.constructor.prototype),Object.assign(n,t);break;case"shallow-recurse-objects":n=y(t,"shallow"),Object.keys(t).forEach((function(e){"object"==typeof t[e]&&"Object"===t[e].constructor.name?n[e]=y(t[e],"shallow-recurse-objects"):Array.isArray(t[e])&&(n[e]=function(t,e){if("parse-stringify"==e)return y(t,e);for(var n=[],r=0,o=t.length;r<o;r++)n[r]=y(t[r],e);return n}(t[e],"shallow-recurse-objects"))}))}return n}function v(){try{return window&&void 0!==window.localStorage&&null!==window.localStorage}catch(t){return!1}}function m(){}function g(t,e){this.filename=t||"loki.db",this.collections=[],this.databaseVersion=1.5,this.engineVersion=1.5,this.autosave=!1,this.autosaveInterval=5e3,this.autosaveHandle=null,this.throttledSaves=!0,this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,this.throttledSavePending=!1,this.throttledCallbacks=[],this.verbose=!(!e||!e.hasOwnProperty("verbose"))&&e.verbose,this.events={init:[],loaded:[],flushChanges:[],close:[],changes:[],warning:[]},e&&e.hasOwnProperty("env")?this.ENV=e.env:this.ENV=void 0!==r&&(r.android||r.NSObject)?"NATIVESCRIPT":"undefined"==typeof window||void 0!==r&&r.window&&void 0!==o?"NODEJS":"undefined"!=typeof document?-1===document.URL.indexOf("http://")&&-1===document.URL.indexOf("https://")?"CORDOVA":"BROWSER":"CORDOVA","undefined"===this.ENV&&(this.ENV="NODEJS"),this.configureOptions(e,!0),this.on("init",this.clearChanges)}function b(t){this.hashStore={},this.options=t||{},this.options.hasOwnProperty("asyncResponses")||(this.options.asyncResponses=!1),this.options.hasOwnProperty("asyncTimeout")||(this.options.asyncTimeout=50)}function _(t,e){if(this.mode="reference",this.adapter=null,this.options=e||{},this.dbref=null,this.dbname="",this.pageIterator={},!t)throw new Error("LokiPartitioningAdapter requires a (non-reference mode) adapter on construction");if("reference"===t.mode)throw new Error("LokiPartitioningAdapter cannot be instantiated with a reference mode adapter");this.adapter=t,this.options.hasOwnProperty("paging")||(this.options.paging=!1),this.options.hasOwnProperty("pageSize")||(this.options.pageSize=26214400),this.options.hasOwnProperty("delimiter")||(this.options.delimiter="$<\n")}function w(){try{this.fs=n(1012)}catch(t){this.fs=null}}function x(){}function O(t,e){return e=e||{},this.collection=t,this.filteredrows=[],this.filterInitialized=!1,this}function S(t,e,n){this.collection=t,this.name=e,this.rebuildPending=!1,this.options=n||{},this.options.hasOwnProperty("persistent")||(this.options.persistent=!1),this.options.hasOwnProperty("sortPriority")||(this.options.sortPriority="passive"),this.options.hasOwnProperty("minRebuildInterval")||(this.options.minRebuildInterval=1),this.resultset=new O(t),this.resultdata=[],this.resultsdirty=!1,this.cachedresultset=null,this.filterPipeline=[],this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,this.events={rebuild:[]}}function k(e,n){this.name=e,this.data=[],this.idIndex=[],this.binaryIndices={},this.constraints={unique:{},exact:{}},this.uniqueNames=[],this.transforms={},this.objType=e,this.dirty=!0,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null;var r=this;(n=n||{}).hasOwnProperty("unique")&&(Array.isArray(n.unique)||(n.unique=[n.unique]),n.unique.forEach((function(t){r.uniqueNames.push(t),r.constraints.unique[t]=new R(t)}))),n.hasOwnProperty("exact")&&n.exact.forEach((function(t){r.constraints.exact[t]=new N(t)})),this.adaptiveBinaryIndices=!n.hasOwnProperty("adaptiveBinaryIndices")||n.adaptiveBinaryIndices,this.transactional=!!n.hasOwnProperty("transactional")&&n.transactional,this.cloneObjects=!!n.hasOwnProperty("clone")&&n.clone,this.cloneMethod=n.hasOwnProperty("cloneMethod")?n.cloneMethod:"parse-stringify",this.asyncListeners=!!n.hasOwnProperty("asyncListeners")&&n.asyncListeners,this.disableMeta=!!n.hasOwnProperty("disableMeta")&&n.disableMeta,this.disableChangesApi=!n.hasOwnProperty("disableChangesApi")||n.disableChangesApi,this.disableDeltaChangesApi=!n.hasOwnProperty("disableDeltaChangesApi")||n.disableDeltaChangesApi,this.disableChangesApi&&(this.disableDeltaChangesApi=!0),this.autoupdate=!!n.hasOwnProperty("autoupdate")&&n.autoupdate,this.serializableIndices=!n.hasOwnProperty("serializableIndices")||n.serializableIndices,this.ttl={age:null,ttlInterval:null,daemon:null},this.setTTL(n.ttl||-1,n.ttlInterval),this.maxId=0,this.DynamicViews=[],this.events={insert:[],update:[],"pre-insert":[],"pre-update":[],close:[],flushbuffer:[],error:[],delete:[],warning:[]},this.changes=[],this.dirtyIds=[],this.ensureId();var o=[];if(n&&n.indices)if("[object Array]"===Object.prototype.toString.call(n.indices))o=n.indices;else{if("string"!=typeof n.indices)throw new TypeError("Indices needs to be a string or an array of strings");o=[n.indices]}for(var i=0;i<o.length;i++)this.ensureIndex(o[i]);function a(t,e){var n=null!==e&&"object"==typeof e?Object.keys(e):null;if(n&&n.length&&["string","boolean","number"].indexOf(typeof e)<0){for(var o={},i=0;i<n.length;i++){var s=n[i];if(e.hasOwnProperty(s))if(!t.hasOwnProperty(s)||r.uniqueNames.indexOf(s)>=0||"$loki"==s||"meta"==s)o[s]=e[s];else{var u=a(t[s],e[s]);void 0!==u&&u!={}&&(o[s]=u)}}return 0===Object.keys(o).length?void 0:o}return t===e?void 0:e}function s(){r.changes=[]}this.observerCallback=function(e){var n="function"==typeof Set?new Set:[];n.add||(n.add=function(t){return-1===this.indexOf(t)&&this.push(t),this}),e.forEach((function(t){n.add(t.object)})),n.forEach((function(e){if(!t.call(e,"$loki"))return r.removeAutoUpdateObserver(e);try{r.update(e)}catch(t){}}))},this.getChangeDelta=function(t,e){return e?a(e,t):JSON.parse(JSON.stringify(t))},this.getObjectDelta=a,this.getChanges=function(){return r.changes},this.flushChanges=s,this.setChangesApi=function(t){r.disableChangesApi=!t,t||(r.disableDeltaChangesApi=!1)},this.on("delete",(function(t){r.disableChangesApi||r.createChange(r.name,"R",t)})),this.on("warning",(function(t){r.lokiConsoleWrapper.warn(t)})),s()}function T(t){return-1!==t.indexOf(".")}function C(t){return parseFloat(t,10)}function E(t,e){return t+e}function A(t,e){return t-e}function j(t){return t.reduce(E,0)/t.length}function P(t,e,n){if(!1===n)return t[e];for(var r=e.split("."),o=t;r.length>0;)o=o[r.shift()];return o}function D(t,e,n){for(var r,o,i=0,a=t.length;i<a;){if(o=i+a>>1,0===(r=n.apply(null,[e,t[o]])))return{found:!0,index:o};r<0?a=o:i=o+1}return{found:!1,index:a}}function M(t){return function(e,n){return D(e,n,t)}}function I(){}function R(t){this.field=t,this.keyMap={},this.lokiMap={}}function N(t){this.index={},this.field=t}return m.prototype.events={},m.prototype.asyncListeners=!1,m.prototype.on=function(t,e){var n,r=this;return Array.isArray(t)?(t.forEach((function(t){r.on(t,e)})),e):((n=this.events[t])||(n=this.events[t]=[]),n.push(e),e)},m.prototype.emit=function(t){var e=this,n=Array.prototype.slice.call(arguments,1);if(!t||!this.events[t])throw new Error("No event "+t+" defined");this.events[t].forEach((function(t){e.asyncListeners?setTimeout((function(){t.apply(e,n)}),1):t.apply(e,n)}))},m.prototype.addListener=m.prototype.on,m.prototype.removeListener=function(t,e){var n=this;if(Array.isArray(t))t.forEach((function(t){n.removeListener(t,e)}));else if(this.events[t]){var r=this.events[t];r.splice(r.indexOf(e),1)}},g.prototype=new m,g.prototype.constructor=g,g.prototype.getIndexedAdapter=function(){return n(1011)},g.prototype.configureOptions=function(t,e){var n={fs:w,localStorage:x,memory:b};if(this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,void 0!==t){if(this.options=t,this.options.hasOwnProperty("persistenceMethod")&&"function"==typeof n[t.persistenceMethod]&&(this.persistenceMethod=t.persistenceMethod,this.persistenceAdapter=new n[t.persistenceMethod]),this.options.hasOwnProperty("adapter")&&(this.persistenceMethod="adapter",this.persistenceAdapter=t.adapter,this.options.adapter=null,this.isIncremental="incremental"===this.persistenceAdapter.mode),t.autoload&&e){var r=this;setTimeout((function(){r.loadDatabase(t,t.autoloadCallback)}),1)}this.options.hasOwnProperty("autosaveInterval")&&(this.autosaveDisable(),this.autosaveInterval=parseInt(this.options.autosaveInterval,10)),this.options.hasOwnProperty("autosave")&&this.options.autosave&&(this.autosaveDisable(),this.autosave=!0,this.options.hasOwnProperty("autosaveCallback")?this.autosaveEnable(t,t.autosaveCallback):this.autosaveEnable()),this.options.hasOwnProperty("throttledSaves")&&(this.throttledSaves=this.options.throttledSaves)}this.options.hasOwnProperty("serializationMethod")||(this.options.serializationMethod="normal"),this.options.hasOwnProperty("destructureDelimiter")||(this.options.destructureDelimiter="$<\n"),null===this.persistenceAdapter&&(this.persistenceMethod={NODEJS:"fs",BROWSER:"localStorage",CORDOVA:"localStorage",MEMORY:"memory"}[this.ENV],this.persistenceMethod&&(this.persistenceAdapter=new n[this.persistenceMethod]))},g.prototype.copy=function(t){var e,n,r=new g(this.filename,{env:"NA"});if(t=t||{},r.loadJSONObject(this,{retainDirtyFlags:!0}),t.hasOwnProperty("removeNonSerializable")&&!0===t.removeNonSerializable)for(r.autosaveHandle=null,r.persistenceAdapter=null,e=r.collections.length,n=0;n<e;n++)r.collections[n].constraints=null,r.collections[n].ttl=null;return r},g.prototype.addCollection=function(t,e){var n,r=this.collections.length;if(e&&!0===e.disableMeta){if(!1===e.disableChangesApi)throw new Error("disableMeta option cannot be passed as true when disableChangesApi is passed as false");if(!1===e.disableDeltaChangesApi)throw new Error("disableMeta option cannot be passed as true when disableDeltaChangesApi is passed as false");if("number"==typeof e.ttl&&e.ttl>0)throw new Error("disableMeta option cannot be passed as true when ttl is enabled")}for(n=0;n<r;n+=1)if(this.collections[n].name===t)return this.collections[n];var o=new k(t,e);return o.isIncremental=this.isIncremental,this.collections.push(o),this.verbose&&(o.lokiConsoleWrapper=console),o},g.prototype.loadCollection=function(t){if(!t.name)throw new Error("Collection must have a name property to be loaded");this.collections.push(t)},g.prototype.getCollection=function(t){var e,n=this.collections.length;for(e=0;e<n;e+=1)if(this.collections[e].name===t)return this.collections[e];return this.emit("warning","collection "+t+" not found"),null},g.prototype.renameCollection=function(t,e){var n=this.getCollection(t);return n&&(n.name=e),n},g.prototype.listCollections=function(){for(var t=this.collections.length,e=[];t--;)e.push({name:this.collections[t].name,type:this.collections[t].objType,count:this.collections[t].data.length});return e},g.prototype.removeCollection=function(t){var e,n=this.collections.length;for(e=0;e<n;e+=1)if(this.collections[e].name===t){var r=new k(t,{}),o=this.collections[e];for(var i in o)o.hasOwnProperty(i)&&r.hasOwnProperty(i)&&(o[i]=r[i]);return void this.collections.splice(e,1)}},g.prototype.getName=function(){return this.name},g.prototype.serializeReplacer=function(t,e){switch(t){case"autosaveHandle":case"persistenceAdapter":case"constraints":case"ttl":return null;case"throttledSavePending":case"throttledCallbacks":return;case"lokiConsoleWrapper":return null;default:return e}},g.prototype.serialize=function(t){switch((t=t||{}).hasOwnProperty("serializationMethod")||(t.serializationMethod=this.options.serializationMethod),t.serializationMethod){case"normal":return JSON.stringify(this,this.serializeReplacer);case"pretty":return JSON.stringify(this,this.serializeReplacer,2);case"destructured":return this.serializeDestructured();default:return JSON.stringify(this,this.serializeReplacer)}},g.prototype.toJson=g.prototype.serialize,g.prototype.serializeDestructured=function(t){var e,n,r,o,i,a=[];if((t=t||{}).hasOwnProperty("partitioned")||(t.partitioned=!1),t.hasOwnProperty("delimited")||(t.delimited=!0),t.hasOwnProperty("delimiter")||(t.delimiter=this.options.destructureDelimiter),!0===t.partitioned&&t.hasOwnProperty("partition")&&t.partition>=0)return this.serializeCollection({delimited:t.delimited,delimiter:t.delimiter,collectionIndex:t.partition});for((i=new g(this.filename)).loadJSONObject(this),e=0;e<i.collections.length;e++)i.collections[e].data=[];if(!0===t.partitioned&&-1===t.partition)return i.serialize({serializationMethod:"normal"});for(a.push(i.serialize({serializationMethod:"normal"})),i=null,e=0;e<this.collections.length;e++)if(r=this.serializeCollection({delimited:t.delimited,delimiter:t.delimiter,collectionIndex:e}),!1===t.partitioned&&!1===t.delimited){if(!Array.isArray(r))throw new Error("a nondelimited, non partitioned collection serialization did not return an expected array");for(o=r.length,n=0;n<o;n++)a.push(r[n]),r[n]=null;a.push("")}else a.push(r);return t.partitioned?(t.delimited,a):t.delimited?(a.push(""),a.join(t.delimiter)):(a.push(""),a)},g.prototype.serializeCollection=function(t){var e,n,r=[];if((t=t||{}).hasOwnProperty("delimited")||(t.delimited=!0),!t.hasOwnProperty("collectionIndex"))throw new Error("serializeCollection called without 'collectionIndex' option");for(e=this.collections[t.collectionIndex].data.length,r=[],n=0;n<e;n++)r.push(JSON.stringify(this.collections[t.collectionIndex].data[n]));return t.delimited?(r.push(""),r.join(t.delimiter)):r},g.prototype.deserializeDestructured=function(t,e){var n,r,o,i=[],a=0,s=1,u=!1;if((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),e.partitioned){if(e.hasOwnProperty("partition"))return-1===e.partition?n=JSON.parse(t[0]):this.deserializeCollection(t[e.partition+1],e);for(r=(n=JSON.parse(t[0])).collections.length,a=0;a<r;a++)n.collections[a].data=this.deserializeCollection(t[a+1],e);return n}if(e.delimited){if(i=t.split(e.delimiter),t=null,0===i.length)return null}else i=t;for(r=(n=JSON.parse(i[0])).collections.length,i[0]=null;!u;)i[s],""===i[s]?++a>r&&(u=!0):(o=JSON.parse(i[s]),n.collections[a].data.push(o)),i[s++]=null;return n},g.prototype.deserializeCollection=function(t,e){var n,r,o=[];for((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),e.delimited?(o=t.split(e.delimiter)).pop():o=t,r=o.length,n=0;n<r;n++)o[n]=JSON.parse(o[n]);return o},g.prototype.loadJSON=function(t,e){var n;if(0===t.length)n={};else switch(this.options.serializationMethod){case"normal":case"pretty":n=JSON.parse(t);break;case"destructured":n=this.deserializeDestructured(t);break;default:n=JSON.parse(t)}this.loadJSONObject(n,e)},g.prototype.loadJSONObject=function(t,n){var r,o,i,a,s,u,c=0,l=t.collections?t.collections.length:0;function f(t){var r,o=n[t.name];return o.proto?(r=o.inflate||e.copyProperties,function(t){var e=new o.proto;return r(t,e),e}):o.inflate}for(this.name=t.name,t.hasOwnProperty("throttledSaves")&&n&&!n.hasOwnProperty("throttledSaves")&&(this.throttledSaves=t.throttledSaves),this.collections=[];c<l;c+=1){if(r=t.collections[c],(o=this.addCollection(r.name,{disableChangesApi:r.disableChangesApi,disableDeltaChangesApi:r.disableDeltaChangesApi,disableMeta:r.disableMeta})).adaptiveBinaryIndices=!!r.hasOwnProperty("adaptiveBinaryIndices")&&!0===r.adaptiveBinaryIndices,o.transactional=r.transactional,o.asyncListeners=r.asyncListeners,o.cloneObjects=r.cloneObjects,o.cloneMethod=r.cloneMethod||"parse-stringify",o.autoupdate=r.autoupdate,o.changes=r.changes,o.dirtyIds=r.dirtyIds||[],n&&!0===n.retainDirtyFlags?o.dirty=r.dirty:o.dirty=!1,i=r.data.length,a=0,n&&n.hasOwnProperty(r.name))for(s=f(r);a<i;a++)u=s(r.data[a]),o.data[a]=u,o.addAutoUpdateObserver(u);else for(;a<i;a++)o.data[a]=r.data[a],o.addAutoUpdateObserver(o.data[a]);if(o.maxId=void 0===r.maxId?0:r.maxId,o.idIndex=r.idIndex,void 0!==r.binaryIndices&&(o.binaryIndices=r.binaryIndices),void 0!==r.transforms&&(o.transforms=r.transforms),o.ensureId(),o.uniqueNames=[],r.hasOwnProperty("uniqueNames"))for(o.uniqueNames=r.uniqueNames,a=0;a<o.uniqueNames.length;a++)o.ensureUniqueIndex(o.uniqueNames[a]);if(void 0!==r.DynamicViews){for(var p=0;p<r.DynamicViews.length;p++){var h=r.DynamicViews[p],d=o.addDynamicView(h.name,h.options);d.resultdata=h.resultdata,d.resultsdirty=h.resultsdirty,d.filterPipeline=h.filterPipeline,d.sortCriteria=h.sortCriteria,d.sortFunction=null,d.sortDirty=h.sortDirty,d.resultset.filteredrows=h.resultset.filteredrows,d.resultset.filterInitialized=h.resultset.filterInitialized,d.rematerialize({removeWhereFilters:!0})}t.databaseVersion<1.5&&(o.ensureAllIndexes(!0),o.dirty=!0)}}},g.prototype.close=function(t){this.autosave&&(this.autosaveDisable(),this.autosaveDirty()&&(this.saveDatabase(t),t=void 0)),t&&this.on("close",t),this.emit("close")},g.prototype.generateChangesNotification=function(t){function e(t){return t.name}var n=[],r=t||this.collections.map(e);return this.collections.forEach((function(t){-1!==r.indexOf(e(t))&&(n=n.concat(t.getChanges()))})),n},g.prototype.serializeChanges=function(t){return JSON.stringify(this.generateChangesNotification(t))},g.prototype.clearChanges=function(){this.collections.forEach((function(t){t.flushChanges&&t.flushChanges()}))},b.prototype.loadDatabase=function(t,e){var n=this;this.options.asyncResponses?setTimeout((function(){n.hashStore.hasOwnProperty(t)?e(n.hashStore[t].value):e(null)}),this.options.asyncTimeout):this.hashStore.hasOwnProperty(t)?e(this.hashStore[t].value):e(null)},b.prototype.saveDatabase=function(t,e,n){var r,o=this;this.options.asyncResponses?setTimeout((function(){r=o.hashStore.hasOwnProperty(t)?o.hashStore[t].savecount:0,o.hashStore[t]={savecount:r+1,lastsave:new Date,value:e},n()}),this.options.asyncTimeout):(r=this.hashStore.hasOwnProperty(t)?this.hashStore[t].savecount:0,this.hashStore[t]={savecount:r+1,lastsave:new Date,value:e},n())},b.prototype.deleteDatabase=function(t,e){this.hashStore.hasOwnProperty(t)&&delete this.hashStore[t],"function"==typeof e&&e()},_.prototype.loadDatabase=function(t,e){var n=this;this.dbname=t,this.dbref=new g(t),this.adapter.loadDatabase(t,(function(t){if(t){"string"!=typeof t&&e(new Error("LokiPartitioningAdapter received an unexpected response from inner adapter loadDatabase()"));var r=JSON.parse(t);n.dbref.loadJSONObject(r),r=null,n.dbref.collections.length,0!==n.dbref.collections.length?(n.pageIterator={collection:0,pageIndex:0},n.loadNextPartition(0,(function(){e(n.dbref)}))):e(n.dbref)}else e(t)}))},_.prototype.loadNextPartition=function(t,e){var n=this.dbname+"."+t,r=this;if(!0===this.options.paging)return this.pageIterator.pageIndex=0,void this.loadNextPage(e);this.adapter.loadDatabase(n,(function(n){var o=r.dbref.deserializeCollection(n,{delimited:!0,collectionIndex:t});r.dbref.collections[t].data=o,++t<r.dbref.collections.length?r.loadNextPartition(t,e):e()}))},_.prototype.loadNextPage=function(t){var e=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,n=this;this.adapter.loadDatabase(e,(function(e){var r=e.split(n.options.delimiter);e="";var o,i=r.length,a=""===r[i-1];for(a&&(r.pop(),""===r[(i=r.length)-1]&&1===i&&(r.pop(),i=r.length)),o=0;o<i;o++)n.dbref.collections[n.pageIterator.collection].data.push(JSON.parse(r[o])),r[o]=null;r=[],a?++n.pageIterator.collection<n.dbref.collections.length?n.loadNextPartition(n.pageIterator.collection,t):t():(n.pageIterator.pageIndex++,n.loadNextPage(t))}))},_.prototype.exportDatabase=function(t,e,n){var r,o=e.collections.length;for(this.dbref=e,this.dbname=t,this.dirtyPartitions=[-1],r=0;r<o;r++)e.collections[r].dirty&&this.dirtyPartitions.push(r);this.saveNextPartition((function(t){n(t)}))},_.prototype.saveNextPartition=function(t){var e=this,n=this.dirtyPartitions.shift(),r=this.dbname+(-1===n?"":"."+n);if(this.options.paging&&-1!==n)return this.pageIterator={collection:n,docIndex:0,pageIndex:0},void this.saveNextPage((function(n){0===e.dirtyPartitions.length?t(n):e.saveNextPartition(t)}));var o=this.dbref.serializeDestructured({partitioned:!0,delimited:!0,partition:n});this.adapter.saveDatabase(r,o,(function(n){n?t(n):0===e.dirtyPartitions.length?t(null):e.saveNextPartition(t)}))},_.prototype.saveNextPage=function(t){var e=this,n=this.dbref.collections[this.pageIterator.collection],r=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,o=0,i=n.data.length,a=this.options.delimiter.length,s="",u="",c=!1,l=!1,f=function(n){u="",n&&t(n),c?t(null):(e.pageIterator.pageIndex++,e.saveNextPage(t))};for(0===n.data.length&&(c=!0);;)if(c||(s=JSON.stringify(n.data[this.pageIterator.docIndex]),u+=s,o+=s.length,++this.pageIterator.docIndex>=i&&(c=!0)),o>=this.options.pageSize&&(l=!0),l&&!c||(u+=this.options.delimiter,o+=a),c||l)return void this.adapter.saveDatabase(r,u,f)},w.prototype.loadDatabase=function(t,e){var n=this;this.fs.stat(t,(function(r,o){!r&&o.isFile()?n.fs.readFile(t,{encoding:"utf8"},(function(t,n){e(t?new Error(t):n)})):e(null)}))},w.prototype.saveDatabase=function(t,e,n){var r=this,o=t+"~";this.fs.writeFile(o,e,(function(e){e?n(new Error(e)):r.fs.rename(o,t,n)}))},w.prototype.deleteDatabase=function(t,e){this.fs.unlink(t,(function(t){t?e(new Error(t)):e()}))},x.prototype.loadDatabase=function(t,e){v()?e(localStorage.getItem(t)):e(new Error("localStorage is not available"))},x.prototype.saveDatabase=function(t,e,n){v()?(localStorage.setItem(t,e),n(null)):n(new Error("localStorage is not available"))},x.prototype.deleteDatabase=function(t,e){v()?(localStorage.removeItem(t),e(null)):e(new Error("localStorage is not available"))},g.prototype.throttledSaveDrain=function(t,e){var n=this,r=(new Date).getTime();if(this.throttledSaves||t(!0),(e=e||{}).hasOwnProperty("recursiveWait")||(e.recursiveWait=!0),e.hasOwnProperty("recursiveWaitLimit")||(e.recursiveWaitLimit=!1),e.hasOwnProperty("recursiveWaitLimitDuration")||(e.recursiveWaitLimitDuration=2e3),e.hasOwnProperty("started")||(e.started=(new Date).getTime()),this.throttledSaves&&this.throttledSavePending){if(!e.recursiveWait)return void this.throttledCallbacks.push(t);this.throttledCallbacks.push((function(){return n.throttledSavePending?e.recursiveWaitLimit&&r-e.started>e.recursiveWaitLimitDuration?void t(!1):void n.throttledSaveDrain(t,e):void t(!0)}))}else t(!0)},g.prototype.loadDatabaseInternal=function(t,e){var n=e||function(t,e){if(t)throw t},r=this;null!==this.persistenceAdapter?this.persistenceAdapter.loadDatabase(this.filename,(function(e){if("string"==typeof e){var o=!1;try{r.loadJSON(e,t||{}),o=!0}catch(t){n(t)}o&&(n(null),r.emit("loaded","database "+r.filename+" loaded"))}else{if(!e)return n(null),void r.emit("loaded","empty database "+r.filename+" loaded");if(e instanceof Error)return void n(e);if("object"==typeof e)return r.loadJSONObject(e,t||{}),n(null),void r.emit("loaded","database "+r.filename+" loaded");n("unexpected adapter response : "+e)}})):n(new Error("persistenceAdapter not configured"))},g.prototype.loadDatabase=function(t,e){var n=this;this.throttledSaves?this.throttledSaveDrain((function(r){if(r)return n.throttledSavePending=!0,void n.loadDatabaseInternal(t,(function(t){0===n.throttledCallbacks.length?n.throttledSavePending=!1:n.saveDatabase(),"function"==typeof e&&e(t)}));"function"==typeof e&&e(new Error("Unable to pause save throttling long enough to read database"))}),t):this.loadDatabaseInternal(t,e)},g.prototype.saveDatabaseInternal=function(t){var e=t||function(t){if(t)throw t},n=this;if(this.persistenceAdapter)if("reference"!==this.persistenceAdapter.mode&&this.autosaveClearFlags(),"incremental"===this.persistenceAdapter.mode){var r=this.copy({removeNonSerializable:!0}),o=this.collections.map((function(t){return t.dirtyIds}));this.collections.forEach((function(t){t.dirtyIds=[]})),this.persistenceAdapter.saveDatabase(this.filename,r,(function(t){t&&n.collections.forEach((function(t,e){t.dirtyIds=t.dirtyIds.concat(o[e])})),e(t)}))}else"reference"===this.persistenceAdapter.mode&&"function"==typeof this.persistenceAdapter.exportDatabase?this.persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}),(function(t){n.autosaveClearFlags(),e(t)})):this.persistenceAdapter.saveDatabase(this.filename,this.serialize(),(function(t){e(t)}));else e(new Error("persistenceAdapter not configured"))},g.prototype.saveDatabase=function(t){if(this.throttledSaves)if(this.throttledSavePending)this.throttledCallbacks.push(t);else{var e=this.throttledCallbacks;this.throttledCallbacks=[],e.unshift(t),this.throttledSavePending=!0;var n=this;this.saveDatabaseInternal((function(t){n.throttledSavePending=!1,e.forEach((function(e){"function"==typeof e&&setTimeout((function(){e(t)}),1)})),n.throttledCallbacks.length>0&&n.saveDatabase()}))}else this.saveDatabaseInternal(t)},g.prototype.save=g.prototype.saveDatabase,g.prototype.deleteDatabase=function(t,e){var n=e||function(t,e){if(t)throw t};"function"!=typeof t||e||(n=t),null!==this.persistenceAdapter?this.persistenceAdapter.deleteDatabase(this.filename,(function(t){n(t)})):n(new Error("persistenceAdapter not configured"))},g.prototype.autosaveDirty=function(){for(var t=0;t<this.collections.length;t++)if(this.collections[t].dirty)return!0;return!1},g.prototype.autosaveClearFlags=function(){for(var t=0;t<this.collections.length;t++)this.collections[t].dirty=!1},g.prototype.autosaveEnable=function(t,e){this.autosave=!0;var n=5e3,r=this;void 0!==this.autosaveInterval&&null!==this.autosaveInterval&&(n=this.autosaveInterval),this.autosaveHandle=setInterval((function(){r.autosaveDirty()&&r.saveDatabase(e)}),n)},g.prototype.autosaveDisable=function(){void 0!==this.autosaveHandle&&null!==this.autosaveHandle&&(clearInterval(this.autosaveHandle),this.autosaveHandle=null)},O.prototype.reset=function(){return this.filteredrows.length>0&&(this.filteredrows=[]),this.filterInitialized=!1,this},O.prototype.toJSON=function(){var t=this.copy();return t.collection=null,t},O.prototype.limit=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new O(this.collection);return e.filteredrows=this.filteredrows.slice(0,t),e.filterInitialized=!0,e},O.prototype.offset=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new O(this.collection);return e.filteredrows=this.filteredrows.slice(t),e.filterInitialized=!0,e},O.prototype.copy=function(){var t=new O(this.collection);return this.filteredrows.length>0&&(t.filteredrows=this.filteredrows.slice()),t.filterInitialized=this.filterInitialized,t},O.prototype.branch=O.prototype.copy,O.prototype.transform=function(t,n){var r,o,i=this;if("string"==typeof t&&this.collection.transforms.hasOwnProperty(t)&&(t=this.collection.transforms[t]),"object"!=typeof t||!Array.isArray(t))throw new Error("Invalid transform");for(void 0!==n&&(t=e.resolveTransformParams(t,n)),r=0;r<t.length;r++)switch((o=t[r]).type){case"find":i.find(o.value);break;case"where":i.where(o.value);break;case"simplesort":i.simplesort(o.property,o.desc||o.options);break;case"compoundsort":i.compoundsort(o.value);break;case"sort":i.sort(o.value);break;case"limit":i=i.limit(o.value);break;case"offset":i=i.offset(o.value);break;case"map":i=i.map(o.value,o.dataOptions);break;case"eqJoin":i=i.eqJoin(o.joinData,o.leftJoinKey,o.rightJoinKey,o.mapFun,o.dataOptions);break;case"mapReduce":i=i.mapReduce(o.mapFunction,o.reduceFunction);break;case"update":i.update(o.value);break;case"remove":i.remove()}return i},O.prototype.sort=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e,n,r=(e=t,n=this.collection.data,function(t,r){return e(n[t],n[r])});return this.filteredrows.sort(r),this},O.prototype.simplesort=function(t,n){var r,o=10,i=this.collection.data.length,a=this.filteredrows.length,s=this.collection.binaryIndices.hasOwnProperty(t);if(void 0!==n&&!1!==n||(n={desc:!1}),!0===n&&(n={desc:!0}),0===a){if(this.filterInitialized)return this;if(this.collection.binaryIndices.hasOwnProperty(t))return this.collection.ensureIndex(t),this.filteredrows=this.collection.binaryIndices[t].values.slice(0),n.desc&&this.filteredrows.reverse(),this;this.filteredrows=this.collection.prepareFullDocIndex()}else if(!n.disableIndexIntersect&&s&&(r=i/a,n.useJavascriptSorting&&(o=6),r<=o||n.forceIndexIntersect)){var u,l=this.filteredrows,f={};for(u=0;u<a;u++)f[l[u]]=!0;var p=this.collection.binaryIndices[t].values;return this.filteredrows=p.filter((function(t){return f[t]})),n.desc&&this.filteredrows.reverse(),this}if(n.useJavascriptSorting)return this.sort((function(e,n){return e[t]===n[t]?0:e[t]>n[t]?1:e[t]<n[t]?-1:void 0}));var h,d,y,v,m,g,b=(h=t,d=n.desc,y=this.collection.data,function(t,n){return~h.indexOf(".")?(g=h.split("."),v=e.getIn(y[t],g,!0),m=e.getIn(y[n],g,!0)):(v=y[t][h],m=y[n][h]),c(v,m,d)});return this.filteredrows.sort(b),this},O.prototype.compoundsort=function(t){if(0===t.length)throw new Error("Invalid call to compoundsort, need at least one property");var n;if(1===t.length)return n=t[0],Array.isArray(n)?this.simplesort(n[0],n[1]):this.simplesort(n,!1);for(var r=0,o=t.length;r<o;r+=1)n=t[r],Array.isArray(n)||(t[r]=[n,!1]);this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var i,a,s=(i=t,a=this.collection.data,function(t,n){return function(t,n,r){for(var o,i,a,s,u,l=0,f=0,p=t.length;f<p;f++)if(~(i=(o=t[f])[0]).indexOf(".")?(u=i.split("."),a=e.getIn(n,u,!0),s=e.getIn(r,u,!0)):(a=n[i],s=r[i]),0!==(l=c(a,s,o[1])))return l;return 0}(i,a[t],a[n])});return this.filteredrows.sort(s),this},O.prototype.findOr=function(t){for(var e=null,n=0,r=0,o=[],i=[],a=0,s=(this.count(),0),u=t.length;s<u;s++)for(r=(e=this.branch().find(t[s]).filteredrows).length,n=0;n<r;n++)void 0===i[a=e[n]]&&(i[a]=!0,o.push(a));return this.filteredrows=o,this.filterInitialized=!0,this},O.prototype.$or=O.prototype.findOr,O.prototype.findAnd=function(t){for(var e=0,n=t.length;e<n;e++){if(0===this.count())return this;this.find(t[e])}return this},O.prototype.$and=O.prototype.findAnd,O.prototype.find=function(n,r){if(0===this.collection.data.length)return this.filteredrows=[],this.filterInitialized=!0,this;var o,i,a,s,u,c,f,p=n||"getAll",y=!1,v=[],m=[],g=null;if(r=r||!1,"object"==typeof p){for(o in p)(s={})[o]=p[o],m.push(s),t.call(p,o)&&(i=o,a=p[o]);if(m.length>1)return this.find({$and:m},r)}if(!i||"getAll"===p)return r&&(this.filterInitialized?this.filteredrows=this.filteredrows.slice(0,1):(this.filteredrows=this.collection.data.length>0?[0]:[],this.filterInitialized=!0)),this;if("$and"===i||"$or"===i)return this[i](a),r&&this.filteredrows.length>1&&(this.filteredrows=this.filteredrows.slice(0,1)),this;if(null===a||"object"!=typeof a||a instanceof Date)u="$eq",c=a;else{if("object"!=typeof a)throw new Error("Do not know what you want to do.");for(f in a)if(t.call(a,f)){u=f,c=a[f];break}}"$regex"!==u&&"object"!=typeof c||(c=function t(e,n){if("$regex"===e)Array.isArray(n)?n=new RegExp(n[0],n[1]):n instanceof RegExp||(n=new RegExp(n));else if("object"==typeof n)for(var r in n)"$regex"!==r&&"object"!=typeof n[r]||(n[r]=t(r,n[r]));return n}(u,c));var b=-1!==i.indexOf(".");!this.filterInitialized&&this.collection.binaryIndices[i]&&d[u]&&(!0!==this.collection.adaptiveBinaryIndices&&this.collection.ensureIndex(i),y=!0,g=this.collection.binaryIndices[i]);var _,w=h[u],x=this.collection.data,O=0,S=0,k=0;if(this.filterInitialized){if(S=(_=this.filteredrows).length,b){for(i=i.split("."),O=0;O<S;O++)if(l(x[k=_[O]],i,w,c)&&(v.push(k),r))return this.filteredrows=v,this}else for(O=0;O<S;O++)if(w(x[k=_[O]][i],c)&&(v.push(k),r))return this.filteredrows=v,this}else if(y){var T=this.collection.calculateRange(u,i,c);if("$in"!==u){for(O=T[0];O<=T[1];O++)if(!0!==d[u]){if(d[u](e.getIn(x[g.values[O]],i,b),c)&&(v.push(g.values[O]),r))return this.filteredrows=v,this.filterInitialized=!0,this}else if(v.push(g.values[O]),r)return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0,S=T.length;O<S;O++)if(v.push(g.values[T[O]]),r)return this.filteredrows=v,this.filterInitialized=!0,this}else if(S=x.length,b){for(i=i.split("."),O=0;O<S;O++)if(l(x[O],i,w,c)&&(v.push(O),r))return this.filteredrows=v,this.filterInitialized=!0,this}else for(O=0;O<S;O++)if(w(x[O][i],c)&&(v.push(O),r))return this.filteredrows=v,this.filterInitialized=!0,this;return this.filteredrows=v,this.filterInitialized=!0,this},O.prototype.where=function(t){var e,n=[];if("function"!=typeof t)throw new TypeError("Argument is not a stored view or a function");e=t;try{if(this.filterInitialized){for(var r=this.filteredrows.length;r--;)!0===e(this.collection.data[this.filteredrows[r]])&&n.push(this.filteredrows[r]);return this.filteredrows=n,this}for(var o=this.collection.data.length;o--;)!0===e(this.collection.data[o])&&n.push(o);return this.filteredrows=n,this.filterInitialized=!0,this}catch(t){throw t}},O.prototype.count=function(){return this.filterInitialized?this.filteredrows.length:this.collection.count()},O.prototype.data=function(t){var e,n,r,o,i=[],a=this.collection.data;if((t=t||{}).removeMeta&&!t.forceClones&&(t.forceClones=!0,t.forceCloneMethod=t.forceCloneMethod||"shallow"),this.collection.disableDeltaChangesApi||(t.forceClones=!0,t.forceCloneMethod="parse-stringify"),!this.filterInitialized){if(0===this.filteredrows.length){if(this.collection.cloneObjects||t.forceClones){for(n=a.length,o=t.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)e=y(a[r],o),t.removeMeta&&(delete e.$loki,delete e.meta),i.push(e);return i}return a.slice()}this.filterInitialized=!0}var s=this.filteredrows;if(n=s.length,this.collection.cloneObjects||t.forceClones)for(o=t.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)e=y(a[s[r]],o),t.removeMeta&&(delete e.$loki,delete e.meta),i.push(e);else for(r=0;r<n;r++)i.push(a[s[r]]);return i},O.prototype.update=function(t){if("function"!=typeof t)throw new TypeError("Argument is not a function");this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());for(var e,n=this.filteredrows.length,r=this.collection.data,o=0;o<n;o++)this.collection.cloneObjects||!this.collection.disableDeltaChangesApi?(t(e=y(r[this.filteredrows[o]],this.collection.cloneMethod)),this.collection.update(e)):(t(r[this.filteredrows[o]]),this.collection.update(r[this.filteredrows[o]]));return this},O.prototype.remove=function(){return this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex()),this.collection.removeBatchByPositions(this.filteredrows),this.filteredrows=[],this},O.prototype.mapReduce=function(t,e){try{return e(this.data().map(t))}catch(t){throw t}},O.prototype.eqJoin=function(t,e,n,r,o){var i,a,s,u,c=[],l=[],f="function"==typeof e,p="function"==typeof n,h={};if(a=(i=this.data(o)).length,t instanceof k)c=t.chain().data(o);else if(t instanceof O)c=t.data(o);else{if(!Array.isArray(t))throw new TypeError("joinData needs to be an array or result set");c=t}s=c.length;for(var d=0;d<s;d++)h[u=p?n(c[d]):c[d][n]]=c[d];r||(r=function(t,e){return{left:t,right:e}});for(var y=0;y<a;y++)u=f?e(i[y]):i[y][e],l.push(r(i[y],h[u]||{}));return this.collection=new k("joinData"),this.collection.insert(l),this.filteredrows=[],this.filterInitialized=!1,this},O.prototype.map=function(t,e){var n=this.data(e).map(t);return this.collection=new k("mappedData"),this.collection.insert(n),this.filteredrows=[],this.filterInitialized=!1,this},S.prototype=new m,S.prototype.rematerialize=function(t){var e,n,r;if(t=t||{},this.resultdata=[],this.resultsdirty=!0,this.resultset=new O(this.collection),(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple)&&(this.sortDirty=!0),t.hasOwnProperty("removeWhereFilters"))for(n=e=this.filterPipeline.length;n--;)"where"===this.filterPipeline[n].type&&(n!==this.filterPipeline.length-1&&(this.filterPipeline[n]=this.filterPipeline[this.filterPipeline.length-1]),this.filterPipeline.length--);var o=this.filterPipeline;for(this.filterPipeline=[],e=o.length,r=0;r<e;r++)this.applyFind(o[r].val);return this.data(),this.emit("rebuild",this),this},S.prototype.branchResultset=function(t,e){var n=this.resultset.branch();return void 0===t?n:n.transform(t,e)},S.prototype.toJSON=function(){var t=new S(this.collection,this.name,this.options);return t.resultset=this.resultset,t.resultdata=[],t.resultsdirty=!0,t.filterPipeline=this.filterPipeline,t.sortFunction=this.sortFunction,t.sortCriteria=this.sortCriteria,t.sortCriteriaSimple=this.sortCriteriaSimple||null,t.sortDirty=this.sortDirty,t.collection=null,t},S.prototype.removeFilters=function(t){t=t||{},this.rebuildPending=!1,this.resultset.reset(),this.resultdata=[],this.resultsdirty=!0,this.cachedresultset=null,this.filterPipeline=[],this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,!0===t.queueSortPhase&&this.queueSortPhase()},S.prototype.applySort=function(t){return this.sortFunction=t,this.sortCriteria=null,this.sortCriteriaSimple=null,this.queueSortPhase(),this},S.prototype.applySimpleSort=function(t,e){return this.sortCriteriaSimple={propname:t,options:e||!1},this.sortCriteria=null,this.sortFunction=null,this.queueSortPhase(),this},S.prototype.applySortCriteria=function(t){return this.sortCriteria=t,this.sortCriteriaSimple=null,this.sortFunction=null,this.queueSortPhase(),this},S.prototype.startTransaction=function(){return this.cachedresultset=this.resultset.copy(),this},S.prototype.commit=function(){return this.cachedresultset=null,this},S.prototype.rollback=function(){return this.resultset=this.cachedresultset,this.options.persistent&&(this.resultdata=this.resultset.data(),this.emit("rebuild",this)),this},S.prototype._indexOfFilterWithId=function(t){if("string"==typeof t||"number"==typeof t)for(var e=0,n=this.filterPipeline.length;e<n;e+=1)if(t===this.filterPipeline[e].uid)return e;return-1},S.prototype._addFilter=function(t){this.filterPipeline.push(t),this.resultset[t.type](t.val)},S.prototype.reapplyFilters=function(){this.resultset.reset(),this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0);var t=this.filterPipeline;this.filterPipeline=[];for(var e=0,n=t.length;e<n;e+=1)this._addFilter(t[e]);return this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this},S.prototype.applyFilter=function(t){var e=this._indexOfFilterWithId(t.uid);return e>=0?(this.filterPipeline[e]=t,this.reapplyFilters()):(this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0),this._addFilter(t),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this)},S.prototype.applyFind=function(t,e){return this.applyFilter({type:"find",val:t,uid:e}),this},S.prototype.applyWhere=function(t,e){return this.applyFilter({type:"where",val:t,uid:e}),this},S.prototype.removeFilter=function(t){var e=this._indexOfFilterWithId(t);if(e<0)throw new Error("Dynamic view does not contain a filter with ID: "+t);return this.filterPipeline.splice(e,1),this.reapplyFilters(),this},S.prototype.count=function(){return this.resultsdirty&&(this.resultdata=this.resultset.data()),this.resultset.count()},S.prototype.data=function(t){return(this.sortDirty||this.resultsdirty)&&this.performSortPhase({suppressRebuildEvent:!0}),this.options.persistent?this.resultdata:this.resultset.data(t)},S.prototype.queueRebuildEvent=function(){if(!this.rebuildPending){this.rebuildPending=!0;var t=this;setTimeout((function(){t.rebuildPending&&(t.rebuildPending=!1,t.emit("rebuild",t))}),this.options.minRebuildInterval)}},S.prototype.queueSortPhase=function(){if(!this.sortDirty){this.sortDirty=!0;var t=this;"active"===this.options.sortPriority?setTimeout((function(){t.performSortPhase()}),this.options.minRebuildInterval):this.queueRebuildEvent()}},S.prototype.performSortPhase=function(t){(this.sortDirty||this.resultsdirty)&&(t=t||{},this.sortDirty&&(this.sortFunction?this.resultset.sort(this.sortFunction):this.sortCriteria?this.resultset.compoundsort(this.sortCriteria):this.sortCriteriaSimple&&this.resultset.simplesort(this.sortCriteriaSimple.propname,this.sortCriteriaSimple.options),this.sortDirty=!1),this.options.persistent&&(this.resultdata=this.resultset.data(),this.resultsdirty=!1),t.suppressRebuildEvent||this.emit("rebuild",this))},S.prototype.evaluateDocument=function(t,e){if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var n,r=this.resultset.filteredrows,o=e?-1:r.indexOf(+t),i=r.length,a=new O(this.collection);a.filteredrows=[t],a.filterInitialized=!0;for(var s=0,u=this.filterPipeline.length;s<u;s++)a[(n=this.filterPipeline[s]).type](n.val);var c=0===a.filteredrows.length?-1:0;return-1!==o||-1!==c?-1===o&&-1!==c?(r.push(t),this.options.persistent&&this.resultdata.push(this.collection.data[t]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==o&&-1===c?(o<i-1?(r.splice(o,1),this.options.persistent&&this.resultdata.splice(o,1)):(r.length=i-1,this.options.persistent&&(this.resultdata.length=i-1)),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==o&&-1!==c?(this.options.persistent&&(this.resultdata[o]=this.collection.data[t]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):void 0:void 0},S.prototype.removeDocument=function(t){var e,n,r,o={},i={},a=[],s=this.resultset,u=this.resultset.filteredrows,c=u.length;if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());for(Array.isArray(t)||(t=[t]),r=t.length,n=0;n<r;n++)o[t[n]]=!0;for(e=0;e<c;e++)o[u[e]]&&(i[e]=!0);Object.keys(i).length>0&&(this.resultset.filteredrows=this.resultset.filteredrows.filter((function(t,e){return!i[e]})),this.options.persistent&&(this.resultdata=this.resultdata.filter((function(t,e){return!i[e]}))),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var l=function(t){return function(e){return e<s.filteredrows[t]}};for(c=s.filteredrows.length,e=0;e<c;e++)a=t.filter(l(e)),s.filteredrows[e]-=a.length},S.prototype.mapReduce=function(t,e){try{return e(this.data().map(t))}catch(t){throw t}},k.prototype=new m,k.prototype.createChange=function(t,e,n,r){this.changes.push({name:t,operation:e,obj:"U"!=e||this.disableDeltaChangesApi?JSON.parse(JSON.stringify(n)):this.getChangeDelta(n,r)})},k.prototype.insertMeta=function(t){var e,n;if(!this.disableMeta&&t)if(Array.isArray(t))for(e=t.length,n=0;n<e;n++)t[n].hasOwnProperty("meta")||(t[n].meta={}),t[n].meta.created=(new Date).getTime(),t[n].meta.revision=0;else t.meta||(t.meta={}),t.meta.created=(new Date).getTime(),t.meta.revision=0},k.prototype.updateMeta=function(t){!this.disableMeta&&t&&(t.meta.updated=(new Date).getTime(),t.meta.revision+=1)},k.prototype.createInsertChange=function(t){this.createChange(this.name,"I",t)},k.prototype.createUpdateChange=function(t,e){this.createChange(this.name,"U",t,e)},k.prototype.insertMetaWithChange=function(t){this.insertMeta(t),this.createInsertChange(t)},k.prototype.updateMetaWithChange=function(t,e){this.updateMeta(t),this.createUpdateChange(t,e)},k.prototype.lokiConsoleWrapper={log:function(){},warn:function(){},error:function(){}},k.prototype.addAutoUpdateObserver=function(t){this.autoupdate&&"function"==typeof Object.observe&&Object.observe(t,this.observerCallback,["add","update","delete","reconfigure","setPrototype"])},k.prototype.removeAutoUpdateObserver=function(t){this.autoupdate&&"function"==typeof Object.observe&&Object.unobserve(t,this.observerCallback)},k.prototype.addTransform=function(t,e){if(this.transforms.hasOwnProperty(t))throw new Error("a transform by that name already exists");this.transforms[t]=e},k.prototype.getTransform=function(t){return this.transforms[t]},k.prototype.setTransform=function(t,e){this.transforms[t]=e},k.prototype.removeTransform=function(t){delete this.transforms[t]},k.prototype.byExample=function(t){var e,n,r;for(e in r=[],t)t.hasOwnProperty(e)&&r.push(((n={})[e]=t[e],n));return{$and:r}},k.prototype.findObject=function(t){return this.findOne(this.byExample(t))},k.prototype.findObjects=function(t){return this.find(this.byExample(t))},k.prototype.ttlDaemonFuncGen=function(){var t=this,e=this.ttl.age;return function(){var n=Date.now();t.chain().where((function(t){var r=t.meta.updated||t.meta.created;return e<n-r})).remove()}},k.prototype.setTTL=function(t,e){t<0?clearInterval(this.ttl.daemon):(this.ttl.age=t,this.ttl.ttlInterval=e,this.ttl.daemon=setInterval(this.ttlDaemonFuncGen(),e))},k.prototype.prepareFullDocIndex=function(){for(var t=this.data.length,e=new Array(t),n=0;n<t;n+=1)e[n]=n;return e},k.prototype.configureOptions=function(t){(t=t||{}).hasOwnProperty("adaptiveBinaryIndices")&&(this.adaptiveBinaryIndices=t.adaptiveBinaryIndices,this.adaptiveBinaryIndices&&this.ensureAllIndexes())},k.prototype.ensureIndex=function(t,n){if(void 0===n&&(n=!1),null==t)throw new Error("Attempting to set index without an associated property");if((!this.binaryIndices[t]||n||this.binaryIndices[t].dirty)&&(!0!==this.adaptiveBinaryIndices||!this.binaryIndices.hasOwnProperty(t)||n)){var r={name:t,dirty:!0,values:this.prepareFullDocIndex()};this.binaryIndices[t]=r;var o,a,s,u,c,l=(o=t,a=this.data,function(t,n){if(~o.indexOf(".")?(c=o.split("."),s=e.getIn(a[t],c,!0),u=e.getIn(a[n],c,!0)):(s=a[t][o],u=a[n][o]),s!==u){if(i.lt(s,u,!1))return-1;if(i.gt(s,u,!1))return 1}return 0});r.values.sort(l),r.dirty=!1,this.dirty=!0}},k.prototype.checkAllIndexes=function(e){var n,r=this.binaryIndices,o=[];for(n in r)t.call(r,n)&&(this.checkIndex(n,e)||o.push(n));return o},k.prototype.checkIndex=function(t,n){(n=n||{}).randomSamplingFactor&&!1!==n.randomSampling&&(n.randomSampling=!0),n.randomSamplingFactor=n.randomSamplingFactor||.1,(n.randomSamplingFactor<0||n.randomSamplingFactor>1)&&(n.randomSamplingFactor=.1);var r,o,i,a,s,u=!0;if(!this.binaryIndices.hasOwnProperty(t))throw new Error("called checkIndex on property without an index: "+t);if(this.adaptiveBinaryIndices||this.ensureIndex(t),(a=(s=this.binaryIndices[t].values).length)!==this.data.length)return n.repair&&this.ensureIndex(t,!0),!1;if(0===a)return!0;var c=-1!==t.indexOf(".");if(1===a)u=0===s[0];else if(n.randomSampling){if(h.$lte(e.getIn(this.data[s[0]],t,c),e.getIn(this.data[s[1]],t,c))||(u=!1),h.$lte(e.getIn(this.data[s[a-2]],t,c),e.getIn(this.data[s[a-1]],t,c))||(u=!1),u)for(o=Math.floor((a-1)*n.randomSamplingFactor),r=0;r<o-1;r++)if(i=Math.floor(Math.random()*(a-1)),!h.$lte(e.getIn(this.data[s[i]],t,c),e.getIn(this.data[s[i+1]],t,c))){u=!1;break}}else for(r=0;r<a-1;r++)if(!h.$lte(e.getIn(this.data[s[r]],t,c),e.getIn(this.data[s[r+1]],t,c))){u=!1;break}return!u&&n.repair&&this.ensureIndex(t,!0),u},k.prototype.getBinaryIndexValues=function(t){var n,r=this.binaryIndices[t].values,o=[];for(n=0;n<r.length;n++)o.push(e.getIn(this.data[r[n]],t,!0));return o},k.prototype.ensureUniqueIndex=function(t){var e=this.constraints.unique[t];return e||-1==this.uniqueNames.indexOf(t)&&this.uniqueNames.push(t),this.constraints.unique[t]=e=new R(t),this.data.forEach((function(t){e.set(t)})),e},k.prototype.ensureAllIndexes=function(e){var n,r=this.binaryIndices;for(n in r)t.call(r,n)&&this.ensureIndex(n,e)},k.prototype.flagBinaryIndexesDirty=function(){var e,n=this.binaryIndices;for(e in n)t.call(n,e)&&(n[e].dirty=!0)},k.prototype.flagBinaryIndexDirty=function(t){this.binaryIndices[t]&&(this.binaryIndices[t].dirty=!0)},k.prototype.count=function(t){return t?this.chain().find(t).filteredrows.length:this.data.length},k.prototype.ensureId=function(){var t=this.data.length,e=0;for(this.idIndex=[];e<t;e+=1)this.idIndex.push(this.data[e].$loki)},k.prototype.ensureIdAsync=function(t){this.async((function(){this.ensureId()}),t)},k.prototype.addDynamicView=function(t,e){var n=new S(this,t,e);return this.DynamicViews.push(n),n},k.prototype.removeDynamicView=function(t){this.DynamicViews=this.DynamicViews.filter((function(e){return e.name!==t}))},k.prototype.getDynamicView=function(t){for(var e=0;e<this.DynamicViews.length;e++)if(this.DynamicViews[e].name===t)return this.DynamicViews[e];return null},k.prototype.findAndUpdate=function(t,e){"function"==typeof t?this.updateWhere(t,e):this.chain().find(t).update(e)},k.prototype.findAndRemove=function(t){this.chain().find(t).remove()},k.prototype.insert=function(t){if(!Array.isArray(t))return this.insertOne(t);var e,n=[];this.emit("pre-insert",t);for(var r=0,o=t.length;r<o;r++){if(!(e=this.insertOne(t[r],!0)))return;n.push(e)}return this.emit("insert",n),1===(n=this.cloneObjects?y(n,this.cloneMethod):n).length?n[0]:n},k.prototype.insertOne=function(t,e){var n,r=null;if("object"!=typeof t?r=new TypeError("Document needs to be an object"):null===t&&(r=new TypeError("Object cannot be null")),null!==r)throw this.emit("error",r),r;var o=this.cloneObjects?y(t,this.cloneMethod):t;if(this.disableMeta||void 0!==o.meta||(o.meta={revision:0,created:0}),e||this.emit("pre-insert",o),this.add(o))return this.disableChangesApi?this.insertMeta(o):this.insertMetaWithChange(o),n=this.cloneObjects?y(o,this.cloneMethod):o,e||this.emit("insert",n),this.addAutoUpdateObserver(n),n},k.prototype.clear=function(t){var e=this;t=t||{},this.data=[],this.idIndex=[],this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null,this.maxId=0,this.DynamicViews=[],this.dirty=!0,!0===t.removeIndices?(this.binaryIndices={},this.constraints={unique:{},exact:{}},this.uniqueNames=[]):(Object.keys(this.binaryIndices).forEach((function(t){e.binaryIndices[t].dirty=!1,e.binaryIndices[t].values=[]})),this.constraints={unique:{},exact:{}},this.uniqueNames.forEach((function(t){e.ensureUniqueIndex(t)})))},k.prototype.update=function(e){var n,r,o;if(Array.isArray(e)){o=e.length,(n=!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0)&&(this.adaptiveBinaryIndices=!1);try{for(r=0;r<o;r+=1)this.update(e[r])}finally{n&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}}else{if(!t.call(e,"$loki"))throw new Error("Trying to update unsynced document. Please save the document first by using insert() or addMany()");try{this.startTransaction();var i,a,s,u,c,l=this.get(e.$loki,!0),f=this;if(!l)throw new Error("Trying to update a document not in collection.");i=l[0],s=l[1],a=this.cloneObjects||!this.disableDeltaChangesApi?y(e,this.cloneMethod):e,this.emit("pre-update",e),Object.keys(this.constraints.unique).forEach((function(t){f.constraints.unique[t].update(i,a)})),this.data[s]=a,a!==e&&this.addAutoUpdateObserver(e);for(var p=0;p<this.DynamicViews.length;p++)this.DynamicViews[p].evaluateDocument(s,!1);if(this.adaptiveBinaryIndices){var h=this.binaryIndices;for(u in h)this.adaptiveBinaryIndexUpdate(s,u)}else this.flagBinaryIndexesDirty();return this.idIndex[s]=a.$loki,this.isIncremental&&this.dirtyIds.push(a.$loki),this.commit(),this.dirty=!0,this.disableChangesApi?this.updateMeta(a,null):this.updateMetaWithChange(a,i),c=this.cloneObjects?y(a,this.cloneMethod):a,this.emit("update",c,i),c}catch(t){throw this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),t}}},k.prototype.add=function(e){if("object"!=typeof e)throw new TypeError("Object being added needs to be an object");if(void 0!==e.$loki)throw new Error("Document is already in collection, please use update()");try{this.startTransaction(),this.maxId++,isNaN(this.maxId)&&(this.maxId=this.data[this.data.length-1].$loki+1),e.$loki=this.maxId,this.disableMeta||(e.meta.version=0);var n,r=this.constraints.unique;for(n in r)t.call(r,n)&&r[n].set(e);this.idIndex.push(e.$loki),this.isIncremental&&this.dirtyIds.push(e.$loki),this.data.push(e);for(var o=this.data.length-1,i=this.DynamicViews.length,a=0;a<i;a++)this.DynamicViews[a].evaluateDocument(o,!0);if(this.adaptiveBinaryIndices){var s=this.binaryIndices;for(n in s)this.adaptiveBinaryIndexInsert(o,n)}else this.flagBinaryIndexesDirty();return this.commit(),this.dirty=!0,this.cloneObjects?y(e,this.cloneMethod):e}catch(t){throw this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),t}},k.prototype.updateWhere=function(t,e){var n,r=this.where(t),o=0;try{for(;o<r.length;o++)n=e(r[o]),this.update(n)}catch(t){this.rollback(),this.lokiConsoleWrapper.error(t.message)}},k.prototype.removeWhere=function(t){var e;"function"==typeof t?(e=this.data.filter(t),this.remove(e)):this.chain().find(t).remove()},k.prototype.removeDataOnly=function(){this.remove(this.data.slice())},k.prototype.removeBatchByPositions=function(t){var e,n,r,o,i=t.length,a={},s=Object.keys(this.binaryIndices).length,u=Object.keys(this.constraints.unique).length,c=this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0,l=this;try{for(this.startTransaction(),r=0;r<i;r++)a[this.idIndex[t[r]]]=!0;if((e=this.DynamicViews.length)>0||s>0||u>0){if(e>0)for(n=0;n<e;n++)this.DynamicViews[n].removeDocument(t);if(this.adaptiveBinaryIndices&&!c){var f,p=this.binaryIndices;for(f in p)this.adaptiveBinaryIndexRemove(t,f)}else this.flagBinaryIndexesDirty();u&&Object.keys(this.constraints.unique).forEach((function(e){for(r=0;r<i;r++)null!==(o=l.data[t[r]])[e]&&void 0!==o[e]&&l.constraints.unique[e].remove(o[e])}))}if(!this.disableChangesApi||this.events.delete.length>1)for(r=0;r<i;r++)this.emit("delete",this.data[t[r]]);this.data=this.data.filter((function(t){return!a[t.$loki]})),this.idIndex=this.idIndex.filter((function(t){return!a[t]})),this.adaptiveBinaryIndices&&c&&(this.adaptiveBinaryIndices=!1,this.ensureAllIndexes(!0),this.adaptiveBinaryIndices=!0),this.commit(),this.dirty=!0}catch(t){return this.rollback(),c&&(this.adaptiveBinaryIndices=!0),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),null}},k.prototype.removeBatch=function(t){var e,n=t.length,r=this.data.length,o={},i=[];for(e=0;e<r;e++)o[this.data[e].$loki]=e;for(e=0;e<n;e++)"object"==typeof t[e]?i.push(o[t[e].$loki]):i.push(o[t[e]]);this.removeBatchByPositions(i)},k.prototype.remove=function(e){if("number"==typeof e&&(e=this.get(e)),"object"!=typeof e)throw new Error("Parameter is not an object");if(Array.isArray(e))this.removeBatch(e);else{if(!t.call(e,"$loki"))throw new Error("Object is not a document stored in the collection");try{this.startTransaction();var n=this.get(e.$loki,!0),r=n[1],o=this;Object.keys(this.constraints.unique).forEach((function(t){null!==e[t]&&void 0!==e[t]&&o.constraints.unique[t].remove(e[t])}));for(var i=0;i<this.DynamicViews.length;i++)this.DynamicViews[i].removeDocument(r);if(this.adaptiveBinaryIndices){var a,s=this.binaryIndices;for(a in s)this.adaptiveBinaryIndexRemove(r,a)}else this.flagBinaryIndexesDirty();return this.data.splice(r,1),this.removeAutoUpdateObserver(e),this.idIndex.splice(r,1),this.isIncremental&&this.dirtyIds.push(e.$loki),this.commit(),this.dirty=!0,this.emit("delete",n[0]),delete e.$loki,delete e.meta,e}catch(t){return this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),null}}},k.prototype.get=function(t,e){var n=e||!1,r=this.idIndex,o=r.length-1,i=0,a=i+o>>1;if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))throw new TypeError("Passed id is not an integer");for(;r[i]<r[o];)r[a=i+o>>1]<t?i=a+1:o=a;return o===i&&r[i]===t?n?[this.data[i],i]:this.data[i]:null},k.prototype.getBinaryIndexPosition=function(t,n){var r=e.getIn(this.data[t],n,!0),o=this.binaryIndices[n].values,i=this.calculateRange("$eq",n,r);if(0===i[0]&&-1===i[1])return null;for(var a=i[0],s=i[1],u=a;u<=s;u++)if(o[u]===t)return u;return null},k.prototype.adaptiveBinaryIndexInsert=function(t,n){var r=-1!==n.indexOf("."),o=this.binaryIndices[n].values,i=e.getIn(this.data[t],n,r);!0===this.serializableIndices&&i instanceof Date&&(this.data[t][n]=i.getTime(),i=e.getIn(this.data[t],n));var a=0===o.length?0:this.calculateRangeStart(n,i,!0,r);this.binaryIndices[n].values.splice(a,0,t)},k.prototype.adaptiveBinaryIndexUpdate=function(t,e){var n,r=this.binaryIndices[e].values,o=r.length;for(n=0;n<o&&r[n]!==t;n++);this.binaryIndices[e].values.splice(n,1),this.adaptiveBinaryIndexInsert(t,e)},k.prototype.adaptiveBinaryIndexRemove=function(t,e,n){var r,o,i,a,s,u,c,l=this.binaryIndices[e],f={};if(Array.isArray(t)){if(1!==(a=t.length)){for(i=0;i<a;i++)f[t[i]]=!0;if(l.values=l.values.filter((function(t){return!f[t]})),!0===n)return;var p=t.slice();for(p.sort((function(t,e){return t-e})),r=l.values.length,o=0;o<r;o++){for(s=l.values[o],u=0,i=0;i<a&&s>p[i];i++)u++;l.values[o]-=u}return}t=t[0]}if(null===(c=this.getBinaryIndexPosition(t,e)))return null;if(l.values.splice(c,1),!0!==n)for(r=l.values.length,o=0;o<r;o++)l.values[o]>t&&l.values[o]--},k.prototype.calculateRangeStart=function(t,n,r,o){var a=this.data,s=this.binaryIndices[t].values,u=0,c=s.length-1,l=0;if(0===s.length)return-1;for(e.getIn(a[s[u]],t,o),e.getIn(a[s[c]],t,o);u<c;)l=u+c>>1,i.lt(e.getIn(a[s[l]],t,o),n,!1)?u=l+1:c=l;var f=u;return i.aeq(n,e.getIn(a[s[f]],t,o))?f:i.lt(n,e.getIn(a[s[f]],t,o),!1)?r?f:f-1:r?f+1:f},k.prototype.calculateRangeEnd=function(t,n,r){var o=this.data,a=this.binaryIndices[t].values,s=0,u=a.length-1,c=0;if(0===a.length)return-1;for(e.getIn(o[a[s]],t,r),e.getIn(o[a[u]],t,r);s<u;)c=s+u>>1,i.lt(n,e.getIn(o[a[c]],t,r),!1)?u=c:s=c+1;var l=u;return i.aeq(n,e.getIn(o[a[l]],t,r))?l:i.gt(n,e.getIn(o[a[l]],t,r),!1)?l+1:i.aeq(n,e.getIn(o[a[l-1]],t,r))?l-1:l},k.prototype.calculateRange=function(t,n,r){var o,a,s,u=this.data,c=this.binaryIndices[n].values,l=c.length-1;if(0===u.length)return[0,-1];var f=-1!==n.indexOf("."),p=e.getIn(u[c[0]],n,f),h=e.getIn(u[c[l]],n,f);switch(t){case"$eq":case"$aeq":case"$dteq":if(i.lt(r,p,!1)||i.gt(r,h,!1))return[0,-1];break;case"$gt":if(i.gt(r,h,!0))return[0,-1];if(i.gt(p,r,!1))return[0,l];break;case"$gte":if(i.gt(r,h,!1))return[0,-1];if(i.gt(p,r,!0))return[0,l];break;case"$lt":if(i.lt(r,p,!0))return[0,-1];if(i.lt(h,r,!1))return[0,l];break;case"$lte":if(i.lt(r,p,!1))return[0,-1];if(i.lt(h,r,!0))return[0,l];break;case"$between":return i.gt(r[0],h,!1)||i.lt(r[1],p,!1)?[0,-1]:((o=this.calculateRangeStart(n,r[0],!1,f))<0&&o++,(s=this.calculateRangeEnd(n,r[1],f))>l&&s--,i.gt(e.getIn(u[c[o]],n,f),r[0],!0)||o++,i.lt(e.getIn(u[c[s]],n,f),r[1],!0)||s--,s<o?[0,-1]:[o,s]);case"$in":for(var d=[],y=[],v=0,m=r.length;v<m;v++)for(var g=this.calculateRange("$eq",n,r[v]),b=g[0];b<=g[1];b++)void 0===d[b]&&(d[b]=!0,y.push(b));return y}switch(t){case"$eq":case"$aeq":case"$dteq":case"$gte":case"$lt":o=this.calculateRangeStart(n,r,!1,f),a=e.getIn(u[c[o]],n,f)}switch(t){case"$eq":case"$aeq":case"$dteq":case"$lte":case"$gt":s=this.calculateRangeEnd(n,r,f),e.getIn(u[c[s]],n,f)}switch(t){case"$eq":case"$aeq":case"$dteq":return i.aeq(a,r)?[o,s]:[0,-1];case"$gt":return i.aeq(e.getIn(u[c[s]],n,f),r)?[s+1,l]:[s,l];case"$gte":return i.aeq(e.getIn(u[c[o]],n,f),r)?[o,l]:[o+1,l];case"$lt":return i.aeq(e.getIn(u[c[o]],n,f),r)?[0,o-1]:[0,o];case"$lte":return i.aeq(e.getIn(u[c[s]],n,f),r)?[0,s]:[0,s-1];default:return[0,u.length-1]}},k.prototype.by=function(t,e){var n;if(void 0===e)return n=this,function(e){return n.by(t,e)};var r=this.constraints.unique[t].get(e);return this.cloneObjects?y(r,this.cloneMethod):r},k.prototype.findOne=function(t){t=t||{};var e=this.chain().find(t,!0).data();return Array.isArray(e)&&0===e.length?null:this.cloneObjects?y(e[0],this.cloneMethod):e[0]},k.prototype.chain=function(t,e){var n=new O(this);return void 0===t?n:n.transform(t,e)},k.prototype.find=function(t){return this.chain().find(t).data()},k.prototype.findOneUnindexed=function(t,n){for(var r=this.data.length;r--;)if(e.getIn(this.data[r],t,!0)===n)return this.data[r];return null},k.prototype.startTransaction=function(){if(this.transactional){this.cachedData=y(this.data,this.cloneMethod),this.cachedIndex=this.idIndex,this.cachedBinaryIndex=this.binaryIndices,this.cachedDirtyIds=this.dirtyIds;for(var t=0;t<this.DynamicViews.length;t++)this.DynamicViews[t].startTransaction()}},k.prototype.commit=function(){if(this.transactional){this.cachedData=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedDirtyIds=null;for(var t=0;t<this.DynamicViews.length;t++)this.DynamicViews[t].commit()}},k.prototype.rollback=function(){if(this.transactional){null!==this.cachedData&&null!==this.cachedIndex&&(this.data=this.cachedData,this.idIndex=this.cachedIndex,this.binaryIndices=this.cachedBinaryIndex,this.dirtyIds=this.cachedDirtyIds);for(var t=0;t<this.DynamicViews.length;t++)this.DynamicViews[t].rollback()}},k.prototype.async=function(t,e){setTimeout((function(){if("function"!=typeof t)throw new TypeError("Argument passed for async execution is not a function");t(),e()}),0)},k.prototype.where=function(t){return this.chain().where(t).data()},k.prototype.mapReduce=function(t,e){try{return e(this.data.map(t))}catch(t){throw t}},k.prototype.eqJoin=function(t,e,n,r,o){return new O(this).eqJoin(t,e,n,r,o)},k.prototype.stages={},k.prototype.getStage=function(t){return this.stages[t]||(this.stages[t]={}),this.stages[t]},k.prototype.commitLog=[],k.prototype.stage=function(t,e){var n=JSON.parse(JSON.stringify(e));return this.getStage(t)[e.$loki]=n,n},k.prototype.commitStage=function(t,e){var n,r=this.getStage(t),o=(new Date).getTime();for(n in r)this.update(r[n]),this.commitLog.push({timestamp:o,message:e,data:JSON.parse(JSON.stringify(r[n]))});this.stages[t]={}},k.prototype.no_op=function(){},k.prototype.extract=function(t){for(var e=0,n=this.data.length,r=T(t),o=[];e<n;e+=1)o.push(P(this.data[e],t,r));return o},k.prototype.max=function(t){return Math.max.apply(null,this.extract(t))},k.prototype.min=function(t){return Math.min.apply(null,this.extract(t))},k.prototype.maxRecord=function(t){for(var e,n=0,r=this.data.length,o=T(t),i={index:0,value:void 0};n<r;n+=1)void 0!==e?e<P(this.data[n],t,o)&&(e=P(this.data[n],t,o),i.index=this.data[n].$loki):(e=P(this.data[n],t,o),i.index=this.data[n].$loki);return i.value=e,i},k.prototype.minRecord=function(t){for(var e,n=0,r=this.data.length,o=T(t),i={index:0,value:void 0};n<r;n+=1)void 0!==e?e>P(this.data[n],t,o)&&(e=P(this.data[n],t,o),i.index=this.data[n].$loki):(e=P(this.data[n],t,o),i.index=this.data[n].$loki);return i.value=e,i},k.prototype.extractNumerical=function(t){return this.extract(t).map(C).filter(Number).filter((function(t){return!isNaN(t)}))},k.prototype.avg=function(t){return j(this.extractNumerical(t))},k.prototype.stdDev=function(t){return e=this.extractNumerical(t),n=j(e),r=j(e.map((function(t){var e=t-n;return e*e}))),Math.sqrt(r);var e,n,r},k.prototype.mode=function(t){var e,n,r,o={},i=this.extract(t);for(n in i.forEach((function(t){o[t]?o[t]+=1:o[t]=1})),o)e?e<o[n]&&(r=n):(r=n,e=o[n]);return r},k.prototype.median=function(t){var e=this.extractNumerical(t);e.sort(A);var n=Math.floor(e.length/2);return e.length%2?e[n]:(e[n-1]+e[n])/2},I.prototype={keys:[],values:[],sort:function(t,e){return t<e?-1:t>e?1:0},setSort:function(t){this.bs=new M(t)},bs:function(){return new M(this.sort)},set:function(t,e){var n=this.bs(this.keys,t);n.found?this.values[n.index]=e:(this.keys.splice(n.index,0,t),this.values.splice(n.index,0,e))},get:function(t){return this.values[D(this.keys,t,this.sort).index]}},R.prototype.keyMap={},R.prototype.lokiMap={},R.prototype.set=function(t){var e=t[this.field];if(null!=e){if(this.keyMap[e])throw new Error("Duplicate key for property "+this.field+": "+e);this.keyMap[e]=t,this.lokiMap[t.$loki]=e}},R.prototype.get=function(t){return this.keyMap[t]},R.prototype.byId=function(t){return this.keyMap[this.lokiMap[t]]},R.prototype.update=function(t,e){if(this.lokiMap[t.$loki]!==e[this.field]){var n=this.lokiMap[t.$loki];this.set(e),this.keyMap[n]=void 0}else this.keyMap[t[this.field]]=e},R.prototype.remove=function(t){var e=this.keyMap[t];if(null==e)throw new Error("Key is not in unique index: "+this.field);this.keyMap[t]=void 0,this.lokiMap[e.$loki]=void 0},R.prototype.clear=function(){this.keyMap={},this.lokiMap={}},N.prototype={set:function(t,e){this.index[t]?this.index[t].push(e):this.index[t]=[e]},remove:function(t,e){var n=this.index[t];for(var r in n)n[r]==e&&n.splice(r,1);n.length<1&&(this.index[t]=void 0)},get:function(t){return this.index[t]},clear:function(t){this.index={}}},g.LokiOps=h,g.Collection=k,g.KeyValueStore=I,g.LokiMemoryAdapter=b,g.LokiPartitioningAdapter=_,g.LokiLocalStorageAdapter=x,g.LokiFsAdapter=w,g.persistenceAdapters={fs:w,localStorage:x},g.aeq=a,g.lt=s,g.gt=u,g.Comparators=i,g}()})?i.apply(e,a):i)||(t.exports=s)}).call(this,n(159),n(206))},,function(t,e,n){t.exports=!n(20)&&!n(10)((function(){return 7!=Object.defineProperty(n(130)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(9),o=n(18),i=n(67),a=n(131),s=n(21).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(29),o=n(31),i=n(111)(!1),a=n(132)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(21),o=n(11),i=n(68);t.exports=n(20)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(31),o=n(71).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},function(t,e,n){"use strict";var r=n(20),o=n(68),i=n(112),a=n(104),s=n(24),u=n(103),c=Object.assign;t.exports=!c||n(10)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=s(t),c=arguments.length,l=1,f=i.f,p=a.f;c>l;)for(var h,d=u(arguments[l++]),y=f?o(d).concat(f(d)):o(d),v=y.length,m=0;v>m;)h=y[m++],r&&!p.call(d,h)||(n[h]=d[h]);return n}:c},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(41),o=n(12),i=n(180),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(9).parseInt,o=n(85).trim,i=n(136),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(9).parseFloat,o=n(85).trim;t.exports=1/r(n(136)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(51);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(12),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var r=n(70),o=n(65),i=n(84),a={};n(30)(a,n(15)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(11);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(914);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(41),o=n(24),i=n(103),a=n(17);t.exports=function(t,e,n,s,u){r(e);var c=o(t),l=i(c),f=a(c.length),p=u?f-1:0,h=u?-1:1;if(n<2)for(;;){if(p in l){s=l[p],p+=h;break}if(p+=h,u?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;u?p>=0:f>p;p+=h)p in l&&(s=e(s,l[p],p,c));return s}},function(t,e,n){"use strict";var r=n(24),o=n(69),i=n(17);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),f=1;for(u<s&&s<u+l&&(f=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(151);n(1)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(20)&&"g"!=/./g.flags&&n(21).f(RegExp.prototype,"flags",{configurable:!0,get:n(115)})},function(t,e,n){"use strict";var r,o,i,a,s=n(67),u=n(9),c=n(40),l=n(105),f=n(1),p=n(12),h=n(41),d=n(88),y=n(118),v=n(106),m=n(153).set,g=n(934)(),b=n(195),_=n(935),w=n(119),x=n(196),O=u.TypeError,S=u.process,k=S&&S.versions,T=k&&k.v8||"",C=u.Promise,E="process"==l(S),A=function(){},j=o=b.f,P=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(15)("species")]=function(t){t(A,A)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof e&&0!==T.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),D=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},M=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2==t._h&&N(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?c(O("Promise-chain cycle")):(i=D(n))?i.call(n,u,c):u(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&I(t)}))}},I=function(t){m.call(u,(function(){var e,n,r,o=t._v,i=R(t);if(i&&(e=_((function(){E?S.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=E||R(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){m.call(u,(function(){var e;E?S.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},F=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),M(e,!0))},q=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=D(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,c(q,r,1),c(F,r,1))}catch(t){F.call(r,t)}})):(n._v=t,n._s=1,M(n,!1))}catch(t){F.call({_w:n,_d:!1},t)}}};P||(C=function(t){d(this,C,"Promise","_h"),h(t),r.call(this);try{t(c(q,this,1),c(F,this,1))}catch(t){F.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(89)(C.prototype,{then:function(t,e){var n=j(v(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=E?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(q,t,1),this.reject=c(F,t,1)},b.f=j=function(t){return t===C||t===a?new i(t):o(t)}),f(f.G+f.W+f.F*!P,{Promise:C}),n(84)(C,"Promise"),n(87)("Promise"),a=n(18).Promise,f(f.S+f.F*!P,"Promise",{reject:function(t){var e=j(this);return(0,e.reject)(t),e.promise}}),f(f.S+f.F*(s||!P),"Promise",{resolve:function(t){return x(s&&this===a?C:this,t)}}),f(f.S+f.F*!(P&&n(114)((function(t){C.all(t).catch(A)}))),"Promise",{all:function(t){var e=this,n=j(e),r=n.resolve,o=n.reject,i=_((function(){var n=[],i=0,a=1;y(t,!1,(function(t){var s=i++,u=!1;n.push(void 0),a++,e.resolve(t).then((function(t){u||(u=!0,n[s]=t,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=j(e),r=n.reject,o=_((function(){y(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e,n){"use strict";var r=n(41);function o(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){var r=n(11),o=n(12),i=n(195);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(21).f,o=n(70),i=n(89),a=n(40),s=n(88),u=n(118),c=n(142),l=n(191),f=n(87),p=n(20),h=n(57).fastKey,d=n(74),y=p?"_s":"size",v=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t((function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[y]=0,null!=r&&u(r,n,t[c],t)}));return i(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var n=d(this,e),r=v(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[y]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(d(this,e),t)}}),p&&r(l.prototype,"size",{get:function(){return d(this,e)[y]}}),l},def:function(t,e,n){var r,o,i=v(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[y]++,"F"!==o&&(t._i[o]=i)),t},getEntry:v,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=d(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))}),n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){"use strict";var r=n(89),o=n(57).getWeak,i=n(11),a=n(12),s=n(88),u=n(118),c=n(45),l=n(29),f=n(74),p=c(5),h=c(6),d=0,y=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},m=function(t,e){return p(t.a,(function(t){return t[0]===e}))};v.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t((function(t,r){s(t,c,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=r&&u(r,n,t[i],t)}));return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?y(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?y(f(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?y(t).set(e,n):r[t._i]=n,t},ufstore:y}},function(t,e,n){var r=n(42),o=n(17);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(71),o=n(112),i=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(17),o=n(138),i=n(52);t.exports=function(t,e,n,a){var s=String(i(t)),u=s.length,c=void 0===n?" ":String(n),l=r(e);if(l<=u||""==c)return s;var f=l-u,p=o.call(c,Math.ceil(f/c.length));return p.length>f&&(p=p.slice(0,f)),a?p+s:s+p}},function(t,e,n){var r=n(20),o=n(68),i=n(31),a=n(104).f;t.exports=function(t){return function(e){for(var n,s=i(e),u=o(s),c=u.length,l=0,f=[];c>l;)n=u[l++],r&&!a.call(s,n)||f.push(t?[n,s[n]]:s[n]);return f}}},function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new x(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),i}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var c={};function l(){}function f(){}function p(){}var h={};h[o]=function(){return this};var d=Object.getPrototypeOf,y=d&&d(d(O([])));y&&y!==e&&n.call(y,o)&&(h=y);var v=p.prototype=l.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t){var e;this._invoke=function(r,o){function i(){return new Promise((function(e,i){!function e(r,o,i,a){var s=u(t[r],t,o);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(l).then((function(t){c.value=t,i(c)}),(function(t){return e("throw",t,i,a)}))}a(s.arg)}(r,o,e,i)}))}return e=e?e.then(i,i):i()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,c;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=v.constructor=p,p.constructor=f,p[a]=f.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o){var i=new g(s(e,n,r,o));return t.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},m(v),v[a]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,c):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var t=s(p);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new d(t,e)),1!==c.length||l||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438),n(439),n(440),n(441),n(442),n(443),n(444),n(445),n(446),n(447),n(448),n(449),n(450),n(451),n(452),n(453),n(454),n(455),n(456),n(457),n(458),n(459),n(460),n(461),n(462),n(463),n(464),n(465),n(466),n(467),n(468),n(469),n(470),n(471),n(472),n(473),n(474),n(475),n(476),n(477),n(478),n(479),n(480),n(481),n(482),n(483),n(484),n(485),n(486),n(487),n(488),n(489),n(490),n(491),n(492),n(493),n(494),n(495),n(496),n(497),n(498),n(499),n(500),n(501),n(502),n(503),n(504),n(505),n(506),n(507),n(508),n(509),n(510),n(511),n(512),n(513),n(514),n(515),n(516),n(517),n(518),n(519),n(520),n(521),n(522),n(523),n(524),n(525),n(526),n(527),n(528),n(529),n(530),n(531),n(532),n(533),n(534),n(535),n(536),n(537),n(538),n(539),n(540),n(541),n(542),n(543),n(544),n(545),n(546),n(547),n(548),n(549),n(550),n(551),n(552),n(553),n(554),n(555),n(556),n(557),n(558),n(559),n(560),n(561),n(562),n(563),n(564),n(565),n(566),n(567),n(568),n(569),n(570),n(571),n(572),n(573),n(574),n(575),n(576),n(577),n(578),n(579),n(580),n(581),n(582),n(583),n(584),n(585),n(586),n(587),n(588),n(589),n(590),n(591),n(592),n(593),n(594),n(595),n(596),n(597),n(598),n(599),n(600),n(601),n(602),n(603),n(604),n(605),n(606),n(607),n(608),n(609),n(610),n(611),n(612),n(613),n(614),n(615),n(616),n(617),n(618),n(619),n(620),n(621),n(622),n(623),n(624),n(625),n(626),n(627),n(628),n(629),n(630),n(631),n(632),n(633),n(634),n(635),n(636),n(637),n(638),n(639),n(640),n(641),n(642),n(643),n(644),n(645),n(646),n(647),n(648),n(649),n(650),n(651),n(652),n(653),n(654),n(655),n(656),n(657)},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(158),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=h(n);o&&o!==d&&t(e,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(e),y=u(n),v=0;v<a.length;++v){var m=a[v];if(!(i[m]||r&&r[m]||y&&y[m]||s&&s[m])){var g=p(n,m);try{c(e,m,g)}catch(t){}}}}return e}},function(t,e,n){"use strict";t.exports=function(t){var e=0;return function(n){return t&&Array.isArray(t)&&t.length?(t.forEach((function(t){return n=function t(n,r){if(!n.fn||"function"!=typeof n.fn)return r;if(!(n.regex&&n.regex instanceof RegExp))return r;if("string"==typeof r){for(var o=n.regex,i=null,a=[];null!==(i=o.exec(r));){var s=i.index,u=i[0];a.push(r.substring(0,s)),a.push(n.fn(++e,i)),r=r.substring(s+u.length,r.length+1),o.lastIndex=0}return a.push(r),a}return Array.isArray(r)?r.map((function(e){return t(n,e)})):r}(t,n)})),n):n}}},function(t,e,n){"use strict";(function(e){var n="__global_unique_id__";t.exports=function(){return e[n]=(e[n]||0)+1}}).call(this,n(159))},function(t,e,n){"use strict";var r=n(158),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var o=h(n);o&&o!==d&&t(e,o,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(e),y=u(n),v=0;v<a.length;++v){var m=a[v];if(!(i[m]||r&&r[m]||y&&y[m]||s&&s[m])){var g=p(n,m);try{c(e,m,g)}catch(t){}}}return e}return e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n,r)=>{const o=[];for(let t=0;t<r.numberOfInputs;t+=1)o.push(new Set);t.set(e,{activeInputs:o,outputs:new Set,passiveInputs:new WeakMap,renderer:n})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n)=>{t.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:n})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},o=(t,e,n,o,i,a)=>class extends t{constructor(t,n=r){const s=i(t),u={...r,...n},c=o(s,u);super(t,!1,c,a(s)?e():null),this._nativeAnalyserNode=c}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(t){this._nativeAnalyserNode.fftSize=t}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(t){const e=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=t,!(t>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=e,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(t){const e=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=t,!(this._nativeAnalyserNode.maxDecibels>t))throw this._nativeAnalyserNode.minDecibels=e,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(t){this._nativeAnalyserNode.smoothingTimeConstant=t}getByteFrequencyData(t){this._nativeAnalyserNode.getByteFrequencyData(t)}getByteTimeDomainData(t){this._nativeAnalyserNode.getByteTimeDomainData(t)}getFloatFrequencyData(t){this._nativeAnalyserNode.getFloatFrequencyData(t)}getFloatTimeDomainData(t){this._nativeAnalyserNode.getFloatTimeDomainData(t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n)=>()=>{const o=new WeakMap;return{render(i,a,s){const u=o.get(a);return void 0!==u?Promise.resolve(u):(async(i,a,s)=>{let u=e(i);if(!Object(r.a)(u,a)){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,fftSize:u.fftSize,maxDecibels:u.maxDecibels,minDecibels:u.minDecibels,smoothingTimeConstant:u.smoothingTimeConstant};u=t(a,e)}return o.set(a,u),await n(i,a,u,s),u})(i,a,s)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(95),o=n(90);const i={numberOfChannels:1},a=(t,e,n,a,s,u,c,l)=>{let f=null;return class p{constructor(p){if(null===s)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:y}={...i,...p};null===f&&(f=new s(1,1,44100));const v=null!==a&&e(u,u)?new a({length:h,numberOfChannels:d,sampleRate:y}):f.createBuffer(d,h,y);if(0===v.numberOfChannels)throw n();return"function"!=typeof v.copyFromChannel?(c(v),Object(o.a)(v)):e(r.a,()=>Object(r.a)(v))||l(v),t.add(v),v}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===p.prototype||t.has(e)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(5),o=n(46),i=n(59);const a={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},s=(t,e,n,s,u,c,l,f)=>class extends t{constructor(t,o=a){const i=c(t),s={...a,...o},f=u(i,s),p=l(i),h=p?e():null;super(t,!1,f,h),this._audioBufferSourceNodeRenderer=h,this._isBufferNullified=!1,this._isBufferSet=null!==o.buffer&&void 0!==o.buffer,this._nativeAudioBufferSourceNode=f,this._onended=null,this._playbackRate=n(this,p,f.playbackRate,r.b,r.a)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(t){try{this._nativeAudioBufferSourceNode.buffer=t}catch(e){if(null!==t||17!==e.code)throw e;if(null!==this._nativeAudioBufferSourceNode.buffer){const t=this._nativeAudioBufferSourceNode.buffer,e=t.numberOfChannels;for(let n=0;n<e;n+=1)t.getChannelData(n).fill(0);this._isBufferNullified=!0}}if(null!==t){if(this._isBufferSet)throw s();this._isBufferSet=!0}}get onended(){return this._onended}set onended(t){const e="function"==typeof t?f(this,t):null;this._nativeAudioBufferSourceNode.onended=e;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===e?t:n}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(t){this._nativeAudioBufferSourceNode.loop=t}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(t){this._nativeAudioBufferSourceNode.loopEnd=t}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(t){this._nativeAudioBufferSourceNode.loopStart=t}get playbackRate(){return this._playbackRate}start(t=0,e=0,n){if(this._nativeAudioBufferSourceNode.start(t,e,n),null!==this._audioBufferSourceNodeRenderer)this._audioBufferSourceNodeRenderer.start=void 0===n?[t,e]:[t,e,n];else{Object(o.a)(this);const t=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",t),setTimeout(()=>Object(i.a)(this),1e3)};this._nativeAudioBufferSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeAudioBufferSourceNode.stop(t),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;let s=null,u=null;return{set start(t){s=t},set stop(t){u=t},render(c,l,f){const p=a.get(l);return void 0!==p?Promise.resolve(p):(async(c,l,f)=>{let p=n(c);const h=Object(r.a)(p,l);if(!h){const t={buffer:p.buffer,channelCount:p.channelCount,channelCountMode:p.channelCountMode,channelInterpretation:p.channelInterpretation,loop:p.loop,loopEnd:p.loopEnd,loopStart:p.loopStart,playbackRate:p.playbackRate.value};p=e(l,t),null!==s&&p.start(...s),null!==u&&p.stop(u)}return a.set(l,p),h?await t(l,c.playbackRate,p.playbackRate,f):await o(l,c.playbackRate,p.playbackRate,f),await i(c,l,p,f),p})(c,l,f)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(123);const o=(t,e,n,o,i,a,s,u)=>class extends t{constructor(t={}){if(null===u)throw new Error("Missing the native AudioContext constructor.");const e=new u(t);if(null===e)throw o();if(!Object(r.a)(t.latencyHint))throw new TypeError(`The provided value '${t.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==t.sampleRate&&e.sampleRate!==t.sampleRate)throw n();super(e,2);const{latencyHint:i}=t,{sampleRate:a}=e;if(this._baseLatency="number"==typeof e.baseLatency?e.baseLatency:"balanced"===i?512/a:"interactive"===i||void 0===i?256/a:"playback"===i?1024/a:128*Math.max(2,Math.min(128,Math.round(i*a/128)))/a,this._nativeAudioContext=e,this._state=null,"running"===e.state){this._state="suspended";const t=()=>{"suspended"===this._state&&(this._state=null),e.removeEventListener("statechange",t)};e.addEventListener("statechange",t)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then(()=>{throw e()}):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close())}createMediaElementSource(t){return new i(this,{mediaElement:t})}createMediaStreamSource(t){return new a(this,{mediaStream:t})}createMediaStreamTrackSource(t){return new s(this,{mediaStreamTrack:t})}resume(){return"suspended"===this._state?new Promise((t,e)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?t():this.resume().then(t,e)};this._nativeAudioContext.addEventListener("statechange",n)}):this._nativeAudioContext.resume().catch(t=>{if(void 0===t||15===t.code)throw e();throw t})}suspend(){return this._nativeAudioContext.suspend().catch(t=>{if(void 0===t)throw e();throw t})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o,i,a,s)=>class extends t{constructor(t,n){const r=i(t),u=a(r),c=o(r,n,u);super(t,!1,c,u?e(s):null),this._isNodeOfNativeOfflineAudioContext=u,this._nativeAudioDestinationNode=c}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(t){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(t>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=t}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(t){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=t}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{let e=null;return{render:(n,r,o)=>(null===e&&(e=(async(e,n,r)=>{const o=n.destination;return await t(e,n,o,r),o})(n,r,o)),e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(5);const o=(t,e,n,o,i)=>(a,s)=>{const u=s.listener,{forwardX:c,forwardY:l,forwardZ:f,positionX:p,positionY:h,positionZ:d,upX:y,upY:v,upZ:m}=void 0===u.forwardX?(()=>{const c=e(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),l=i(s),f=o(s,256,9,0),p=(e,o)=>{const i=n(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:o});return i.connect(c,0,e),i.start(),Object.defineProperty(i.offset,"defaultValue",{get:()=>o}),t({context:a},l,i.offset,r.b,r.a)};let h=[0,0,-1,0,1,0],d=[0,0,0];return f.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0],t.getChannelData(3)[0],t.getChannelData(4)[0],t.getChannelData(5)[0]];e.some((t,e)=>t!==h[e])&&(u.setOrientation(...e),h=e);const n=[t.getChannelData(6)[0],t.getChannelData(7)[0],t.getChannelData(8)[0]];n.some((t,e)=>t!==d[e])&&(u.setPosition(...n),d=n)},c.connect(f),{forwardX:p(0,0),forwardY:p(1,0),forwardZ:p(2,-1),positionX:p(6,0),positionY:p(7,0),positionZ:p(8,0),upX:p(3,0),upY:p(4,1),upZ:p(5,0)}})():u;return{get forwardX(){return c},get forwardY(){return l},get forwardZ(){return f},get positionX(){return p},get positionY(){return h},get positionZ(){return d},get upX(){return y},get upY(){return v},get upZ(){return m}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(49);const o=(t,e,n,o,i,a,s,u,c,l,f,p)=>(h,d,y,v=null,m=null)=>{const g=new r.AutomationEventList(y.defaultValue),b=d?o(g):null,_={get defaultValue(){return y.defaultValue},get maxValue(){return null===v?y.maxValue:v},get minValue(){return null===m?y.minValue:m},get value(){return y.value},set value(t){y.value=t,_.setValueAtTime(t,h.context.currentTime)},cancelAndHoldAtTime(t){if("function"==typeof y.cancelAndHoldAtTime)null===b&&g.flush(h.context.currentTime),g.add(i(t)),y.cancelAndHoldAtTime(t);else{const e=Array.from(g).pop();null===b&&g.flush(h.context.currentTime),g.add(i(t));const n=Array.from(g).pop();y.cancelScheduledValues(t),e!==n&&void 0!==n&&("exponentialRampToValue"===n.type?y.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?y.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?y.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&y.setValueCurveAtTime(n.values,n.startTime,n.duration))}return _},cancelScheduledValues:t=>(null===b&&g.flush(h.context.currentTime),g.add(a(t)),y.cancelScheduledValues(t),_),exponentialRampToValueAtTime:(t,e)=>(null===b&&g.flush(h.context.currentTime),g.add(s(t,e)),y.exponentialRampToValueAtTime(t,e),_),linearRampToValueAtTime:(t,e)=>(null===b&&g.flush(h.context.currentTime),g.add(u(t,e)),y.linearRampToValueAtTime(t,e),_),setTargetAtTime:(t,e,n)=>(null===b&&g.flush(h.context.currentTime),g.add(c(t,e,n)),y.setTargetAtTime(t,e,n),_),setValueAtTime:(t,e)=>(null===b&&g.flush(h.context.currentTime),g.add(l(t,e)),y.setValueAtTime(t,e),_),setValueCurveAtTime(t,e,n){if(null!==p&&"webkitAudioContext"===p.name){const r=e+n,o=h.context.sampleRate,i=Math.ceil(e*o),a=Math.floor(r*o),s=a-i,u=new Float32Array(s);for(let r=0;r<s;r+=1){const a=(t.length-1)/n*((i+r)/o-e),s=Math.floor(a),c=Math.ceil(a);u[r]=s===c?t[s]:(1-(a-s))*t[s]+(1-(c-a))*t[c]}null===b&&g.flush(h.context.currentTime),g.add(f(u,e,n)),y.setValueCurveAtTime(u,e,n);const c=a/o;c<r&&_.setValueAtTime(u[u.length-1],c),_.setValueAtTime(t[t.length-1],r)}else null===b&&g.flush(h.context.currentTime),g.add(f(t,e,n)),y.setValueCurveAtTime(t,e,n);return _}};return n.set(_,y),e.set(_,h),t(_,b),_}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>({replay(e){for(const n of t)if("exponentialRampToValue"===n.type){const{endTime:t,value:r}=n;e.exponentialRampToValueAtTime(r,t)}else if("linearRampToValue"===n.type){const{endTime:t,value:r}=n;e.linearRampToValueAtTime(r,t)}else if("setTarget"===n.type){const{startTime:t,target:r,timeConstant:o}=n;e.setTargetAtTime(r,t,o)}else if("setValue"===n.type){const{startTime:t,value:r}=n;e.setValueAtTime(r,t)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:t,startTime:r,values:o}=n;e.setValueCurveAtTime(o,r,t)}}}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(2),o=n(124);const i={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,outputChannelCount:void 0,parameterData:{},processorOptions:{}},a=t=>{const e=[];for(let n=0;n<t;n+=1)e.push(1);return e},s=(t,e,n,s,u,c,l,f,p)=>class extends t{constructor(t,p,h=i){const d=c(t),y=l(d),v=(t=>({...t,outputChannelCount:void 0!==t.outputChannelCount?t.outputChannelCount:1===t.numberOfInputs&&1===t.numberOfOutputs?[t.channelCount]:a(t.numberOfOutputs)}))({...i,...h}),m=r.j.get(d),g=void 0===m?void 0:m.get(p),b=s(d,y?null:t.baseLatency,f,p,g,v);super(t,!0,b,y?n(p,v,g):null);const _=[];if(b.parameters.forEach((t,n)=>{const r=e(this,y,t);_.push([n,r])}),this._nativeAudioWorkletNode=b,this._numberOfOutputs=0===h.numberOfOutputs?0:this._nativeAudioWorkletNode.numberOfOutputs,this._onprocessorerror=null,this._parameters=new o.a(_),"closed"!==t.state){const e=new u(t,{gain:0});try{this.connect(e).connect(t.destination)}catch(t){if("IndexSizeError"!==t.name)throw t}}}get numberOfOutputs(){return this._numberOfOutputs}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(t){const e="function"==typeof t?p(this,t):null;this._nativeAudioWorkletNode.onprocessorerror=e;const n=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=null!==n&&n===e?t:n}get parameters(){return null===this._parameters?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o,i,a,s,u,c,l,f,p,h,d,y,v,m,g,b)=>class extends d{constructor(e,n){super(e,n),this._nativeContext=e,this._audioWorklet=void 0===t?void 0:{addModule:(e,n)=>t(this,e,n)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new o(this)}createBuffer(t,e,r){return new n({length:e,numberOfChannels:t,sampleRate:r})}createBufferSource(){return new r(this)}createChannelMerger(t=6){return new i(this,{numberOfInputs:t})}createChannelSplitter(t=6){return new a(this,{numberOfOutputs:t})}createConstantSource(){return new s(this)}createConvolver(){return new u(this)}createDelay(t=1){return new l(this,{maxDelayTime:t})}createDynamicsCompressor(){return new f(this)}createGain(){return new p(this)}createIIRFilter(t,e){return new h(this,{feedback:e,feedforward:t})}createOscillator(){return new y(this)}createPanner(){return new v(this)}createPeriodicWave(t,e,n={disableNormalization:!1}){return new m(this,{...n,imag:e,real:t})}createStereoPanner(){return new g(this)}createWaveShaper(){return new b(this)}decodeAudioData(t,e,n){return c(this._nativeContext,t).then(t=>("function"==typeof e&&e(t),t)).catch(t=>{throw"function"==typeof n&&n(t),t})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5);const o={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},i=(t,e,n,i,a,s,u)=>class extends t{constructor(t,i=o){const c=s(t),l={...o,...i},f=a(c,l),p=u(c);super(t,!1,f,p?n():null),this._Q=e(this,p,f.Q,r.b,r.a),this._detune=e(this,p,f.detune,1200*Math.log2(r.b),-1200*Math.log2(r.b)),this._frequency=e(this,p,f.frequency,t.sampleRate/2,0),this._gain=e(this,p,f.gain,40*Math.log10(r.b),-40*Math.log10(r.b)),this._nativeBiquadFilterNode=f}get Q(){return this._Q}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get type(){return this._nativeBiquadFilterNode.type}set type(t){this._nativeBiquadFilterNode.type=t}getFrequencyResponse(t,e,n){if(this._nativeBiquadFilterNode.getFrequencyResponse(t,e,n),t.length!==e.length||e.length!==n.length)throw i()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;return{render(s,u,c){const l=a.get(u);return void 0!==l?Promise.resolve(l):(async(s,u,c)=>{let l=n(s);const f=Object(r.a)(l,u);if(!f){const t={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(u,t)}return a.set(u,l),f?(await t(u,s.Q,l.Q,c),await t(u,s.detune,l.detune,c),await t(u,s.frequency,l.frequency,c),await t(u,s.gain,l.gain,c)):(await o(u,s.Q,l.Q,c),await o(u,s.detune,l.detune,c),await o(u,s.frequency,l.frequency,c),await o(u,s.gain,l.gain,c)),await i(s,u,l,c),l})(s,u,c)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,r)=>{const o=e.get(n);if(void 0!==o)return o;const i=t.get(n);if(void 0!==i)return i;try{const o=r();return o instanceof Promise?(t.set(n,o),o.catch(()=>!1).then(r=>(t.delete(n),e.set(n,r),r))):(e.set(n,o),o)}catch(t){return e.set(n,!1),!1}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},o=(t,e,n,o,i)=>class extends t{constructor(t,a=r){const s=o(t),u={...r,...a};super(t,!1,n(s,u),i(s)?e():null)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n)=>()=>{const o=new WeakMap;return{render(i,a,s){const u=o.get(a);return void 0!==u?Promise.resolve(u):(async(i,a,s)=>{let u=e(i);if(!Object(r.a)(u,a)){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,numberOfInputs:u.numberOfInputs};u=t(a,e)}return o.set(a,u),await n(i,a,u,s),u})(i,a,s)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},o=(t,e,n,o,i)=>class extends t{constructor(t,a=r){const s=o(t),u=(t=>({...t,channelCount:t.numberOfOutputs}))({...r,...a});super(t,!1,n(s,u),i(s)?e():null)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n)=>()=>{const o=new WeakMap;return{render(i,a,s){const u=o.get(a);return void 0!==u?Promise.resolve(u):(async(i,a,s)=>{let u=e(i);if(!Object(r.a)(u,a)){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,numberOfOutputs:u.numberOfOutputs};u=t(a,e)}return o.set(a,u),await n(i,a,u,s),u})(i,a,s)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n,r,o)=>t(n,e,r,o)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(78);const o=t=>(e,n,o=0,i=0)=>{const a=e[o];if(void 0===a)throw t();return Object(r.a)(n)?a.connect(n,0,i):a.connect(n,0)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n)=>{const r=t(e),o=e.createBuffer(1,2,e.sampleRate);return r.buffer=o,r.loop=!0,r.connect(n),r.start(),()=>{r.stop(),r.disconnect(n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(5),o=n(46),i=n(59);const a={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},s=(t,e,n,s,u,c,l)=>class extends t{constructor(t,o=a){const i=u(t),l={...a,...o},f=s(i,l),p=c(i),h=p?n():null;super(t,!1,f,h),this._constantSourceNodeRenderer=h,this._nativeConstantSourceNode=f,this._offset=e(this,p,f.offset,r.b,r.a),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(t){const e="function"==typeof t?l(this,t):null;this._nativeConstantSourceNode.onended=e;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===e?t:n}start(t=0){if(this._nativeConstantSourceNode.start(t),null!==this._constantSourceNodeRenderer)this._constantSourceNodeRenderer.start=t;else{Object(o.a)(this);const t=()=>{this._nativeConstantSourceNode.removeEventListener("ended",t),setTimeout(()=>Object(i.a)(this),1e3)};this._nativeConstantSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeConstantSourceNode.stop(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;let s=null,u=null;return{set start(t){s=t},set stop(t){u=t},render(c,l,f){const p=a.get(l);return void 0!==p?Promise.resolve(p):(async(c,l,f)=>{let p=n(c);const h=Object(r.a)(p,l);if(!h){const t={channelCount:p.channelCount,channelCountMode:p.channelCountMode,channelInterpretation:p.channelInterpretation,offset:p.offset.value};p=e(l,t),null!==s&&p.start(s),null!==u&&p.stop(u)}return a.set(l,p),h?await t(l,c.offset,p.offset,f):await o(l,c.offset,p.offset,f),await i(c,l,p,f),p})(c,l,f)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>(t[0]=e,t[0])},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},o=(t,e,n,o,i)=>class extends t{constructor(t,a=r){const s=o(t),u={...r,...a},c=n(s,u);super(t,!1,c,i(s)?e():null),this._isBufferNullified=!1,this._nativeConvolverNode=c}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(t){if(this._nativeConvolverNode.buffer=t,null===t&&null!==this._nativeConvolverNode.buffer){const t=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=t.createBuffer(1,1,t.sampleRate),this._isBufferNullified=!0}else this._isBufferNullified=!1}get normalize(){return this._nativeConvolverNode.normalize}set normalize(t){this._nativeConvolverNode.normalize=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(6);const i=(t,e,n)=>()=>{const i=new WeakMap;return{render(a,s,u){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s,u)=>{let c=e(a);if(!Object(o.a)(c,s)){const e={buffer:c.buffer,channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,disableNormalization:!c.normalize};c=t(s,e)}return i.set(s,c),Object(r.a)(c)?await n(a,s,c.inputs[0],u):await n(a,s,c,u),c})(a,s,u)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,r,o)=>{if(null===e)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(n,r,o)}catch(e){if("IndexSizeError"===e.name||"SyntaxError"===e.name)throw t();throw e}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","DataCloneError")}catch(t){return t.code=25,t.name="DataCloneError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(61);const o=(t,e,n,o,i,a,s,u)=>(c,l)=>{const f=e.get(c);if(void 0===f)throw new Error("Missing the expected cycle count.");const p=a(c.context),h=u(p);if(f===l){if(e.delete(c),!h&&s(c)){const e=o(c),{outputs:a}=n(c);for(const n of a)if(Object(r.a)(n)){const r=o(n[0]);t(e,r,n[1],n[2])}else{const t=i(n[0]);e.connect(t,n[1])}}}else e.set(c,f-l)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},o=(t,e,n,o,i,a)=>class extends t{constructor(t,s=r){const u=i(t),c={...r,...s},l=o(u,c),f=a(u);super(t,!1,l,f?n(c.maxDelayTime):null),this._delayTime=e(this,f,l.delayTime,c.maxDelayTime,0)}get delayTime(){return this._delayTime}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>a=>{const s=new WeakMap;return{render(u,c,l){const f=s.get(c);return void 0!==f?Promise.resolve(f):(async(u,c,l)=>{let f=n(u);const p=Object(r.a)(f,c);if(!p){const t={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,delayTime:f.delayTime.value,maxDelayTime:a};f=e(c,t)}return s.set(c,f),p?await t(c,u.delayTime,f.delayTime,l):await o(c,u.delayTime,f.delayTime,l),await i(u,c,f,l),f})(u,c,l)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(78);const o=(t,e,n)=>{const r=e[n];if(void 0===r)throw t();return r},i=t=>(e,n,i,a=0)=>void 0===n?e.forEach(t=>t.disconnect()):"number"==typeof n?o(t,e,n).disconnect():Object(r.a)(n)?void 0===i?e.forEach(t=>t.disconnect(n)):void 0===a?o(t,e,i).disconnect(n,0):o(t,e,i).disconnect(n,0,a):void 0===i?e.forEach(t=>t.disconnect(n)):o(t,e,i).disconnect(n,0)},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},o=(t,e,n,o,i,a,s)=>class extends t{constructor(t,i=r){const u=a(t),c={...r,...i},l=o(u,c),f=s(u);super(t,!1,l,f?n():null),this._attack=e(this,f,l.attack,1,0),this._knee=e(this,f,l.knee,40,0),this._nativeDynamicsCompressorNode=l,this._ratio=e(this,f,l.ratio,20,1),this._release=e(this,f,l.release,1,0),this._threshold=e(this,f,l.threshold,0,-100)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(t){const e=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=t,t>2)throw this._nativeDynamicsCompressorNode.channelCount=e,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(t){const e=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=t,"max"===t)throw this._nativeDynamicsCompressorNode.channelCountMode=e,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;return{render(s,u,c){const l=a.get(u);return void 0!==l?Promise.resolve(l):(async(s,u,c)=>{let l=n(s);const f=Object(r.a)(l,u);if(!f){const t={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=e(u,t)}return a.set(u,l),f?(await t(u,s.attack,l.attack,c),await t(u,s.knee,l.knee,c),await t(u,s.ratio,l.ratio,c),await t(u,s.release,l.release,c),await t(u,s.threshold,l.threshold,c)):(await o(u,s.attack,l.attack,c),await o(u,s.knee,l.knee,c),await o(u,s.ratio,l.ratio,c),await o(u,s.release,l.release,c),await o(u,s.threshold,l.threshold,c)),await i(s,u,l,c),l})(s,u,c)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>{try{return new DOMException("","EncodingError")}catch(t){return t.code=0,t.name="EncodingError",t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>new Promise((n,r)=>{if(null===t)return void r(new SyntaxError);const o=t.document.head;if(null===o)r(new SyntaxError);else{const i=t.document.createElement("script"),a=new Blob([e],{type:"application/javascript"}),s=URL.createObjectURL(a),u=t.onerror,c=()=>{t.onerror=u,URL.revokeObjectURL(s)};t.onerror=(t,e,n,o,i)=>e===s||e===location.href&&1===n&&1===o?(c(),r(i),!1):null!==u?u(t,e,n,o,i):void 0,i.onerror=()=>{c(),r(new SyntaxError)},i.onload=()=>{c(),n()},i.src=s,i.type="module",o.appendChild(i)}})},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(e,n,r){if(null!==n){let o=this._listeners.get(n);void 0===o&&(o=t(this,n),"function"==typeof n&&this._listeners.set(n,o)),this._nativeEventTarget.addEventListener(e,o,r)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,e,n){const r=null===e?void 0:this._listeners.get(e);this._nativeEventTarget.removeEventListener(t,void 0===r?null:r,n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n,r)=>{Object.defineProperties(t,{currentFrame:{configurable:!0,get:()=>Math.round(e*n)},currentTime:{configurable:!0,get:()=>e}});try{return r()}finally{null!==t&&(delete t.currentFrame,delete t.currentTime)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>async e=>{try{const t=await fetch(e);if(t.ok)return t.text()}catch(t){}throw t()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5);const o={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},i=(t,e,n,i,a,s)=>class extends t{constructor(t,u=o){const c=a(t),l={...o,...u},f=i(c,l),p=s(c);super(t,!1,f,p?n():null),this._gain=e(this,p,f.gain,r.b,r.a)}get gain(){return this._gain}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;return{render(s,u,c){const l=a.get(u);return void 0!==l?Promise.resolve(l):(async(s,u,c)=>{let l=n(s);const f=Object(r.a)(l,u);if(!f){const t={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(u,t)}return a.set(u,l),f?await t(u,s.gain,l.gain,c):await o(u,s.gain,l.gain,c),await i(s,u,l,c),l})(s,u,c)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return n.renderer}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);const o=(t,e,n)=>o=>{if("closed"===o.state&&null!==e&&"webkitAudioContext"!==e.name){if(!t(o)){const t=r.f.get(o);if(void 0!==t)return t;const n=new e;return r.f.set(o,n),n}{const t=r.f.get(o);if(void 0!==t)return t;if(null!==n){const t=new n(1,1,44100);return r.f.set(o,t),t}}}return null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(14);const o=t=>e=>{const n=t.get(e);if(void 0===n)throw Object(r.a)();return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(126),o=n(6);const i=(t,e,n,i,a,s)=>(u,c)=>{const l=new WeakMap;let f=null;const p=async(p,h,d)=>{let y=n(p),v=null;const m=Object(o.a)(y,h);if(void 0===h.createIIRFilter?v=t(h):m||(y=e(h,t=>t.createIIRFilter(c,u))),l.set(h,null===v?y:v),null!==v){if(null===f){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const t=new i(p.context.destination.channelCount,p.context.length,h.sampleRate);f=(async()=>(await a(p,t,t.destination,d),((t,e,n,o)=>{const i=n.length,a=o.length,s=Math.min(i,a);if(1!==n[0]){for(let t=0;t<i;t+=1)o[t]/=n[0];for(let t=1;t<a;t+=1)n[t]/=n[0]}const u=new Float32Array(32),c=new Float32Array(32),l=e.createBuffer(t.numberOfChannels,t.length,t.sampleRate),f=t.numberOfChannels;for(let e=0;e<f;e+=1){const f=t.getChannelData(e),p=l.getChannelData(e);u.fill(0),c.fill(0),Object(r.a)(n,i,o,a,s,u,c,0,32,f,p)}return l})(await s(t),h,u,c)))()}const t=await f;return v.buffer=t,v.start(0),v}return await a(p,h,y,d),y};return{render(t,e,n){const r=l.get(e);return void 0!==r?Promise.resolve(r):p(t,e,n)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(61);const o=(t,e,n,o,i,a)=>s=>(u,c)=>{const l=t.get(u);if(void 0===l){if(!s&&a(u)){const t=o(u),{outputs:a}=n(u);for(const n of a)if(Object(r.a)(n)){const r=o(n[0]);e(t,r,n[1],n[2])}else{const e=i(n[0]);t.disconnect(e,n[1])}}t.set(u,c)}else t.set(u,l+c)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>{const r=t.get(n);return e(r)||e(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>t.has(n)||e(n)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>t.has(n)||e(n)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>{const r=t.get(n);return e(r)||e(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>null!==t&&e instanceof t},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>null!==t&&"function"==typeof t.AudioNode&&e instanceof t.AudioNode},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>null!==t&&"function"==typeof t.AudioParam&&e instanceof t.AudioParam},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>t(n)||e(n)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>null!==t&&e instanceof t},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>null!==t&&t.isSecureContext},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=async(t,e,n,r,o,i,a,s,u,c,l,f,p)=>{if(t(e,e)&&t(n,n)&&t(o,o)&&t(i,i)&&t(s,s)&&t(u,u)&&t(c,c)&&t(l,l)){return(await Promise.all([t(r,r),t(a,a),t(f,f),t(p,p)])).every(t=>t)}return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o)=>class extends t{constructor(t,i){const a=r(t);if(o(a))throw n();const s=e(a,i);super(t,!0,s,null),this._mediaElement=i.mediaElement,this._nativeMediaElementAudioSourceNode=s}get mediaElement(){return void 0===this._nativeMediaElementAudioSourceNode.mediaElement?this._mediaElement:this._nativeMediaElementAudioSourceNode.mediaElement}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o)=>class extends t{constructor(t,i){const a=r(t);if(o(a))throw n();const s=e(a,i);super(t,!0,s,null),this._nativeMediaStreamAudioSourceNode=s}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o)=>class extends t{constructor(t,i){const a=r(t);if(o(a))throw n();super(t,!0,e(a,i),null)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(123);const o=(t,e,n,o,i)=>class extends o{constructor(t={}){if(null===i)throw new Error("Missing the native AudioContext constructor.");const o=new i(t);if(null===o)throw n();if(!Object(r.a)(t.latencyHint))throw new TypeError(`The provided value '${t.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==t.sampleRate&&o.sampleRate!==t.sampleRate)throw e();super(o,2);const{latencyHint:a}=t,{sampleRate:s}=o;if(this._baseLatency="number"==typeof o.baseLatency?o.baseLatency:"balanced"===a?512/s:"interactive"===a||void 0===a?256/s:"playback"===a?1024/s:128*Math.max(2,Math.min(128,Math.round(a*s/128)))/s,this._nativeAudioContext=o,this._state=null,"running"===o.state){this._state="suspended";const t=()=>{"suspended"===this._state&&(this._state=null),o.removeEventListener("statechange",t)};o.addEventListener("statechange",t)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then(()=>{throw t()}):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close())}resume(){return"suspended"===this._state?new Promise((t,e)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?t():this.resume().then(t,e)};this._nativeAudioContext.addEventListener("statechange",n)}):this._nativeAudioContext.resume().catch(e=>{if(void 0===e||15===e.code)throw t();throw e})}suspend(){return this._nativeAudioContext.suspend().catch(e=>{if(void 0===e)throw t();throw e})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(2);const o=(t,e,n,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,r.g.set(this,n);const i=n.sampleRate;Object.defineProperty(n,"sampleRate",{get:()=>i}),this._destination=new t(this,o),this._listener=e(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(t){const e="function"==typeof t?o(this,t):null;this._nativeContext.onstatechange=e;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===e?t:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(36);const o={numberOfChannels:1},i=(t,e,n,i,a)=>class extends i{constructor(e){const{length:i,numberOfChannels:a,sampleRate:s}={...o,...e},u=n(a,i,s);t(r.a,()=>Object(r.a)(u))||u.addEventListener("statechange",(()=>{let t=0;const e=n=>{"running"===this._state&&(t>0?(u.removeEventListener("statechange",e),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):t+=1)};return e})()),super(u,a),this._length=i,this._nativeOfflineAudioContext=u,this._state=null}get length(){return void 0===this._nativeOfflineAudioContext.length?this._length:this._nativeOfflineAudioContext.length}get state(){return null===this._state?this._nativeOfflineAudioContext.state:this._state}startRendering(){return"running"===this._state?Promise.reject(e()):(this._state="running",a(this.destination,this._nativeOfflineAudioContext).then(t=>(this._state=null,t)).catch(t=>{throw this._state=null,t}))}_waitForThePromiseToSettle(t){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(t):setTimeout(()=>this._waitForThePromiseToSettle(t))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,r,o)=>{const i=new Set;var a,s;return n.connect=(a=n.connect,(o,s=0,u=0)=>{const c=0===i.size;if(e(o))return a.call(n,o,s,u),t(i,[o,s,u],t=>t[0]===o&&t[1]===s&&t[2]===u,!0),c&&r(),o;a.call(n,o,s),t(i,[o,s],t=>t[0]===o&&t[1]===s,!0),c&&r()}),n.disconnect=(s=n.disconnect,(t,r,a)=>{const u=i.size>0;if(void 0===t)s.apply(n),i.clear();else if("number"==typeof t){s.call(n,t);for(const e of i)e[1]===t&&i.delete(e)}else{e(t)?s.call(n,t,r,a):s.call(n,t,r);for(const e of i)e[0]!==t||void 0!==r&&e[1]!==r||void 0!==a&&e[2]!==a||i.delete(e)}const c=0===i.size;u&&c&&o()}),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>null===t?null:t.hasOwnProperty("AudioBuffer")?t.AudioBuffer:null},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>null===t?null:t.hasOwnProperty("AudioContext")?t.AudioContext:t.hasOwnProperty("webkitAudioContext")?t.webkitAudioContext:null},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,r,o)=>{const i=n.destination;if(i.channelCount!==r)try{i.channelCount=r}catch(t){}o&&"explicit"!==i.channelCountMode&&(i.channelCountMode="explicit"),0===i.maxChannelCount&&Object.defineProperty(i,"maxChannelCount",{value:r});const a=t(n,{channelCount:r,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return e(a,"channelCount",t=>()=>t.call(a),t=>e=>{t.call(a,e);try{i.channelCount=e}catch(t){if(e>i.maxChannelCount)throw t}}),e(a,"channelCountMode",t=>()=>t.call(a),t=>e=>{t.call(a,e),i.channelCountMode=e}),e(a,"channelInterpretation",t=>()=>t.call(a),t=>e=>{t.call(a,e),i.channelInterpretation=e}),Object.defineProperty(a,"maxChannelCount",{get:()=>i.maxChannelCount}),a.connect(i),a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n)=>{const r=t(e);return n(null!==r?r:e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>null===t?null:t.hasOwnProperty("AudioWorkletNode")?t.AudioWorkletNode:null},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(8),o=n(7),i=n(4);const a=t=>(e,n)=>{const a=t(e,t=>t.createBiquadFilter());return Object(i.a)(a,n),Object(r.a)(a,n,"Q"),Object(r.a)(a,n,"detune"),Object(r.a)(a,n,"frequency"),Object(r.a)(a,n,"gain"),Object(o.a)(a,n,"type"),a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(4);const o=(t,e)=>(n,o)=>{const i=t(n,t=>t.createChannelMerger(o.numberOfInputs));Object(r.a)(i,o),1!==i.channelCount&&"explicit"!==i.channelCountMode&&e(n,i);try{i.channelCount=void 0===o.numberOfInputs?6:o.numberOfInputs,e(n,i)}catch(t){}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(8),o=n(4),i=n(91),a=n(92);const s=(t,e,n,s,u)=>(c,l)=>{if(void 0===c.createConstantSource)return n(c,l);const f=e(c,t=>t.createConstantSource());return Object(o.a)(f,l),Object(r.a)(f,l,"offset"),t(s,()=>s(c))||Object(i.a)(f),t(u,()=>u(c))||Object(a.a)(f),f}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);const o=(t,e,n)=>(o,{offset:i,...a})=>{const s=o.createBuffer(1,2,o.sampleRate),u=t(o),c=e(o,{...a,gain:i}),l=s.getChannelData(0);l[0]=1,l[1]=1,u.buffer=s,u.loop=!0;const f={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(t){c.channelCount=t},get channelCountMode(){return c.channelCountMode},set channelCountMode(t){c.channelCountMode=t},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(t){c.channelInterpretation=t},get context(){return c.context},get inputs(){return[]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get offset(){return c.gain},get onended(){return u.onended},set onended(t){u.onended=t},addEventListener:(...t)=>u.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>u.dispatchEvent(t[0]),removeEventListener:(...t)=>u.removeEventListener(t[0],t[1],t[2]),start(t=0){u.start.call(u,t)},stop(t=0){u.stop.call(u,t)}};return n(Object(r.a)(f,c),()=>u.connect(c),()=>u.disconnect(c))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),o=n(4);const i=(t,e,n,i)=>(a,s)=>{const u=t(a,t=>t.createConvolver());try{u.channelCount=1}catch(t){return e(a,s)}if(Object(o.a)(u,s),s.disableNormalization===u.normalize&&(u.normalize=!s.disableNormalization),Object(r.a)(u,s,"buffer"),s.channelCount>2)throw n();if(i(u,"channelCount",t=>()=>t.call(u),t=>e=>{if(e>2)throw n();return t.call(u,e)}),"max"===s.channelCountMode)throw n();return i(u,"channelCountMode",t=>()=>t.call(u),t=>e=>{if("max"===e)throw n();return t.call(u,e)}),u}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(4),o=n(25);const i=(t,e,n)=>(i,{buffer:a,channelCount:s,channelCountMode:u,channelInterpretation:c,disableNormalization:l})=>{const f=t(i,t=>t.createConvolver());Object(r.a)(f,{channelCount:Math.max(s,2),channelCountMode:"max"===u?u:"clamped-max",channelInterpretation:c});const p=e(i,{channelCount:s,channelCountMode:u,channelInterpretation:c,gain:1}),h={get buffer(){return f.buffer},set buffer(t){f.buffer=t},get bufferSize(){},get channelCount(){return p.channelCount},set channelCount(t){t>2&&(f.channelCount=t),p.channelCount=t},get channelCountMode(){return p.channelCountMode},set channelCountMode(t){"max"===t&&(f.channelCountMode=t),p.channelCountMode=t},get channelInterpretation(){return f.channelInterpretation},set channelInterpretation(t){f.channelInterpretation=t,p.channelInterpretation=t},get context(){return f.context},get inputs(){return[f]},get numberOfInputs(){return f.numberOfInputs},get numberOfOutputs(){return f.numberOfOutputs},get normalize(){return f.normalize},set normalize(t){f.normalize=t},addEventListener:(...t)=>f.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>f.dispatchEvent(t[0]),removeEventListener:(...t)=>f.removeEventListener(t[0],t[1],t[2])};l===h.normalize&&(h.normalize=!l),a!==h.buffer&&(h.buffer=a);return n(Object(o.a)(h,p),()=>f.connect(p),()=>f.disconnect(p))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(8),o=n(4);const i=t=>(e,n)=>{const i=t(e,t=>t.createDelay(n.maxDelayTime));return Object(o.a)(i,n),Object(r.a)(i,n,"delayTime"),i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(8),o=n(4);const i=(t,e)=>(n,i)=>{const a=t(n,t=>t.createDynamicsCompressor());if(Object(o.a)(a,i),i.channelCount>2)throw e();if("max"===i.channelCountMode)throw e();return Object(r.a)(a,i,"attack"),Object(r.a)(a,i,"knee"),Object(r.a)(a,i,"ratio"),Object(r.a)(a,i,"release"),Object(r.a)(a,i,"threshold"),a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(8),o=n(4);const i=t=>(e,n)=>{const i=t(e,t=>t.createGain());return Object(o.a)(i,n),Object(r.a)(i,n,"gain"),i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(4);const o=(t,e)=>(n,o,i)=>{if(void 0===n.createIIRFilter)return e(n,o,i);const a=t(n,t=>t.createIIRFilter(i.feedforward,i.feedback));return Object(r.a)(a,i),a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(127),o=n(126),i=n(25);function a(t,e){const n=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/n,(t[1]*e[0]-t[0]*e[1])/n]}function s(t,e){let n=[0,0];for(let i=t.length-1;i>=0;i-=1)o=e,n=[(r=n)[0]*o[0]-r[1]*o[1],r[0]*o[1]+r[1]*o[0]],n[0]+=t[i];var r,o;return n}const u=(t,e,n,u)=>(c,l,{channelCount:f,channelCountMode:p,channelInterpretation:h,feedback:d,feedforward:y})=>{const v=Object(r.a)(l,c.sampleRate),m=d.length,g=y.length,b=Math.min(m,g);if(0===d.length||d.length>20)throw u();if(0===d[0])throw e();if(0===y.length||y.length>20)throw u();if(0===y[0])throw e();if(1!==d[0]){for(let t=0;t<g;t+=1)y[t]/=d[0];for(let t=1;t<m;t+=1)d[t]/=d[0]}const _=n(c,v,f,f);_.channelCount=f,_.channelCountMode=p,_.channelInterpretation=h;const w=[],x=[],O=[];for(let t=0;t<f;t+=1){w.push(0);const t=new Float32Array(32),e=new Float32Array(32);t.fill(0),e.fill(0),x.push(t),O.push(e)}_.onaudioprocess=t=>{const e=t.inputBuffer,n=t.outputBuffer,r=e.numberOfChannels;for(let t=0;t<r;t+=1){const r=e.getChannelData(t),i=n.getChannelData(t);w[t]=Object(o.a)(d,m,y,g,b,x[t],O[t],w[t],32,r,i)}};const S=c.sampleRate/2,k={get bufferSize(){return v},get channelCount(){return _.channelCount},set channelCount(t){_.channelCount=t},get channelCountMode(){return _.channelCountMode},set channelCountMode(t){_.channelCountMode=t},get channelInterpretation(){return _.channelInterpretation},set channelInterpretation(t){_.channelInterpretation=t},get context(){return _.context},get inputs(){return[_]},get numberOfInputs(){return _.numberOfInputs},get numberOfOutputs(){return _.numberOfOutputs},addEventListener:(...t)=>_.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>_.dispatchEvent(t[0]),getFrequencyResponse(e,n,r){if(e.length!==n.length||n.length!==r.length)throw t();const o=e.length;for(let t=0;t<o;t+=1){const o=-Math.PI*(e[t]/S),i=[Math.cos(o),Math.sin(o)],u=a(s(y,i),s(d,i));n[t]=Math.sqrt(u[0]*u[0]+u[1]*u[1]),r[t]=Math.atan2(u[1],u[0])}},removeEventListener:(...t)=>_.removeEventListener(t[0],t[1],t[2])};return Object(i.a)(k,_)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n)=>t(e,t=>t.createMediaElementSource(n.mediaElement))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,{mediaStream:n})=>{const r=n.getAudioTracks(),o=t(e,t=>{const e=r.sort((t,e)=>t.id<e.id?-1:t.id>e.id?1:0).slice(0,1);return t.createMediaStreamSource(new MediaStream(e))});return Object.defineProperty(o,"mediaStream",{value:n}),o}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,{mediaStreamTrack:r})=>"function"==typeof n.createMediaStreamTrackSource?e(n,t=>t.createMediaStreamTrackSource(r)):e(n,e=>{const n=new MediaStream([r]),o=e.createMediaStreamSource(n);if("audio"!==r.kind)throw t();return o})},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>null===t?null:t.hasOwnProperty("OfflineAudioContext")?t.OfflineAudioContext:t.hasOwnProperty("webkitOfflineAudioContext")?t.webkitOfflineAudioContext:null},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(8),o=n(7),i=n(4),a=n(91),s=n(92);const u=(t,e,n,u,c,l)=>(f,p)=>{const h=e(f,t=>t.createOscillator());return Object(i.a)(h,p),Object(r.a)(h,p,"detune"),Object(r.a)(h,p,"frequency"),void 0!==p.periodicWave?h.setPeriodicWave(p.periodicWave):Object(o.a)(h,p,"type"),t(n,()=>n(f))||Object(a.a)(h),t(u,()=>u(f))||l(h,f),t(c,()=>c(f))||Object(s.a)(h),h}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(8),o=n(7),i=n(4);const a=(t,e)=>(n,a)=>{const s=t(n,t=>t.createPanner());return void 0===s.orientationX?e(n,a):(Object(i.a)(s,a),Object(r.a)(s,a,"orientationX"),Object(r.a)(s,a,"orientationY"),Object(r.a)(s,a,"orientationZ"),Object(r.a)(s,a,"positionX"),Object(r.a)(s,a,"positionY"),Object(r.a)(s,a,"positionZ"),Object(o.a)(s,a,"coneInnerAngle"),Object(o.a)(s,a,"coneOuterAngle"),Object(o.a)(s,a,"coneOuterGain"),Object(o.a)(s,a,"distanceModel"),Object(o.a)(s,a,"maxDistance"),Object(o.a)(s,a,"panningModel"),Object(o.a)(s,a,"refDistance"),Object(o.a)(s,a,"rolloffFactor"),s)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(4),o=n(25);const i=(t,e,n,i,a,s,u,c,l,f)=>(p,{coneInnerAngle:h,coneOuterAngle:d,coneOuterGain:y,distanceModel:v,maxDistance:m,orientationX:g,orientationY:b,orientationZ:_,panningModel:w,positionX:x,positionY:O,positionZ:S,refDistance:k,rolloffFactor:T,...C})=>{const E=n(p,t=>t.createPanner());if(C.channelCount>2)throw c();if("max"===C.channelCountMode)throw c();Object(r.a)(E,C);const A={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},j=i(p,{...A,channelInterpretation:"speakers",numberOfInputs:6}),P=a(p,{...C,gain:1}),D=a(p,{...A,gain:1}),M=a(p,{...A,gain:0}),I=a(p,{...A,gain:0}),R=a(p,{...A,gain:0}),N=a(p,{...A,gain:0}),F=a(p,{...A,gain:0}),q=s(p,256,6,0),V=u(p,{...A,curve:new Float32Array([1,1]),oversample:"none"});let L=[1,0,0],z=[0,0,0];q.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0]];e.some((t,e)=>t!==L[e])&&(E.setOrientation(...e),L=e);const n=[t.getChannelData(6)[0],t.getChannelData(7)[0],t.getChannelData(8)[0]];n.some((t,e)=>t!==z[e])&&(E.setPosition(...n),z=n)},Object.defineProperty(M.gain,"defaultValue",{get:()=>0}),Object.defineProperty(I.gain,"defaultValue",{get:()=>0}),Object.defineProperty(R.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(F.gain,"defaultValue",{get:()=>0});const B={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(t){if(t>2)throw c();P.channelCount=t,E.channelCount=t},get channelCountMode(){return E.channelCountMode},set channelCountMode(t){if("max"===t)throw c();P.channelCountMode=t,E.channelCountMode=t},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(t){P.channelInterpretation=t,E.channelInterpretation=t},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(t){E.coneInnerAngle=t},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(t){E.coneOuterAngle=t},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(t){if(t<0||t>1)throw e();E.coneOuterGain=t},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(t){E.distanceModel=t},get inputs(){return[P]},get maxDistance(){return E.maxDistance},set maxDistance(t){if(t<0)throw new RangeError;E.maxDistance=t},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return D.gain},get orientationY(){return M.gain},get orientationZ(){return I.gain},get panningModel(){return E.panningModel},set panningModel(t){if(E.panningModel=t,E.panningModel!==t&&"HRTF"===t)throw c()},get positionX(){return R.gain},get positionY(){return N.gain},get positionZ(){return F.gain},get refDistance(){return E.refDistance},set refDistance(t){if(t<0)throw new RangeError;E.refDistance=t},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(t){if(t<0)throw new RangeError;E.rolloffFactor=t},addEventListener:(...t)=>P.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>P.dispatchEvent(t[0]),removeEventListener:(...t)=>P.removeEventListener(t[0],t[1],t[2])};h!==B.coneInnerAngle&&(B.coneInnerAngle=h),d!==B.coneOuterAngle&&(B.coneOuterAngle=d),y!==B.coneOuterGain&&(B.coneOuterGain=y),v!==B.distanceModel&&(B.distanceModel=v),m!==B.maxDistance&&(B.maxDistance=m),g!==B.orientationX.value&&(B.orientationX.value=g),b!==B.orientationY.value&&(B.orientationY.value=b),_!==B.orientationZ.value&&(B.orientationZ.value=_),w!==B.panningModel&&(B.panningModel=w),x!==B.positionX.value&&(B.positionX.value=x),O!==B.positionY.value&&(B.positionY.value=O),S!==B.positionZ.value&&(B.positionZ.value=S),k!==B.refDistance&&(B.refDistance=k),T!==B.rolloffFactor&&(B.rolloffFactor=T);return f(Object(o.a)(B,E),()=>{P.connect(E),t(P,V,0,0),V.connect(D).connect(j),V.connect(M).connect(j),V.connect(I).connect(j),V.connect(R).connect(j),V.connect(N).connect(j),V.connect(F).connect(j),j.connect(q)},()=>{P.disconnect(E),l(P,V,0,0),V.disconnect(D),D.disconnect(j),V.disconnect(M),M.disconnect(j),V.disconnect(I),I.disconnect(j),V.disconnect(R),R.disconnect(j),V.disconnect(N),N.disconnect(j),V.disconnect(F),F.disconnect(j),j.disconnect(q)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,{disableNormalization:n,imag:r,real:o})=>{const i=t(e),a=new Float32Array(r),s=new Float32Array(o);return null!==i?i.createPeriodicWave(s,a,{disableNormalization:n}):e.createPeriodicWave(s,a,{disableNormalization:n})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n,r,o)=>t(e,t=>t.createScriptProcessor(n,r,o))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(8),o=n(4);const i=(t,e,n)=>(i,a)=>t(i,t=>{const s=a.channelCountMode;if("clamped-max"===s)throw n();if(void 0===i.createStereoPanner)return e(i,a);const u=t.createStereoPanner();return Object(o.a)(u,a),Object(r.a)(u,a,"pan"),Object.defineProperty(u,"channelCountMode",{get:()=>s,set:t=>{if(t!==s)throw n()}}),u})},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);const o=(t,e,n,o,i,a)=>{const s=new Float32Array([1,1]),u=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},l={...c,oversample:"none"},f=(t,r,a,f,p)=>{if(1===r)return((t,e,r,i)=>{const a=new Float32Array(16385),f=new Float32Array(16385);for(let t=0;t<16385;t+=1){const e=t/16384*u;a[t]=Math.cos(e),f[t]=Math.sin(e)}const p=n(t,{...c,gain:0}),h=o(t,{...l,curve:a}),d=o(t,{...l,curve:s}),y=n(t,{...c,gain:0}),v=o(t,{...l,curve:f});return{connectGraph(){e.connect(p),e.connect(d.inputs[0]),e.connect(y),d.connect(r),r.connect(h.inputs[0]),r.connect(v.inputs[0]),h.connect(p.gain),v.connect(y.gain),p.connect(i,0,0),y.connect(i,0,1)},disconnectGraph(){e.disconnect(p),e.disconnect(d.inputs[0]),e.disconnect(y),d.disconnect(r),r.disconnect(h.inputs[0]),r.disconnect(v.inputs[0]),h.disconnect(p.gain),v.disconnect(y.gain),p.disconnect(i,0,0),y.disconnect(i,0,1)}}})(t,a,f,p);if(2===r)return((t,r,i,a)=>{const f=new Float32Array(16385),p=new Float32Array(16385),h=new Float32Array(16385),d=new Float32Array(16385),y=Math.floor(8192.5);for(let t=0;t<16385;t+=1)if(t>y){const e=(t-y)/(16384-y)*u;f[t]=Math.cos(e),p[t]=Math.sin(e),h[t]=0,d[t]=1}else{const e=t/(16384-y)*u;f[t]=1,p[t]=0,h[t]=Math.cos(e),d[t]=Math.sin(e)}const v=e(t,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),m=n(t,{...c,gain:0}),g=o(t,{...l,curve:f}),b=n(t,{...c,gain:0}),_=o(t,{...l,curve:p}),w=o(t,{...l,curve:s}),x=n(t,{...c,gain:0}),O=o(t,{...l,curve:h}),S=n(t,{...c,gain:0}),k=o(t,{...l,curve:d});return{connectGraph(){r.connect(v),r.connect(w.inputs[0]),v.connect(m,1),v.connect(b,1),v.connect(x,1),v.connect(S,1),w.connect(i),i.connect(g.inputs[0]),i.connect(_.inputs[0]),i.connect(O.inputs[0]),i.connect(k.inputs[0]),g.connect(m.gain),_.connect(b.gain),O.connect(x.gain),k.connect(S.gain),m.connect(a,0,0),x.connect(a,0,0),b.connect(a,0,1),S.connect(a,0,1)},disconnectGraph(){r.disconnect(v),r.disconnect(w.inputs[0]),v.disconnect(m,1),v.disconnect(b,1),v.disconnect(x,1),v.disconnect(S,1),w.disconnect(i),i.disconnect(g.inputs[0]),i.disconnect(_.inputs[0]),i.disconnect(O.inputs[0]),i.disconnect(k.inputs[0]),g.disconnect(m.gain),_.disconnect(b.gain),O.disconnect(x.gain),k.disconnect(S.gain),m.disconnect(a,0,0),x.disconnect(a,0,0),b.disconnect(a,0,1),S.disconnect(a,0,1)}}})(t,a,f,p);throw i()};return(e,{channelCount:o,channelCountMode:s,pan:u,...c})=>{if("max"===s)throw i();const l=t(e,{...c,channelCount:1,channelCountMode:s,numberOfInputs:2}),p=n(e,{...c,channelCount:o,channelCountMode:s,gain:1}),h=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:u});let{connectGraph:d,disconnectGraph:y}=f(e,o,p,h,l);Object.defineProperty(h.gain,"defaultValue",{get:()=>0});const v={get bufferSize(){},get channelCount(){return p.channelCount},set channelCount(t){p.channelCount!==t&&(m&&y(),({connectGraph:d,disconnectGraph:y}=f(e,t,p,h,l)),m&&d()),p.channelCount=t},get channelCountMode(){return p.channelCountMode},set channelCountMode(t){if("clamped-max"===t||"max"===t)throw i();p.channelCountMode=t},get channelInterpretation(){return p.channelInterpretation},set channelInterpretation(t){p.channelInterpretation=t},get context(){return p.context},get inputs(){return[p]},get numberOfInputs(){return p.numberOfInputs},get numberOfOutputs(){return p.numberOfOutputs},get pan(){return h.gain},addEventListener:(...t)=>p.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>p.dispatchEvent(t[0]),removeEventListener:(...t)=>p.removeEventListener(t[0],t[1],t[2])};let m=!1;return a(Object(r.a)(v,l),()=>{d(),m=!0},()=>{y(),m=!1})}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(7),o=n(4);const i=(t,e,n,i,a,s,u)=>(c,l)=>{const f=n(c,t=>t.createWaveShaper());try{return f.curve=new Float32Array([1]),i(c,l)}catch(t){}Object(o.a)(f,l);const p=l.curve;if(null!==p&&p.length<2)throw e();Object(r.a)(f,l,"curve"),Object(r.a)(f,l,"oversample");let h=null,d=!1;u(f,"curve",t=>()=>t.call(f),e=>n=>(e.call(f,n),d&&(a(n)&&null===h?h=t(c,f):a(n)||null===h||(h(),h=null)),n));return s(f,()=>{d=!0,a(f.curve)&&(h=t(c,f))},()=>{d=!1,null!==h&&(h(),h=null)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(4),o=n(25);const i=(t,e,n,i,a,s)=>(u,{curve:c,oversample:l,...f})=>{const p=n(u,t=>t.createWaveShaper()),h=n(u,t=>t.createWaveShaper());Object(r.a)(p,f),Object(r.a)(h,f);const d=i(u,{...f,gain:1}),y=i(u,{...f,gain:-1}),v=i(u,{...f,gain:1}),m=i(u,{...f,gain:-1});let g=null,b=!1,_=null;const w={get bufferSize(){},get channelCount(){return p.channelCount},set channelCount(t){d.channelCount=t,y.channelCount=t,p.channelCount=t,v.channelCount=t,h.channelCount=t,m.channelCount=t},get channelCountMode(){return p.channelCountMode},set channelCountMode(t){d.channelCountMode=t,y.channelCountMode=t,p.channelCountMode=t,v.channelCountMode=t,h.channelCountMode=t,m.channelCountMode=t},get channelInterpretation(){return p.channelInterpretation},set channelInterpretation(t){d.channelInterpretation=t,y.channelInterpretation=t,p.channelInterpretation=t,v.channelInterpretation=t,h.channelInterpretation=t,m.channelInterpretation=t},get context(){return p.context},get curve(){return _},set curve(n){if(null!==c&&c.length<2)throw e();if(null===n)p.curve=n,h.curve=n;else{const t=n.length,e=new Float32Array(t+2-t%2),r=new Float32Array(t+2-t%2);e[0]=n[0],r[0]=-n[t-1];const o=Math.ceil((t+1)/2),i=(t+1)/2-1;for(let a=1;a<o;a+=1){const s=a/o*i,u=Math.floor(s),c=Math.ceil(s);e[a]=u===c?n[u]:(1-(s-u))*n[u]+(1-(c-s))*n[c],r[a]=u===c?-n[t-1-u]:-(1-(s-u))*n[t-1-u]-(1-(c-s))*n[t-1-c]}e[o]=t%2==1?n[o-1]:(n[o-2]+n[o-1])/2,p.curve=e,h.curve=r}_=n,b&&(a(_)&&null===g?g=t(u,d):null!==g&&(g(),g=null))},get inputs(){return[d]},get numberOfInputs(){return p.numberOfInputs},get numberOfOutputs(){return p.numberOfOutputs},get oversample(){return p.oversample},set oversample(t){p.oversample=t,h.oversample=t},addEventListener:(...t)=>d.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>d.dispatchEvent(t[0]),removeEventListener:(...t)=>d.removeEventListener(t[0],t[1],t[2])};c!==w.curve&&(w.curve=c),l!==w.oversample&&(w.oversample=l);return s(Object(o.a)(w,v),()=>{d.connect(p).connect(v),d.connect(y).connect(h).connect(m).connect(v),b=!0,a(_)&&(g=t(u,d))},()=>{d.disconnect(p),p.disconnect(v),d.disconnect(y),y.disconnect(h),h.disconnect(m),m.disconnect(v),b=!1,null!==g&&(g(),g=null)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(36);const o={numberOfChannels:1},i=(t,e,n,i,a)=>class extends t{constructor(t,n,a){let s;if("number"==typeof t&&void 0!==n&&void 0!==a)s={length:n,numberOfChannels:t,sampleRate:a};else{if("object"!=typeof t)throw new Error("The given parameters are not valid.");s=t}const{length:u,numberOfChannels:c,sampleRate:l}={...o,...s},f=i(c,u,l);e(r.a,()=>Object(r.a)(f))||f.addEventListener("statechange",(()=>{let t=0;const e=n=>{"running"===this._state&&(t>0?(f.removeEventListener("statechange",e),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):t+=1)};return e})()),super(f,c),this._length=u,this._nativeOfflineAudioContext=f,this._state=null}get length(){return void 0===this._nativeOfflineAudioContext.length?this._length:this._nativeOfflineAudioContext.length}get state(){return null===this._state?this._nativeOfflineAudioContext.state:this._state}startRendering(){return"running"===this._state?Promise.reject(n()):(this._state="running",a(this.destination,this._nativeOfflineAudioContext).then(t=>(this._state=null,t)).catch(t=>{throw this._state=null,t}))}_waitForThePromiseToSettle(t){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(t):setTimeout(()=>this._waitForThePromiseToSettle(t))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(46),o=n(59);const i={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,type:"sine"},a=(t,e,n,a,s,u,c,l)=>class extends t{constructor(t,n=i){const r=u(t),o={...i,...n},l=a(r,o),f=c(r),p=f?s():null,h=t.sampleRate/2;super(t,!1,l,p),this._detune=e(this,f,l.detune,153600,-153600),this._frequency=e(this,f,l.frequency,h,-h),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=p,null!==this._oscillatorNodeRenderer&&void 0!==o.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=o.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(t){const e="function"==typeof t?l(this,t):null;this._nativeOscillatorNode.onended=e;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===e?t:n}get type(){return this._nativeOscillatorNode.type}set type(t){if(this._nativeOscillatorNode.type=t,"custom"===t)throw n();null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(t){this._nativeOscillatorNode.setPeriodicWave(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=t)}start(t=0){if(this._nativeOscillatorNode.start(t),null!==this._oscillatorNodeRenderer)this._oscillatorNodeRenderer.start=t;else{Object(r.a)(this);const t=()=>{this._nativeOscillatorNode.removeEventListener("ended",t),setTimeout(()=>Object(o.a)(this),1e3)};this._nativeOscillatorNode.addEventListener("ended",t)}}stop(t=0){this._nativeOscillatorNode.stop(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(6);const o=(t,e,n,o,i)=>()=>{const a=new WeakMap;let s=null,u=null,c=null;return{set periodicWave(t){s=t},set start(t){u=t},set stop(t){c=t},render(l,f,p){const h=a.get(f);return void 0!==h?Promise.resolve(h):(async(l,f,p)=>{let h=n(l);const d=Object(r.a)(h,f);if(!d){const t={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,detune:h.detune.value,frequency:h.frequency.value,periodicWave:null===s?void 0:s,type:h.type};h=e(f,t),null!==u&&h.start(u),null!==c&&h.stop(c)}return a.set(f,h),d?(await t(f,l.detune,h.detune,p),await t(f,l.frequency,h.frequency,p)):(await o(f,l.detune,h.detune,p),await o(f,l.frequency,h.frequency,p)),await i(l,f,h,p),h})(l,f,p)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(5);const o={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},i=(t,e,n,i,a,s)=>class extends t{constructor(t,u=o){const c=a(t),l={...o,...u},f=n(c,l),p=s(c);super(t,!1,f,p?i():null),this._nativePannerNode=f,this._orientationX=e(this,p,f.orientationX,r.b,r.a),this._orientationY=e(this,p,f.orientationY,r.b,r.a),this._orientationZ=e(this,p,f.orientationZ,r.b,r.a),this._positionX=e(this,p,f.positionX,r.b,r.a),this._positionY=e(this,p,f.positionY,r.b,r.a),this._positionZ=e(this,p,f.positionZ,r.b,r.a)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(t){this._nativePannerNode.coneInnerAngle=t}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(t){this._nativePannerNode.coneOuterAngle=t}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(t){this._nativePannerNode.coneOuterGain=t}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(t){this._nativePannerNode.distanceModel=t}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(t){this._nativePannerNode.maxDistance=t}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(t){this._nativePannerNode.panningModel=t}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(t){this._nativePannerNode.refDistance=t}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(t){this._nativePannerNode.rolloffFactor=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(6);const i=(t,e,n,i,a)=>()=>{const s=new WeakMap;return{render(u,c,l){const f=s.get(c);return void 0!==f?Promise.resolve(f):(async(u,c,l)=>{let f=n(u);const p=Object(o.a)(f,c);if(!p){const t={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,coneInnerAngle:f.coneInnerAngle,coneOuterAngle:f.coneOuterAngle,coneOuterGain:f.coneOuterGain,distanceModel:f.distanceModel,maxDistance:f.maxDistance,orientationX:f.orientationX.value,orientationY:f.orientationY.value,orientationZ:f.orientationZ.value,panningModel:f.panningModel,positionX:f.positionX.value,positionY:f.positionY.value,positionZ:f.positionZ.value,refDistance:f.refDistance,rolloffFactor:f.rolloffFactor};f=e(c,t)}return s.set(c,f),p?(await t(c,u.orientationX,f.orientationX,l),await t(c,u.orientationY,f.orientationY,l),await t(c,u.orientationZ,f.orientationZ,l),await t(c,u.positionX,f.positionX,l),await t(c,u.positionY,f.positionY,l),await t(c,u.positionZ,f.positionZ,l)):(await i(c,u.orientationX,f.orientationX,l),await i(c,u.orientationY,f.orientationY,l),await i(c,u.orientationZ,f.orientationZ,l),await i(c,u.positionX,f.positionX,l),await i(c,u.positionY,f.positionY,l),await i(c,u.positionZ,f.positionZ,l)),Object(r.a)(f)?await a(u,c,f.inputs[0],l):await a(u,c,f,l),f})(u,c,l)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={disableNormalization:!1},o=(t,e,n)=>class o{constructor(o,i){const a=e(o),s={...r,...i},u=t(a,s);return n.add(u),u}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===o.prototype||n.has(t)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>(n,r,o,i)=>(t(r).replay(o),e(r,n,o,i))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n)=>async(r,o,i,a)=>{const s=t(r),u=[...a,r];await Promise.all(s.activeInputs.map((t,a)=>Array.from(t).filter(([t])=>!u.includes(t)).map(async([t,s])=>{const c=e(t),l=await c.render(t,o,u);n(t)||r===r.context.destination&&n(r)||l.connect(i,s,a)})).reduce((t,e)=>[...t,...e],[]))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n)=>async(r,o,i,a)=>{const s=e(r);await Promise.all(Array.from(s.activeInputs).map(async([e,r])=>{const s=t(e),u=await s.render(e,o,a);n(e)||u.connect(i,r)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(36);const o=(t,e,n,o)=>i=>t(r.a,()=>Object(r.a)(i))?Promise.resolve(t(o,o)).then(t=>{if(!t){const t=n(i,512,0,1);i.oncomplete=()=>{t.onaudioprocess=null,t.disconnect()},t.onaudioprocess=()=>i.currentTime,t.connect(i.destination)}return i.startRendering()}):new Promise(t=>{const n=e(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=e=>{n.disconnect(),t(e.renderedBuffer)},n.connect(i.destination),i.startRendering()})},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(90);const o=(t,e,n,o,i,a,s)=>(u,c)=>n(u).render(u,c,[]).then(()=>o(c)).then(n=>("function"!=typeof n.copyFromChannel?(a(n),Object(r.a)(n)):e(i,()=>i(n))||s(n),t.add(n),n))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},o=(t,e,n,o,i,a)=>class extends t{constructor(t,s=r){const u=i(t),c={...r,...s},l=n(u,c),f=a(u);super(t,!1,l,f?o():null),this._pan=e(this,f,l.pan,1,-1)}get pan(){return this._pan}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(6);const i=(t,e,n,i,a)=>()=>{const s=new WeakMap;return{render(u,c,l){const f=s.get(c);return void 0!==f?Promise.resolve(f):(async(u,c,l)=>{let f=n(u);const p=Object(o.a)(f,c);if(!p){const t={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,pan:f.pan.value};f=e(c,t)}return s.set(c,f),p?await t(c,u.pan,f.pan,l):await i(c,u.pan,f.pan,l),Object(r.a)(f)?await a(u,c,f.inputs[0],l):await a(u,c,f,l),f})(u,c,l)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;try{new t({length:1,sampleRate:44100})}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;const e=new t(1,1,44100).createBuffer(1,1,44100);if(void 0===e.copyToChannel)return!0;const n=new Float32Array(2);try{e.copyFromChannel(n,0,0)}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e,t=>t.createBufferSource());n.start();try{n.start()}catch(t){return!0}return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return Promise.resolve(!1);const e=new t(1,1,44100),n=e.createBuffer(1,1,e.sampleRate),r=e.createBufferSource();return n.getChannelData(0)[0]=1,r.buffer=n,r.start(0,0,0),r.connect(e.destination),new Promise(t=>{e.oncomplete=({renderedBuffer:e})=>{t(0===e.getChannelData(0)[0])},e.startRendering()})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e,t=>t.createBufferSource()),r=e.createBuffer(1,1,44100);n.buffer=r;try{n.start(0,1)}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e,t=>t.createBufferSource());n.start();try{n.stop()}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;if(void 0!==t.prototype&&void 0!==t.prototype.close)return!0;const e=new t,n=void 0!==e.close;try{e.close()}catch(t){}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return Promise.resolve(!1);const e=new t(1,1,44100);return new Promise(t=>{let n=!0;const r=r=>{n&&(n=!1,e.startRendering(),t(r instanceof TypeError))};let o;try{o=e.decodeAudioData(null,()=>{},r)}catch(t){r(t)}void 0!==o&&o.catch(r)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;let e;try{e=new t({latencyHint:"balanced"})}catch(t){return!1}return e.close(),!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;const e=new t(1,1,44100).createGain(),n=e.connect(e)===e;return e.disconnect(e),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e,t=>t.createOscillator());try{n.start(-1)}catch(t){return t instanceof RangeError}return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=e.createBuffer(1,1,44100),r=t(e,t=>t.createBufferSource());r.buffer=n,r.start(),r.stop();try{return r.stop(),!0}catch(t){return!1}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{const n=t(e,t=>t.createOscillator());try{n.stop(-1)}catch(t){return t instanceof RangeError}return!1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>async()=>{if(null===t)return!0;if(null===e)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(){this.port.postMessage(0)}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new e(1,128,3200),o=URL.createObjectURL(n);let i=!1;try{await r.audioWorklet.addModule(o);const e=r.createGain(),n=new t(r,"a",{numberOfOutputs:0});n.port.onmessage=()=>i=!0,e.connect(n),await r.startRendering()}catch(t){}finally{URL.revokeObjectURL(o)}return i}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>()=>{if(null===e)return!1;const n=new e(1,1,44100);return void 0===n.createConstantSource||t(n,t=>t.createConstantSource()).offset.maxValue!==Number.POSITIVE_INFINITY}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;const e=new t(1,1,44100),n=e.createConvolver();n.buffer=e.createBuffer(1,1,e.sampleRate);try{n.buffer=e.createBuffer(1,1,e.sampleRate)}catch(t){return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>null!==t&&t.hasOwnProperty("isSecureContext")},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return!1;const e=new t;try{return e.createMediaStreamSource(new MediaStream),!1}catch(t){return!0}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>()=>{if(null===e)return Promise.resolve(!1);const n=new e(1,1,44100),r=t(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(t=>{n.oncomplete=()=>{r.disconnect(),t(0!==n.currentTime)},n.startRendering()})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>()=>{if(null===t)return Promise.resolve(!1);const e=new t(1,1,44100);if(void 0===e.createStereoPanner)return Promise.resolve(!0);if(void 0===e.createConstantSource)return Promise.resolve(!0);const n=e.createConstantSource(),r=e.createStereoPanner();return n.channelCount=1,n.offset.value=1,r.channelCount=1,n.start(),n.connect(r).connect(e.destination),e.startRendering().then(t=>1!==t.getChannelData(0)[0])}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));const r={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},o=(t,e,n,o,i,a)=>class extends t{constructor(t,e=r){const s=i(t),u={...r,...e},c=n(s,u);super(t,!0,c,a(s)?o():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=c}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(t){if(null===t)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(t.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=t}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(t){this._nativeWaveShaperNode.oversample=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(32),o=n(6);const i=(t,e,n)=>()=>{const i=new WeakMap;return{render(a,s,u){const c=i.get(s);return void 0!==c?Promise.resolve(c):(async(a,s,u)=>{let c=e(a);if(!Object(o.a)(c,s)){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,curve:c.curve,oversample:c.oversample};c=t(s,e)}return i.set(s,c),Object(r.a)(c)?await n(a,s,c.inputs[0],u):await n(a,s,c,u),c})(a,s,u)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>"undefined"==typeof window?null:window},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e)=>n=>{n.copyFromChannel=(r,o,i=0)=>{const a=t(i),s=t(o);if(s>=n.numberOfChannels)throw e();const u=n.length,c=n.getChannelData(s),l=r.length;for(let t=a<0?-a:0;t+a<u&&t<l;t+=1)r[t]=c[t+a]},n.copyToChannel=(r,o,i=0)=>{const a=t(i),s=t(o);if(s>=n.numberOfChannels)throw e();const u=n.length,c=n.getChannelData(s),l=r.length;for(let t=a<0?-a:0;t+a<u&&t<l;t+=1)c[t+a]=r[t]}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>e=>{var n,r;e.copyFromChannel=(n=e.copyFromChannel,(r,o,i=0)=>{const a=t(i),s=t(o);if(a<e.length)return n.call(e,r,s,a)}),e.copyToChannel=(r=e.copyToChannel,(n,o,i=0)=>{const a=t(i),s=t(o);if(a<e.length)return r.call(e,n,s,a)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>(e,n)=>{const r=n.createBuffer(1,1,n.sampleRate);null===e.buffer&&(e.buffer=r),t(e,"buffer",t=>()=>{const n=t.call(e);return n===r?null:n},t=>n=>t.call(e,null===n?r:n))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25);const o=t=>(e,n)=>{const o=t(n,t=>t.createGain());e.connect(o);const i=(a=e.disconnect,()=>{a.call(e,o),e.removeEventListener("ended",i)});var a;e.addEventListener("ended",i),Object(r.a)(e,o),e.stop=(t=>{let n=!1;return(r=0)=>{if(n)try{t.call(e,r)}catch(t){o.gain.setValueAtTime(0,r)}else t.call(e,r),n=!0}})(e.stop)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n)=>(r,o)=>{o.channelCount=1,o.channelCountMode="explicit",Object.defineProperty(o,"channelCount",{get:()=>1,set:()=>{throw t()}}),Object.defineProperty(o,"channelCountMode",{get:()=>"explicit",set:()=>{throw t()}});const i=e(r,t=>t.createBufferSource());n(o,()=>{const t=o.numberOfInputs;for(let e=0;e<t;e+=1)i.connect(o,0,e)},()=>i.disconnect(o))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=()=>new Promise(t=>{const e=new ArrayBuffer(0),{port1:n,port2:r}=new MessageChannel;n.onmessage=({data:e})=>t(null!==e),r.postMessage(e,[e])})},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=t=>{var e;t.start=(e=t.start,(n=0,r=0,o)=>{const i=t.buffer,a=null===i?r:Math.min(i.duration,r);null!==i&&a>i.duration-.5/t.context.sampleRate?e.call(t,n,0,0):e.call(t,n,a,o)})}},function(t,e,n){"use strict";var r=n(2),o=n(77),i=n(61);const a=t=>"port"in t;var s=n(96),u=n(54);const c=(t,e)=>{if(!Object(u.a)(t).delete(e))throw new Error("Missing the expected event listener.")};var l=n(97),f=n(19),p=n(79),h=n(13),d=n(80),y=n(23),v=n(39),m=n(62),g=n(50);const b=t=>!r.a.has(t),_=(t,e)=>{const n=Array.from(t).filter(e);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return t.delete(r),r};var w=n(46),x=n(59);const O=(t,e)=>{!a(t)&&e.every(t=>0===t.size)&&Object(x.a)(t)},S=t=>new Promise(e=>{const n=t.createScriptProcessor(256,1,1),r=t.createGain(),o=t.createBuffer(1,2,44100),i=o.getChannelData(0);i[0]=1,i[1]=1;const a=t.createBufferSource();a.buffer=o,a.loop=!0,a.connect(n).connect(t.destination),a.connect(r),a.disconnect(r),n.onaudioprocess=r=>{const o=r.inputBuffer.getChannelData(0);Array.prototype.some.call(o,t=>1===t)?e(!0):e(!1),a.stop(),n.onaudioprocess=null,a.disconnect(n),n.disconnect(t.destination)},a.start()}),k=(t,e)=>{const n=new Map;for(const e of t)for(const t of e){const e=n.get(t);n.set(t,void 0===e?1:e+1)}n.forEach((t,n)=>e(n,t))};var T=n(78);n.d(e,"a",(function(){return q}));const C=(t,e,[n,r,o],i)=>{Object(v.a)(t[r],[e,n,o],t=>t[0]===e&&t[1]===n,i)},E=(t,e,[n,r],o)=>{Object(v.a)(t,[e,n,r],t=>t[0]===e&&t[1]===n,o)},A=(t,e,[n,r,o],i)=>{const a=t.get(n);void 0===a?t.set(n,new Set([[r,e,o]])):Object(v.a)(a,[r,e,o],t=>t[0]===r&&t[1]===e,i)},j=(t,[e,n,r],o)=>{const i=t.get(e);void 0===i?t.set(e,new Set([[n,r]])):Object(v.a)(i,[n,r],t=>t[0]===n,o)},P=(t,e,n,r)=>{const o=Object(y.a)(t,e),i=_(o,t=>t[0]===n&&t[1]===r);return 0===o.size&&t.delete(e),i},D=(t,e,n)=>{const r=Object(y.a)(t,e),o=_(r,t=>t[0]===n);return 0===r.size&&t.delete(e),o},M=(t,e,n,r)=>{const{activeInputs:o,passiveInputs:i}=Object(f.a)(e),{outputs:a}=Object(f.a)(t),c=Object(u.a)(t),p=a=>{const u=Object(h.a)(e),c=Object(h.a)(t);if(a){const a=P(i,t,n,r);C(o,t,a,!1),Object(g.a)(t)||Object(s.a)(c,u,n,r),b(e)&&Object(w.a)(e)}else{const a=((t,e,n,r)=>_(t[r],t=>t[0]===e&&t[1]===n))(o,t,n,r);A(i,r,a,!1),Object(g.a)(t)||Object(l.a)(c,u,n,r),Object(m.a)(e)&&O(e,o)}};return!!Object(v.a)(a,[e,n,r],t=>t[0]===e&&t[1]===n&&t[2]===r,!0)&&(c.add(p),Object(m.a)(t)?C(o,t,[n,r,p],!0):A(i,r,[t,n,p],!0),!0)},I=(t,e,n)=>{const{activeInputs:r,passiveInputs:o}=Object(p.a)(e),{outputs:i}=Object(f.a)(t),a=Object(u.a)(t),s=i=>{const a=Object(h.a)(t),s=Object(d.a)(e);if(i){const e=D(o,t,n);E(r,t,e,!1),Object(g.a)(t)||a.connect(s,n)}else{const e=((t,e,n)=>_(t,t=>t[0]===e&&t[1]===n))(r,t,n);j(o,e,!1),Object(g.a)(t)||a.disconnect(s,n)}};return!!Object(v.a)(i,[e,n],t=>t[0]===e&&t[1]===n,!0)&&(a.add(s),Object(m.a)(t)?E(r,t,[n,s],!0):j(o,[t,n,s],!0),!0)},R=(t,e,n)=>{for(const r of t)if(r[0]===e&&r[1]===n)return t.delete(r),r;return null},N=(t,e,n,r)=>{const[o,i]=((t,e,n,r)=>{const{activeInputs:o,passiveInputs:i}=Object(f.a)(e),a=R(o[r],t,n);if(null===a){return[P(i,t,n,r)[2],!1]}return[a[2],!0]})(t,e,n,r);if(null!==o&&(c(t,o),i&&!Object(g.a)(t)&&Object(l.a)(Object(h.a)(t),Object(h.a)(e),n,r)),Object(m.a)(e)){const{activeInputs:t}=Object(f.a)(e);O(e,t)}},F=(t,e,n)=>{const[r,o]=((t,e,n)=>{const{activeInputs:r,passiveInputs:o}=Object(p.a)(e),i=R(r,t,n);if(null===i){return[D(o,t,n)[1],!1]}return[i[2],!0]})(t,e,n);null!==r&&(c(t,r),o&&!Object(g.a)(t)&&Object(h.a)(t).disconnect(Object(d.a)(e),n))},q=(t,e,n,u,c,l,y,m,g,_,x,O,A,j)=>class extends _{constructor(e,o,i,a){super(i),this._context=e,this._nativeAudioNode=i;const s=x(e);j(s)||!0===n(S,()=>S(s))||(t=>{const e=new Map;var n,r;t.connect=(n=t.connect.bind(t),(t,r=0,o=0)=>{const i=Object(T.a)(t)?n(t,r,o):n(t,r),a=e.get(t);return void 0===a?e.set(t,[{input:o,output:r}]):a.every(t=>t.input!==o||t.output!==r)&&a.push({input:o,output:r}),i}),t.disconnect=(r=t.disconnect,(n,o,i)=>{if(r.apply(t),void 0===n)e.clear();else if("number"==typeof n)for(const[t,r]of e){const o=r.filter(t=>t.output!==n);0===o.length?e.delete(t):e.set(t,o)}else if(e.has(n))if(void 0===o)e.delete(n);else{const t=e.get(n);if(void 0!==t){const r=t.filter(t=>t.output!==o&&(t.input!==i||void 0===i));0===r.length?e.delete(n):e.set(n,r)}}for(const[n,r]of e)r.forEach(e=>{Object(T.a)(n)?t.connect(n,e.output,e.input):t.connect(n,e.output)})})})(i),r.c.set(this,i),r.i.set(this,new Set),o&&Object(w.a)(this),t(this,a,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(t){this._nativeAudioNode.channelCount=t}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(t){this._nativeAudioNode.channelCountMode=t}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(t){this._nativeAudioNode.channelInterpretation=t}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(t,n=0,r=0){const i=x(this._context),c=j(i);if(O(t)||A(t))throw l();if(Object(o.a)(t)){const o=Object(h.a)(t);try{const u=Object(s.a)(this._nativeAudioNode,o,n,r);if(c||b(this)?this._nativeAudioNode.disconnect(...u):b(t)&&Object(w.a)(t),a(t)){const t=e.get(o);if(void 0===t){const t=i.createGain();t.connect(u[0],0,u[2]),e.set(o,new Map([[r,t]]))}else if(void 0===t.get(r)){const e=i.createGain();e.connect(u[0],0,u[2]),t.set(r,e)}}}catch(t){if(12===t.code)throw l();throw t}if(c?((t,e,n,r)=>{const{outputs:o}=Object(f.a)(t);if(Object(v.a)(o,[e,n,r],t=>t[0]===e&&t[1]===n&&t[2]===r,!0)){const{activeInputs:o}=Object(f.a)(e);return C(o,t,[n,r,null],!0),!0}return!1})(this,t,n,r):M(this,t,n,r)){const e=g([this],t);k(e,u(c))}return t}const m=Object(d.a)(t);if("playbackRate"===m.name)throw y();try{this._nativeAudioNode.connect(m,n),(c||b(this))&&this._nativeAudioNode.disconnect(m,n)}catch(t){if(12===t.code)throw l();throw t}if(c?((t,e,n)=>{const{outputs:r}=Object(f.a)(t);if(Object(v.a)(r,[e,n],t=>t[0]===e&&t[1]===n,!0)){const{activeInputs:r}=Object(p.a)(e);return E(r,t,[n,null],!0),!0}return!1})(this,t,n):I(this,t,n)){const e=g([this],t);k(e,u(c))}}disconnect(t,e,n){let r;if(void 0===t)r=(t=>{const e=Object(f.a)(t),n=[];for(const r of e.outputs)Object(i.a)(r)?N(t,...r):F(t,...r),n.push(r[0]);return e.outputs.clear(),n})(this);else if("number"==typeof t){if(t<0||t>=this.numberOfOutputs)throw c();r=((t,e)=>{const n=Object(f.a)(t),r=[];for(const o of n.outputs)o[1]===e&&(Object(i.a)(o)?N(t,...o):F(t,...o),r.push(o[0]),n.outputs.delete(o));return r})(this,t)}else{if(void 0!==e&&(e<0||e>=this.numberOfOutputs))throw c();if(Object(o.a)(t)&&void 0!==n&&(n<0||n>=t.numberOfInputs))throw c();if(r=((t,e,n,r)=>{const o=Object(f.a)(t);return Array.from(o.outputs).filter(t=>!(t[0]!==e||void 0!==n&&t[1]!==n||void 0!==r&&t[2]!==r)).map(e=>(Object(i.a)(e)?N(t,...e):F(t,...e),o.outputs.delete(e),e[0]))})(this,t,e,n),0===r.length)throw l()}for(const t of r){const e=g([this],t);k(e,m)}}}},function(t,e,n){"use strict";var r=n(5),o=n(127),i=n(98),a=n(125),s=n(2);const u=async(t,e)=>new t(await(t=>new Promise((e,n)=>{const{port1:r,port2:o}=new MessageChannel;r.onmessage=({data:t})=>{r.close(),o.close(),e(t)},r.onmessageerror=({data:t})=>{r.close(),o.close(),n(t)},o.postMessage(t)}))(e));var c=n(99),l=n(124);n.d(e,"a",(function(){return f}));const f=(t,e,n,f,p,h,d,y,v,m,g,b,_)=>(w,x,O,S)=>{if(0===S.numberOfInputs&&0===S.numberOfOutputs)throw m();if(void 0!==S.outputChannelCount){if(S.outputChannelCount.some(t=>t<1))throw m();if(S.outputChannelCount.length!==S.numberOfOutputs)throw n()}if("explicit"!==S.channelCountMode)throw m();const k=S.channelCount*S.numberOfInputs,T=S.outputChannelCount.reduce((t,e)=>t+e,0),C=void 0===O.parameterDescriptors?0:O.parameterDescriptors.length;if(k+C>6||T>6)throw m();const E=new MessageChannel,A=[],j=[];for(let t=0;t<S.numberOfInputs;t+=1)A.push(y(w,{channelCount:S.channelCount,channelCountMode:S.channelCountMode,channelInterpretation:S.channelInterpretation,gain:1})),j.push(h(w,{channelCount:S.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:S.channelCount}));const P=[];if(void 0!==O.parameterDescriptors)for(const{defaultValue:t,maxValue:e,minValue:n,name:o}of O.parameterDescriptors){const i=d(w,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==S.parameterData[o]?S.parameterData[o]:void 0===t?0:t});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===t?0:t},maxValue:{get:()=>void 0===e?r.b:e},minValue:{get:()=>void 0===n?r.a:n}}),P.push(i)}const D=p(w,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,k+C)}),M=Object(o.a)(x,w.sampleRate),I=v(w,M,k+C,Math.max(1,T)),R=h(w,{channelCount:Math.max(1,T),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,T)}),N=[];for(let t=0;t<S.numberOfOutputs;t+=1)N.push(p(w,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:S.outputChannelCount[t]}));for(let t=0;t<S.numberOfInputs;t+=1){A[t].connect(j[t]);for(let e=0;e<S.channelCount;e+=1)j[t].connect(D,e,t*S.channelCount+e)}const F=new l.a(void 0===O.parameterDescriptors?[]:O.parameterDescriptors.map(({name:t},e)=>{const n=P[e];return n.connect(D,0,k+e),n.start(0),[t,n.offset]}));D.connect(I);let q=S.channelInterpretation,V=null;const L=0===S.numberOfOutputs?[I]:N,z={get bufferSize(){return M},get channelCount(){return S.channelCount},set channelCount(t){throw f()},get channelCountMode(){return S.channelCountMode},set channelCountMode(t){throw f()},get channelInterpretation(){return q},set channelInterpretation(t){for(const e of A)e.channelInterpretation=t;q=t},get context(){return I.context},get inputs(){return A},get numberOfInputs(){return S.numberOfInputs},get numberOfOutputs(){return S.numberOfOutputs},get onprocessorerror(){return V},set onprocessorerror(t){"function"==typeof V&&z.removeEventListener("processorerror",V),V="function"==typeof t?t:null,"function"==typeof V&&z.addEventListener("processorerror",V)},get parameters(){return F},get port(){return E.port2},addEventListener:(...t)=>I.addEventListener(t[0],t[1],t[2]),connect:e.bind(null,L),disconnect:g.bind(null,L),dispatchEvent:(...t)=>I.dispatchEvent(t[0]),removeEventListener:(...t)=>I.removeEventListener(t[0],t[1],t[2])},B=new Map;var U,W;E.port1.addEventListener=(U=E.port1.addEventListener,(...t)=>{if("message"===t[0]){const e="function"==typeof t[1]?t[1]:"object"==typeof t[1]&&null!==t[1]&&"function"==typeof t[1].handleEvent?t[1].handleEvent:null;if(null!==e){const n=B.get(t[1]);void 0!==n?t[1]=n:(t[1]=t=>{b(w.currentTime,w.sampleRate,()=>e(t))},B.set(e,t[1]))}}return U.call(E.port1,t[0],t[1],t[2])}),E.port1.removeEventListener=(W=E.port1.removeEventListener,(...t)=>{if("message"===t[0]){const e=B.get(t[1]);void 0!==e&&(B.delete(t[1]),t[1]=e)}return W.call(E.port1,t[0],t[1],t[2])});let $=null;Object.defineProperty(E.port1,"onmessage",{get:()=>$,set:t=>{"function"==typeof $&&E.port1.removeEventListener("message",$),$="function"==typeof t?t:null,"function"==typeof $&&(E.port1.addEventListener("message",$),E.port1.start())}}),O.prototype.port=E.port1;let H=null;((t,e,n,r)=>{let o=s.k.get(t);void 0===o&&(o=new WeakMap,s.k.set(t,o));const i=u(n,r);return o.set(e,i),i})(w,z,O,S).then(t=>H=t);const G=Object(c.a)(S.numberOfInputs,S.channelCount),K=Object(c.a)(S.numberOfOutputs,S.outputChannelCount),Q=void 0===O.parameterDescriptors?[]:O.parameterDescriptors.reduce((t,{name:e})=>({...t,[e]:new Float32Array(128)}),{});let Y=!0;const X=()=>{S.numberOfOutputs>0&&I.disconnect(R);for(let t=0,e=0;t<S.numberOfOutputs;t+=1){const n=N[t];for(let r=0;r<S.outputChannelCount[t];r+=1)R.disconnect(n,e+r,r);e+=S.outputChannelCount[t]}};I.onaudioprocess=({inputBuffer:e,outputBuffer:n})=>{if(null!==H)for(let r=0;r<M;r+=128){for(let t=0;t<S.numberOfInputs;t+=1)for(let n=0;n<S.channelCount;n+=1)Object(i.a)(e,G[t],n,n,r);void 0!==O.parameterDescriptors&&O.parameterDescriptors.forEach(({name:t},n)=>{Object(i.a)(e,Q,t,k+n,r)});for(let t=0;t<S.numberOfInputs;t+=1)for(let e=0;e<S.outputChannelCount[t];e+=1)0===K[t][e].byteLength&&(K[t][e]=new Float32Array(128));try{const e=G.map((e,n)=>{const r=t.get(z);return void 0===r||void 0===r.get(n)?[new Float32Array(0)]:e}),o=b(w.currentTime+r/w.sampleRate,w.sampleRate,()=>H.process(e,K,Q));Y=o;for(let t=0,e=0;t<S.numberOfOutputs;t+=1){for(let o=0;o<S.outputChannelCount[t];o+=1)Object(a.a)(n,K[t],o,e+o,r);e+=S.outputChannelCount[t]}}catch(t){Y=!1,z.dispatchEvent(new ErrorEvent("processorerror",{error:t}))}if(!Y){for(let t=0;t<S.numberOfInputs;t+=1){A[t].disconnect(j[t]);for(let e=0;e<S.channelCount;e+=1)j[r].disconnect(D,e,t*S.channelCount+e)}if(void 0!==O.parameterDescriptors){const t=O.parameterDescriptors.length;for(let e=0;e<t;e+=1){const t=P[e];t.disconnect(D,0,k+e),t.stop()}}D.disconnect(I),I.onaudioprocess=null,J&&X();break}}};let J=!1;return _(z,()=>{if(Y){S.numberOfOutputs>0&&I.connect(R);for(let t=0,e=0;t<S.numberOfOutputs;t+=1){const n=N[t];for(let r=0;r<S.outputChannelCount[t];r+=1)R.connect(n,e+r,r);e+=S.outputChannelCount[t]}}J=!0},()=>{Y&&X(),J=!1})}},function(t,e,n){"use strict";var r=n(94);function o(t,e){void 0===e&&(e={});var n=function(t){if(t&&"j"===t[0]&&":"===t[1])return t.substr(2);return t}(t);if(function(t,e){return void 0===e&&(e=!t||"{"!==t[0]&&"["!==t[0]&&'"'!==t[0]),!e}(n,e.doNotParse))try{return JSON.parse(n)}catch(t){}return t}var i=n(122),a=function(){function t(t,e){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(t,e){return"string"==typeof t?r.parse(t,e):"object"==typeof t&&null!==t?t:{}}(t,e),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return t.prototype._updateBrowserValues=function(t){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r.parse(document.cookie,t))},t.prototype._emitChange=function(t){for(var e=0;e<this.changeListeners.length;++e)this.changeListeners[e](t)},t.prototype.get=function(t,e,n){return void 0===e&&(e={}),this._updateBrowserValues(n),o(this.cookies[t],e)},t.prototype.getAll=function(t,e){void 0===t&&(t={}),this._updateBrowserValues(e);var n={};for(var r in this.cookies)n[r]=o(this.cookies[r],t);return n},t.prototype.set=function(t,e,n){var o;"object"==typeof e&&(e=JSON.stringify(e)),this.cookies=i({},this.cookies,((o={})[t]=e,o)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(t,e,n)),this._emitChange({name:t,value:e,options:n})},t.prototype.remove=function(t,e){var n=e=i({},e,{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=i({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(t,"",n)),this._emitChange({name:t,value:void 0,options:e})},t.prototype.addChangeListener=function(t){this.changeListeners.push(t)},t.prototype.removeChangeListener=function(t){var e=this.changeListeners.indexOf(t);e>=0&&this.changeListeners.splice(e,1)},t}();e.a=a},function(t,e,n){"use strict";var r=n(2);const o={construct:()=>o},i=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,a=(t,e)=>{const n=[];let r=t.replace(/^[\s]+/,""),o=r.match(i);for(;null!==o;){const t=o[1].slice(1,-1),a=o[0].replace(/([\s]+)?;?$/,"").replace(t,new URL(t,e).toString());n.push(a),r=r.slice(o[0].length).replace(/^[\s]+/,""),o=r.match(i)}return[n.join(";"),r]};n.d(e,"a",(function(){return c}));const s=t=>{if(void 0!==t&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},u=t=>{if(!(t=>{try{new new Proxy(t,o)}catch(t){return!1}return!0})(t))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===t.prototype||"object"!=typeof t.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},c=(t,e,n,o,i,c,l,f,p)=>(h,d,y={credentials:"omit"})=>{const v=l(h),m=new URL(d,location.href).toString();if(void 0!==v.audioWorklet)return i(d).then(t=>{const[e,n]=a(t,m),r=new Blob([`${e};(registerProcessor=>{${n}\n})((n,p)=>registerProcessor(n,class extends p{constructor(o){const{hasNoOutput,...q}=o.parameterData;if(hasNoOutput===1){super({...o,numberOfOutputs:0,outputChannelCount:[],parameterData:q});this._h=true}else{super(o);this._h=false}}process(i,o,p){return super.process(i,(this._h)?[]:o,p)}}))`],{type:"application/javascript; charset=utf-8"}),o=URL.createObjectURL(r),i=c(v);return(null!==i?i:v).audioWorklet.addModule(o,y).then(()=>URL.revokeObjectURL(o)).catch(t=>{throw URL.revokeObjectURL(o),t})});const g=p.get(h);if(void 0!==g&&g.has(d))return Promise.resolve();const b=f.get(h);if(void 0!==b){const t=b.get(d);if(void 0!==t)return t}const _=i(d).then(t=>{const[e,r]=a(t,m);return n(`${e};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${r}\n})})(window,'_AWGS')`)}).then(()=>{const t=window._AWGS.pop();if(void 0===t)throw new SyntaxError;o(v.currentTime,v.sampleRate,()=>t(class{},void 0,(t,n)=>{if(""===t.trim())throw e();const o=r.j.get(v);if(void 0!==o){if(o.has(t))throw e();u(n),s(n.parameterDescriptors),o.set(t,n)}else u(n),s(n.parameterDescriptors),r.j.set(v,new Map([[t,n]]))},v.sampleRate,void 0,void 0))}).catch(e=>{if("SyntaxError"===e.name)throw t();throw e});return void 0===b?f.set(h,new Map([[d,_]])):b.set(d,_),_.then(()=>{const t=p.get(h);void 0===t?p.set(h,new Set([d])):t.add(d)}).catch(()=>{}).then(()=>{const t=f.get(h);void 0!==t&&t.delete(d)}),_}},function(t,e,n){"use strict";var r=n(7),o=n(4);const i=t=>"function"==typeof t.getFloatTimeDomainData;n.d(e,"a",(function(){return a}));const a=(t,e,n)=>(a,s)=>{const u=n(a,t=>t.createAnalyser());if(Object(o.a)(u,s),!(s.maxDecibels>s.minDecibels))throw e();return Object(r.a)(u,s,"fftSize"),Object(r.a)(u,s,"maxDecibels"),Object(r.a)(u,s,"minDecibels"),Object(r.a)(u,s,"smoothingTimeConstant"),t(i,()=>i(u))||(t=>{t.getFloatTimeDomainData=e=>{const n=new Uint8Array(e.length);t.getByteTimeDomainData(n);const r=Math.max(n.length,t.fftSize);for(let t=0;t<r;t+=1)e[t]=.0078125*(n[t]-128);return e}})(u),u}},function(t,e,n){"use strict";var r=n(8),o=n(7),i=n(4),a=n(14);var s=n(91),u=n(92);n.d(e,"a",(function(){return c}));const c=(t,e,n,c,l,f,p,h,d,y,v,m)=>(g,b={})=>{const _=e(g,t=>t.createBufferSource());return Object(i.a)(_,b),Object(r.a)(_,b,"playbackRate"),Object(o.a)(_,b,"buffer"),Object(o.a)(_,b,"loop"),Object(o.a)(_,b,"loopEnd"),Object(o.a)(_,b,"loopStart"),t(n,()=>n(g))||(t=>{t.start=(e=>{let n=!1;return(r=0,o=0,i)=>{if(n)throw Object(a.a)();e.call(t,r,o,i),n=!0}})(t.start)})(_),t(c,c)||((t,e)=>{let n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;var o,i;t.start=(o=t.start,i=t.stop,(a=0,s=0,u=Number.POSITIVE_INFINITY)=>{if(o.call(t,a,s),u>=0&&u<Number.POSITIVE_INFINITY){const o=Math.max(a,e.currentTime),s=u/t.playbackRate.value;n=o+s,i.call(t,Math.min(n,r))}}),t.stop=(o=>(i=0)=>{r=Math.max(i,e.currentTime),o.call(t,Math.min(n,r))})(t.stop)})(_,g),t(l,()=>l(g))||y(_),t(f,()=>f(g))||v(_,g),t(p,()=>p(g))||Object(s.a)(_),t(h,()=>h(g))||m(_,g),t(d,()=>d(g))||Object(u.a)(_),_}},function(t,e,n){"use strict";var r=n(98),o=n(125),i=n(99),a=n(19),s=n(2),u=n(13),c=n(23);var l=n(6);n.d(e,"a",(function(){return p}));const f=async(t,e,n,l,f,p)=>{const h=null===e?128*Math.ceil(t.context.length/128):e.length,d=l.channelCount*l.numberOfInputs,y=l.outputChannelCount.reduce((t,e)=>t+e,0),v=0===y?null:n.createBuffer(y,h,n.sampleRate);if(void 0===f)throw new Error("Missing the processor constructor.");const m=Object(a.a)(t),g=await((t,e)=>{const n=Object(c.a)(s.k,t),r=Object(u.a)(e);return Object(c.a)(n,r)})(n,t),b=Object(i.a)(l.numberOfInputs,l.channelCount),_=Object(i.a)(l.numberOfOutputs,l.outputChannelCount),w=Array.from(t.parameters.keys()).reduce((t,e)=>({...t,[e]:new Float32Array(128)}),{});for(let i=0;i<h;i+=128){if(l.numberOfInputs>0&&null!==e)for(let t=0;t<l.numberOfInputs;t+=1)for(let n=0;n<l.channelCount;n+=1)Object(r.a)(e,b[t],n,n,i);void 0!==f.parameterDescriptors&&null!==e&&f.parameterDescriptors.forEach(({name:t},n)=>{Object(r.a)(e,w,t,d+n,i)});for(let t=0;t<l.numberOfInputs;t+=1)for(let e=0;e<l.outputChannelCount[t];e+=1)0===_[t][e].byteLength&&(_[t][e]=new Float32Array(128));try{const t=b.map((t,e)=>0===m.activeInputs[e].size?[new Float32Array(0)]:t),e=p(i/n.sampleRate,n.sampleRate,()=>g.process(t,_,w));if(null!==v)for(let t=0,e=0;t<l.numberOfOutputs;t+=1){for(let n=0;n<l.outputChannelCount[t];n+=1)Object(o.a)(v,_[t],n,e+n,i);e+=l.outputChannelCount[t]}if(!e)break}catch(e){t.dispatchEvent(new ErrorEvent("processorerror",{error:e}));break}}return v},p=(t,e,n,r,o,i,a,s,u,c,p,h,d,y,v)=>(m,g,b)=>{const _=new WeakMap;let w=null;return{render(x,O,S){const k=_.get(O);return void 0!==k?Promise.resolve(k):(async(x,O,S)=>{let k=c(x),T=null;const C=Object(l.a)(k,O);if(null===p){const t=g.outputChannelCount.reduce((t,e)=>t+e,0),n=o(O,{channelCount:Math.max(1,t),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,t)}),i=[];for(let t=0;t<x.numberOfOutputs;t+=1)i.push(r(O,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:g.outputChannelCount[t]}));const u=0===g.numberOfOutputs?[n]:i,c=a(O,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1});c.connect=e.bind(null,u),c.disconnect=s.bind(null,u),T=[n,i,c]}else C||(k=new p(O,m));if(_.set(O,null===T?k:T[2]),null!==T){if(null===w){if(void 0===b)throw new Error("Missing the processor constructor.");if(null===h)throw new Error("Missing the native OfflineAudioContext constructor.");const t=x.channelCount*x.numberOfInputs,e=void 0===b.parameterDescriptors?0:b.parameterDescriptors.length,n=t+e,s=async()=>{const s=new h(n,128*Math.ceil(x.context.length/128),O.sampleRate),u=[],c=[];for(let t=0;t<g.numberOfInputs;t+=1)u.push(a(s,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),c.push(o(s,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const l=await Promise.all(Array.from(x.parameters.values()).map(async t=>{const e=i(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:t.value});return await d(s,t,e.offset,S),e})),f=r(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,t+e)});for(let t=0;t<g.numberOfInputs;t+=1){u[t].connect(c[t]);for(let e=0;e<g.channelCount;e+=1)c[t].connect(f,e,t*g.channelCount+e)}for(const[e,n]of l.entries())n.connect(f,0,t+e),n.start(0);return f.connect(s.destination),await Promise.all(u.map(t=>y(x,s,t,S))),v(s)};w=f(x,0===n?null:await s(),O,g,b,u)}const t=await w,e=n(O),[s,c,l]=T;null!==t&&(e.buffer=t,e.start(0)),e.connect(s);for(let t=0,e=0;t<x.numberOfOutputs;t+=1){const n=c[t];for(let r=0;r<g.outputChannelCount[t];r+=1)s.connect(n,e+r,r);e+=g.outputChannelCount[t]}return l}if(C)for(const[e,n]of x.parameters.entries())await t(O,n,k.parameters.get(e),S);else for(const[t,e]of x.parameters.entries())await d(O,e,k.parameters.get(t),S);return await y(x,O,k,S),k})(x,O,S)}}}},function(t,e,n){"use strict";var r=n(90);n.d(e,"a",(function(){return o}));const o=(t,e,n,o,i,a,s,u,c,l,f,p,h)=>(d,y)=>{const v=s(d)?d:a(d);if(i.has(y)){const t=n();return Promise.reject(t)}try{i.add(y)}catch(t){}if(e(f,()=>f(v))){return("closed"===v.state&&null!==c&&u(v)?new c(1,1,v.sampleRate):v).decodeAudioData(y).catch(t=>{if(t instanceof DOMException&&"NotSupportedError"===t.name)throw new TypeError;throw t}).then(n=>(e(l,()=>l(n))||h(n),t.add(n),n))}return new Promise((e,n)=>{const i=()=>{try{(t=>{const{port1:e}=new MessageChannel;e.postMessage(t,[t])})(y)}catch(t){}},a=t=>{n(t),i()};try{v.decodeAudioData(y,n=>{"function"!=typeof n.copyFromChannel&&(p(n),Object(r.a)(n)),t.add(n),i(),e(n)},t=>{a(null===t?o():t)})}catch(t){a(t)}})}},function(t,e,n){"use strict";var r=n(77);n.d(e,"a",(function(){return o}));const o=(t,e,n)=>function o(i,a){const s=Object(r.a)(a)?a:n(t,a);if((t=>"delayTime"in t)(s))return[];if(i[0]===s)return[i];if(i.includes(s))return[];const{outputs:u}=e(s);return Array.from(u).map(t=>o([...i,s],t[0])).reduce((t,e)=>t.concat(e),[])}},function(t,e,n){"use strict";var r=n(100);n.d(e,"a",(function(){return i}));const o={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},i=(t,e,n,i,a)=>class extends t{constructor(t,s){const u=i(t),c=a(u),l={...o,...s},f=e(u,c?null:t.baseLatency,l);super(t,!1,f,c?n(l.feedback,l.feedforward):null),(t=>{var e;t.getFrequencyResponse=(e=t.getFrequencyResponse,(n,o,i)=>{if(n.length!==o.length||o.length!==i.length)throw Object(r.a)();return e.call(t,n,o,i)})})(f),this._nativeIIRFilterNode=f}getFrequencyResponse(t,e,n){return this._nativeIIRFilterNode.getFrequencyResponse(t,e,n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r=(t,e,n,r,o)=>(i,a,s,u,c,l)=>{if(null!==s)try{const n=e(i,t=>o(t)&&0!==l.numberOfInputs&&0===l.numberOfOutputs?new s(t,u,{...l,numberOfOutputs:1,outputChannelCount:[1],parameterData:{...l.parameterData,hasNoOutput:1}}):new s(t,u,l)),r=new Map;let a=null;return Object.defineProperties(n,{channelCount:{get:()=>l.channelCount,set:()=>{throw t()}},channelCountMode:{get:()=>"explicit",set:()=>{throw t()}},onprocessorerror:{get:()=>a,set:t=>{"function"==typeof a&&n.removeEventListener("processorerror",a),a="function"==typeof t?t:null,"function"==typeof a&&n.addEventListener("processorerror",a)}}}),n.addEventListener=(p=n.addEventListener,(...t)=>{if("processorerror"===t[0]){const e="function"==typeof t[1]?t[1]:"object"==typeof t[1]&&null!==t[1]&&"function"==typeof t[1].handleEvent?t[1].handleEvent:null;if(null!==e){const n=r.get(t[1]);void 0!==n?t[1]=n:(t[1]=n=>{e(new ErrorEvent(t[0],{...n,error:new Error}))},r.set(e,t[1]))}}return p.call(n,t[0],t[1],t[2])}),n.removeEventListener=(f=n.removeEventListener,(...t)=>{if("processorerror"===t[0]){const e=r.get(t[1]);void 0!==e&&(r.delete(t[1]),t[1]=e)}return f.call(n,t[0],t[1],t[2])}),n}catch(t){if(11===t.code)throw r();throw t}var f,p;if(void 0===c)throw r();return(t=>{const{port1:e}=new MessageChannel;try{e.postMessage(t)}finally{e.close()}})(l),n(i,a,c,l)}},function(t,e,n){"use strict";var r=n(4),o=n(14);n.d(e,"a",(function(){return i}));const i=t=>(e,n)=>{const i=t(e,t=>t.createChannelSplitter(n.numberOfOutputs));return Object(r.a)(i,n),(t=>{const e=t.numberOfOutputs;Object.defineProperty(t,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw Object(o.a)()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:t=>{if("explicit"!==t)throw Object(o.a)()}}),Object.defineProperty(t,"channelInterpretation",{get:()=>"discrete",set:t=>{if("discrete"!==t)throw Object(o.a)()}})})(i),i}},function(t,e){t.exports=function(t,e){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and runs after the decorators transform.")}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(1031),o=n(1032),i=n(1033);t.exports=function(t,e){return r(t)||o(t,e)||i()}},,function(t,e,n){"use strict";n(821);var r,o=(r=n(992))&&r.__esModule?r:{default:r};o.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),o.default._babelPolyfill=!0},function(t,e,n){"use strict";n(822),n(965),n(967),n(970),n(972),n(974),n(976),n(978),n(980),n(982),n(984),n(986),n(988),n(203)},function(t,e,n){n(823),n(826),n(827),n(828),n(829),n(830),n(831),n(832),n(833),n(834),n(835),n(836),n(837),n(838),n(839),n(840),n(841),n(842),n(843),n(844),n(845),n(846),n(847),n(848),n(849),n(850),n(851),n(852),n(853),n(854),n(855),n(856),n(857),n(858),n(859),n(860),n(861),n(862),n(863),n(864),n(865),n(866),n(867),n(869),n(870),n(871),n(872),n(873),n(874),n(875),n(876),n(877),n(878),n(879),n(880),n(881),n(882),n(883),n(884),n(885),n(886),n(887),n(888),n(889),n(890),n(891),n(892),n(893),n(894),n(895),n(896),n(897),n(898),n(899),n(900),n(901),n(902),n(904),n(905),n(907),n(908),n(909),n(910),n(911),n(912),n(913),n(915),n(916),n(917),n(918),n(919),n(920),n(921),n(922),n(923),n(924),n(925),n(926),n(927),n(150),n(928),n(192),n(929),n(193),n(930),n(931),n(932),n(933),n(194),n(936),n(937),n(938),n(939),n(940),n(941),n(942),n(943),n(944),n(945),n(946),n(947),n(948),n(949),n(950),n(951),n(952),n(953),n(954),n(955),n(956),n(957),n(958),n(959),n(960),n(961),n(962),n(963),n(964),t.exports=n(18)},function(t,e,n){"use strict";var r=n(9),o=n(29),i=n(20),a=n(1),s=n(26),u=n(57).KEY,c=n(10),l=n(110),f=n(84),p=n(66),h=n(15),d=n(131),y=n(173),v=n(825),m=n(113),g=n(11),b=n(12),_=n(24),w=n(31),x=n(56),O=n(65),S=n(70),k=n(176),T=n(43),C=n(112),E=n(21),A=n(68),j=T.f,P=E.f,D=k.f,M=r.Symbol,I=r.JSON,R=I&&I.stringify,N=h("_hidden"),F=h("toPrimitive"),q={}.propertyIsEnumerable,V=l("symbol-registry"),L=l("symbols"),z=l("op-symbols"),B=Object.prototype,U="function"==typeof M&&!!C.f,W=r.QObject,$=!W||!W.prototype||!W.prototype.findChild,H=i&&c((function(){return 7!=S(P({},"a",{get:function(){return P(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=j(B,e);r&&delete B[e],P(t,e,n),r&&t!==B&&P(B,e,r)}:P,G=function(t){var e=L[t]=S(M.prototype);return e._k=t,e},K=U&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},Q=function(t,e,n){return t===B&&Q(z,e,n),g(t),e=x(e,!0),g(n),o(L,e)?(n.enumerable?(o(t,N)&&t[N][e]&&(t[N][e]=!1),n=S(n,{enumerable:O(0,!1)})):(o(t,N)||P(t,N,O(1,{})),t[N][e]=!0),H(t,e,n)):P(t,e,n)},Y=function(t,e){g(t);for(var n,r=v(e=w(e)),o=0,i=r.length;i>o;)Q(t,n=r[o++],e[n]);return t},X=function(t){var e=q.call(this,t=x(t,!0));return!(this===B&&o(L,t)&&!o(z,t))&&(!(e||!o(this,t)||!o(L,t)||o(this,N)&&this[N][t])||e)},J=function(t,e){if(t=w(t),e=x(e,!0),t!==B||!o(L,e)||o(z,e)){var n=j(t,e);return!n||!o(L,e)||o(t,N)&&t[N][e]||(n.enumerable=!0),n}},Z=function(t){for(var e,n=D(w(t)),r=[],i=0;n.length>i;)o(L,e=n[i++])||e==N||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===B,r=D(n?z:w(t)),i=[],a=0;r.length>a;)!o(L,e=r[a++])||n&&!o(B,e)||i.push(L[e]);return i};U||(s((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(z,n),o(this,N)&&o(this[N],t)&&(this[N][t]=!1),H(this,t,O(1,n))};return i&&$&&H(B,t,{configurable:!0,set:e}),G(t)}).prototype,"toString",(function(){return this._k})),T.f=J,E.f=Q,n(71).f=k.f=Z,n(104).f=X,C.f=tt,i&&!n(67)&&s(B,"propertyIsEnumerable",X,!0),d.f=function(t){return G(h(t))}),a(a.G+a.W+a.F*!U,{Symbol:M});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=A(h.store),ot=0;rt.length>ot;)y(rt[ot++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return o(V,t+="")?V[t]:V[t]=M(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in V)if(V[e]===t)return e},useSetter:function(){$=!0},useSimple:function(){$=!1}}),a(a.S+a.F*!U,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:Q,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=c((function(){C.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return C.f(_(t))}}),I&&a(a.S+a.F*(!U||c((function(){var t=M();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!K(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),r[1]=e,R.apply(I,r)}}),M.prototype[F]||n(30)(M.prototype,F,M.prototype.valueOf),f(M,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(110)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(68),o=n(112),i=n(104);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(1);r(r.S,"Object",{create:n(70)})},function(t,e,n){var r=n(1);r(r.S+r.F*!n(20),"Object",{defineProperty:n(21).f})},function(t,e,n){var r=n(1);r(r.S+r.F*!n(20),"Object",{defineProperties:n(175)})},function(t,e,n){var r=n(31),o=n(43).f;n(44)("getOwnPropertyDescriptor",(function(){return function(t,e){return o(r(t),e)}}))},function(t,e,n){var r=n(24),o=n(72);n(44)("getPrototypeOf",(function(){return function(t){return o(r(t))}}))},function(t,e,n){var r=n(24),o=n(68);n(44)("keys",(function(){return function(t){return o(r(t))}}))},function(t,e,n){n(44)("getOwnPropertyNames",(function(){return n(176).f}))},function(t,e,n){var r=n(12),o=n(57).onFreeze;n(44)("freeze",(function(t){return function(e){return t&&r(e)?t(o(e)):e}}))},function(t,e,n){var r=n(12),o=n(57).onFreeze;n(44)("seal",(function(t){return function(e){return t&&r(e)?t(o(e)):e}}))},function(t,e,n){var r=n(12),o=n(57).onFreeze;n(44)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(o(e)):e}}))},function(t,e,n){var r=n(12);n(44)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(12);n(44)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(12);n(44)("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},function(t,e,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(177)})},function(t,e,n){var r=n(1);r(r.S,"Object",{is:n(178)})},function(t,e,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(135).set})},function(t,e,n){"use strict";var r=n(105),o={};o[n(15)("toStringTag")]="z",o+""!="[object z]"&&n(26)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r=n(1);r(r.P,"Function",{bind:n(179)})},function(t,e,n){var r=n(21).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(20)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(12),o=n(72),i=n(15)("hasInstance"),a=Function.prototype;i in a||n(21).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(1),o=n(181);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(1),o=n(182);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var r=n(9),o=n(29),i=n(51),a=n(137),s=n(56),u=n(10),c=n(71).f,l=n(43).f,f=n(21).f,p=n(85).trim,h=r.Number,d=h,y=h.prototype,v="Number"==i(n(70)(y)),m="trim"in String.prototype,g=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;c<l;c++)if((a=u.charCodeAt(c))<48||a>o)return NaN;return parseInt(u,r)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(v?u((function(){y.valueOf.call(n)})):"Number"!=i(n))?a(new d(g(e)),n,h):g(e)};for(var b,_=n(20)?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;_.length>w;w++)o(d,b=_[w])&&!o(h,b)&&f(h,b,l(d,b));h.prototype=y,y.constructor=h,n(26)(r,"Number",h)}},function(t,e,n){"use strict";var r=n(1),o=n(42),i=n(183),a=n(138),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(10)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,r,s,u=i(this,l),c=o(t),y="",v="0";if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(y="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*d(2,69,1))-69)<0?u*d(2,-e,1):u/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(d(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),f(1,1),p(2),v=h()}else f(0,n),f(1<<-e,0),v=h()+a.call("0",c);return v=c>0?y+((s=v.length)<=c?"0."+a.call("0",c-s)+v:v.slice(0,s-c)+"."+v.slice(s-c)):y+v}})},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(183),a=1..toPrecision;r(r.P+r.F*(o((function(){return"1"!==a.call(1,void 0)}))||!o((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(1),o=n(9).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(1);r(r.S,"Number",{isInteger:n(184)})},function(t,e,n){var r=n(1);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(1),o=n(184),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(1),o=n(182);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(1),o=n(181);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(1),o=n(185),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,n){var r=n(1),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(1),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(1),o=n(139);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(1);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(1),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(1),o=n(140);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){var r=n(1);r(r.S,"Math",{fround:n(868)})},function(t,e,n){var r=n(139),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),u=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=r(t);return o<u?c*(o/u/a+1/i-1/i)*u*a:(n=(e=(1+a/i)*o)-(e-o))>s||n!=n?c*(1/0):c*n}},function(t,e,n){var r=n(1),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,u=0;a<s;)u<(n=o(arguments[a++]))?(i=i*(r=u/n)*r+1,u=n):i+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,n){var r=n(1),o=Math.imul;r(r.S+r.F*n(10)((function(){return-5!=o(4294967295,5)||2!=o.length})),"Math",{imul:function(t,e){var n=+t,r=+e,o=65535&n,i=65535&r;return 0|o*i+((65535&n>>>16)*i+o*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(1);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(1);r(r.S,"Math",{log1p:n(185)})},function(t,e,n){var r=n(1);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(1);r(r.S,"Math",{sign:n(139)})},function(t,e,n){var r=n(1),o=n(140),i=Math.exp;r(r.S+r.F*n(10)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(1),o=n(140),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(1);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(1),o=n(69),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(1),o=n(31),i=n(17);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){"use strict";n(85)("trim",(function(t){return function(){return t(this,3)}}))},function(t,e,n){"use strict";var r=n(141)(!0);n(142)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(1),o=n(141)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(1),o=n(17),i=n(143),a="".endsWith;r(r.P+r.F*n(145)("endsWith"),"String",{endsWith:function(t){var e=i(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),s=void 0===n?r:Math.min(o(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";var r=n(1),o=n(143);r(r.P+r.F*n(145)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(1);r(r.P,"String",{repeat:n(138)})},function(t,e,n){"use strict";var r=n(1),o=n(17),i=n(143),a="".startsWith;r(r.P+r.F*n(145)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(27)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(27)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(27)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(27)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(27)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(27)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(27)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(27)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(27)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(27)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(27)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(27)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(27)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(1),o=n(24),i=n(56);r(r.P+r.F*n(10)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(1),o=n(903);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(10),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o=r.toString,i=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(26)(r,"toString",(function(){var t=i.call(this);return t==t?o.call(this):"Invalid Date"}))},function(t,e,n){var r=n(15)("toPrimitive"),o=Date.prototype;r in o||n(30)(o,r,n(906))},function(t,e,n){"use strict";var r=n(11),o=n(56);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),"number"!=t)}},function(t,e,n){var r=n(1);r(r.S,"Array",{isArray:n(113)})},function(t,e,n){"use strict";var r=n(40),o=n(1),i=n(24),a=n(187),s=n(146),u=n(17),c=n(147),l=n(148);o(o.S+o.F*!n(114)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,o,f,p=i(t),h="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,v=void 0!==y,m=0,g=l(p);if(v&&(y=r(y,d>2?arguments[2]:void 0,2)),null==g||h==Array&&s(g))for(n=new h(e=u(p.length));e>m;m++)c(n,m,v?y(p[m],m):p[m]);else for(f=g.call(p),n=new h;!(o=f.next()).done;m++)c(n,m,v?a(f,y,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){"use strict";var r=n(1),o=n(147);r(r.S+r.F*n(10)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(1),o=n(31),i=[].join;r(r.P+r.F*(n(103)!=Object||!n(35)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(1),o=n(134),i=n(51),a=n(69),s=n(17),u=[].slice;r(r.P+r.F*n(10)((function(){o&&u.call(o)})),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=s(c-o),f=new Array(l),p=0;p<l;p++)f[p]="String"==r?this.charAt(o+p):this[o+p];return f}})},function(t,e,n){"use strict";var r=n(1),o=n(41),i=n(24),a=n(10),s=[].sort,u=[1,2,3];r(r.P+r.F*(a((function(){u.sort(void 0)}))||!a((function(){u.sort(null)}))||!n(35)(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},function(t,e,n){"use strict";var r=n(1),o=n(45)(0),i=n(35)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(12),o=n(113),i=n(15)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(1),o=n(45)(1);r(r.P+r.F*!n(35)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),o=n(45)(2);r(r.P+r.F*!n(35)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),o=n(45)(3);r(r.P+r.F*!n(35)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),o=n(45)(4);r(r.P+r.F*!n(35)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),o=n(189);r(r.P+r.F*!n(35)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(1),o=n(189);r(r.P+r.F*!n(35)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(1),o=n(111)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(35)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(1),o=n(31),i=n(42),a=n(17),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(35)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(1);r(r.P,"Array",{copyWithin:n(190)}),n(73)("copyWithin")},function(t,e,n){var r=n(1);r(r.P,"Array",{fill:n(149)}),n(73)("fill")},function(t,e,n){"use strict";var r=n(1),o=n(45)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),r(r.P+r.F*i,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(73)("find")},function(t,e,n){"use strict";var r=n(1),o=n(45)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(73)(i)},function(t,e,n){n(87)("Array")},function(t,e,n){var r=n(9),o=n(137),i=n(21).f,a=n(71).f,s=n(144),u=n(115),c=r.RegExp,l=c,f=c.prototype,p=/a/g,h=/a/g,d=new c(p)!==p;if(n(20)&&(!d||n(10)((function(){return h[n(15)("match")]=!1,c(p)!=p||c(h)==h||"/a/i"!=c(p,"i")})))){c=function(t,e){var n=this instanceof c,r=s(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(d?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:f,c)};for(var y=function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})},v=a(l),m=0;v.length>m;)y(v[m++]);f.constructor=c,c.prototype=f,n(26)(r,"RegExp",c)}n(87)("RegExp")},function(t,e,n){"use strict";n(193);var r=n(11),o=n(115),i=n(20),a=/./.toString,s=function(t){n(26)(RegExp.prototype,"toString",t,!0)};n(10)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var r=n(11),o=n(17),i=n(152),a=n(116);n(117)("match",1,(function(t,e,n,s){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var u=r(t),c=String(this);if(!u.global)return a(u,c);var l=u.unicode;u.lastIndex=0;for(var f,p=[],h=0;null!==(f=a(u,c));){var d=String(f[0]);p[h]=d,""===d&&(u.lastIndex=i(c,o(u.lastIndex),l)),h++}return 0===h?null:p}]}))},function(t,e,n){"use strict";var r=n(11),o=n(24),i=n(17),a=n(42),s=n(152),u=n(116),c=Math.max,l=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(117)("replace",2,(function(t,e,n,d){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=d(n,t,this,e);if(o.done)return o.value;var f=r(t),p=String(this),h="function"==typeof e;h||(e=String(e));var v=f.global;if(v){var m=f.unicode;f.lastIndex=0}for(var g=[];;){var b=u(f,p);if(null===b)break;if(g.push(b),!v)break;""===String(b[0])&&(f.lastIndex=s(p,i(f.lastIndex),m))}for(var _,w="",x=0,O=0;O<g.length;O++){b=g[O];for(var S=String(b[0]),k=c(l(a(b.index),p.length),0),T=[],C=1;C<b.length;C++)T.push(void 0===(_=b[C])?_:String(_));var E=b.groups;if(h){var A=[S].concat(T,k,p);void 0!==E&&A.push(E);var j=String(e.apply(void 0,A))}else j=y(S,p,k,T,E,e);k>=x&&(w+=p.slice(x,k)+j,x=k+S.length)}return w+p.slice(x)}];function y(t,e,r,i,a,s){var u=r+t.length,c=i.length,l=h;return void 0!==a&&(a=o(a),l=p),n.call(s,l,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return n;if(l>c){var p=f(l/10);return 0===p?n:p<=c?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}s=i[l-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var r=n(11),o=n(178),i=n(116);n(117)("search",1,(function(t,e,n,a){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),u=String(this),c=s.lastIndex;o(c,0)||(s.lastIndex=0);var l=i(s,u);return o(s.lastIndex,c)||(s.lastIndex=c),null===l?-1:l.index}]}))},function(t,e,n){"use strict";var r=n(144),o=n(11),i=n(106),a=n(152),s=n(17),u=n(116),c=n(151),l=n(10),f=Math.min,p=[].push,h=!l((function(){RegExp(4294967295,"y")}));n(117)("split",2,(function(t,e,n,l){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,a,s,u=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,h=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,l+"g");(i=c.call(d,o))&&!((a=d.lastIndex)>f&&(u.push(o.slice(f,i.index)),i.length>1&&i.index<o.length&&p.apply(u,i.slice(1)),s=i[0].length,f=a,u.length>=h));)d.lastIndex===i.index&&d.lastIndex++;return f===o.length?!s&&d.test("")||u.push(""):u.push(o.slice(f)),u.length>h?u.slice(0,h):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):d.call(String(o),n,r)},function(t,e){var r=l(d,t,this,e,d!==n);if(r.done)return r.value;var c=o(t),p=String(this),y=i(c,RegExp),v=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),g=new y(h?c:"^(?:"+c.source+")",m),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===p.length)return null===u(g,p)?[p]:[];for(var _=0,w=0,x=[];w<p.length;){g.lastIndex=h?w:0;var O,S=u(g,h?p:p.slice(w));if(null===S||(O=f(s(g.lastIndex+(h?0:w)),p.length))===_)w=a(p,w,v);else{if(x.push(p.slice(_,w)),x.length===b)return x;for(var k=1;k<=S.length-1;k++)if(x.push(S[k]),x.length===b)return x;w=_=O}}return x.push(p.slice(_)),x}]}))},function(t,e,n){var r=n(9),o=n(153).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(51)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var f=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(197),o=n(74);t.exports=n(120)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(197),o=n(74);t.exports=n(120)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(9),i=n(45)(0),a=n(26),s=n(57),u=n(177),c=n(198),l=n(12),f=n(74),p=n(74),h=!o.ActiveXObject&&"ActiveXObject"in o,d=s.getWeak,y=Object.isExtensible,v=c.ufstore,m=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(l(t)){var e=d(t);return!0===e?v(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(f(this,"WeakMap"),t,e)}},b=t.exports=n(120)("WeakMap",m,g,c,!0,!0);p&&h&&(u((r=c.getConstructor(m,"WeakMap")).prototype,g),s.NEED=!0,i(["delete","has","get","set"],(function(t){var e=b.prototype,n=e[t];a(e,t,(function(e,o){if(l(e)&&!y(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)}))})))},function(t,e,n){"use strict";var r=n(198),o=n(74);n(120)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(o(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(1),o=n(121),i=n(154),a=n(11),s=n(69),u=n(17),c=n(12),l=n(9).ArrayBuffer,f=n(106),p=i.ArrayBuffer,h=i.DataView,d=o.ABV&&l.isView,y=p.prototype.slice,v=o.VIEW;r(r.G+r.W+r.F*(l!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return d&&d(t)||c(t)&&v in t}}),r(r.P+r.U+r.F*n(10)((function(){return!new p(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(f(this,p))(u(o-r)),c=new h(this),l=new h(i),d=0;r<o;)l.setUint8(d++,c.getUint8(r++));return i}}),n(87)("ArrayBuffer")},function(t,e,n){var r=n(1);r(r.G+r.W+r.F*!n(121).ABV,{DataView:n(154).DataView})},function(t,e,n){n(53)("Int8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},function(t,e,n){n(53)("Int16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Uint16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Int32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Uint32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Float32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){n(53)("Float64",8,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},function(t,e,n){var r=n(1),o=n(41),i=n(11),a=(n(9).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(10)((function(){a((function(){}))})),"Reflect",{apply:function(t,e,n){var r=o(t),u=i(n);return a?a(r,e,u):s.call(r,e,u)}})},function(t,e,n){var r=n(1),o=n(70),i=n(41),a=n(11),s=n(12),u=n(10),c=n(179),l=(n(9).Reflect||{}).construct,f=u((function(){function t(){}return!(l((function(){}),[],t)instanceof t)})),p=!u((function(){l((function(){}))}));r(r.S+r.F*(f||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!f)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var u=n.prototype,h=o(s(u)?u:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){var r=n(21),o=n(1),i=n(11),a=n(56);o(o.S+o.F*n(10)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(1),o=n(43).f,i=n(11);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(1),o=n(11),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(186)(i,"Object",(function(){var t,e=this._k;do{if(this._i>=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){var r=n(43),o=n(72),i=n(29),a=n(1),s=n(12),u=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,c,l=arguments.length<3?e:arguments[2];return u(e)===l?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(l):void 0:s(c=o(e))?t(c,n,l):void 0}})},function(t,e,n){var r=n(43),o=n(1),i=n(11);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(1),o=n(72),i=n(11);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(1);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(1),o=n(11),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(200)})},function(t,e,n){var r=n(1),o=n(11),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(21),o=n(43),i=n(72),a=n(29),s=n(1),u=n(65),c=n(11),l=n(12);s(s.S,"Reflect",{set:function t(e,n,s){var f,p,h=arguments.length<4?e:arguments[3],d=o.f(c(e),n);if(!d){if(l(p=i(e)))return t(p,n,s,h);d=u(0)}if(a(d,"value")){if(!1===d.writable||!l(h))return!1;if(f=o.f(h,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,r.f(h,n,f)}else r.f(h,n,u(0,s));return!0}return void 0!==d.set&&(d.set.call(h,s),!0)}})},function(t,e,n){var r=n(1),o=n(135);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(966),t.exports=n(18).Array.includes},function(t,e,n){"use strict";var r=n(1),o=n(111)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(73)("includes")},function(t,e,n){n(968),t.exports=n(18).Array.flatMap},function(t,e,n){"use strict";var r=n(1),o=n(969),i=n(24),a=n(17),s=n(41),u=n(188);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return s(t),e=a(r.length),n=u(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(73)("flatMap")},function(t,e,n){"use strict";var r=n(113),o=n(12),i=n(17),a=n(40),s=n(15)("isConcatSpreadable");t.exports=function t(e,n,u,c,l,f,p,h){for(var d,y,v=l,m=0,g=!!p&&a(p,h,3);m<c;){if(m in u){if(d=g?g(u[m],m,n):u[m],y=!1,o(d)&&(y=void 0!==(y=d[s])?!!y:r(d)),y&&f>0)v=t(e,n,d,i(d.length),v,f-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=d}v++}m++}return v}},function(t,e,n){n(971),t.exports=n(18).String.padStart},function(t,e,n){"use strict";var r=n(1),o=n(201),i=n(119),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(973),t.exports=n(18).String.padEnd},function(t,e,n){"use strict";var r=n(1),o=n(201),i=n(119),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(975),t.exports=n(18).String.trimLeft},function(t,e,n){"use strict";n(85)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){n(977),t.exports=n(18).String.trimRight},function(t,e,n){"use strict";n(85)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){n(979),t.exports=n(131).f("asyncIterator")},function(t,e,n){n(173)("asyncIterator")},function(t,e,n){n(981),t.exports=n(18).Object.getOwnPropertyDescriptors},function(t,e,n){var r=n(1),o=n(200),i=n(31),a=n(43),s=n(147);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),u=a.f,c=o(r),l={},f=0;c.length>f;)void 0!==(n=u(r,e=c[f++]))&&s(l,e,n);return l}})},function(t,e,n){n(983),t.exports=n(18).Object.values},function(t,e,n){var r=n(1),o=n(202)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){n(985),t.exports=n(18).Object.entries},function(t,e,n){var r=n(1),o=n(202)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";n(194),n(987),t.exports=n(18).Promise.finally},function(t,e,n){"use strict";var r=n(1),o=n(18),i=n(9),a=n(106),s=n(196);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){n(989),n(990),n(991),t.exports=n(18)},function(t,e,n){var r=n(9),o=n(1),i=n(119),a=[].slice,s=/MSIE .\./.test(i),u=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(1),o=n(153);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var r=n(150),o=n(68),i=n(26),a=n(9),s=n(30),u=n(86),c=n(15),l=c("iterator"),f=c("toStringTag"),p=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(h),y=0;y<d.length;y++){var v,m=d[y],g=h[m],b=a[m],_=b&&b.prototype;if(_&&(_[l]||s(_,l,p),_[f]||s(_,f,m),u[m]=p,g))for(v in r)_[v]||i(_,v,r[v],!0)}},function(t,e,n){n(993),t.exports=n(204).global},function(t,e,n){var r=n(994);r(r.G,{global:n(155)})},function(t,e,n){var r=n(155),o=n(204),i=n(995),a=n(997),s=n(1004),u=function(t,e,n){var c,l,f,p=t&u.F,h=t&u.G,d=t&u.S,y=t&u.P,v=t&u.B,m=t&u.W,g=h?o:o[e]||(o[e]={}),b=g.prototype,_=h?r:d?r[e]:(r[e]||{}).prototype;for(c in h&&(n=e),n)(l=!p&&_&&void 0!==_[c])&&s(g,c)||(f=l?_[c]:n[c],g[c]=h&&"function"!=typeof _[c]?n[c]:v&&l?i(f,r):m&&_[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((g.virtual||(g.virtual={}))[c]=f,t&u.R&&b&&!b[c]&&a(b,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(996);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(998),o=n(1003);t.exports=n(157)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(999),o=n(1e3),i=n(1002),a=Object.defineProperty;e.f=n(157)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(156);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(157)&&!n(205)((function(){return 7!=Object.defineProperty(n(1001)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(156),o=n(155).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(156);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){"use strict";var r=n(122),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,s=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,c=o?Symbol.for("react.profiler"):60114,l=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,d=o?Symbol.for("react.memo"):60115,y=o?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function m(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function _(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||g}function w(){}function x(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||g}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(m(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var O=x.prototype=new w;O.constructor=x,r(O,_.prototype),O.isPureReactComponent=!0;var S={current:null},k=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function C(t,e,n){var r,o={},a=null,s=null;if(null!=e)for(r in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=""+e.key),e)k.call(e,r)&&!T.hasOwnProperty(r)&&(o[r]=e[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];o.children=c}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:t,key:a,ref:s,props:o,_owner:S.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===i}var A=/\/+/g,j=[];function P(t,e,n,r){if(j.length){var o=j.pop();return o.result=t,o.keyPrefix=e,o.func=n,o.context=r,o.count=0,o}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function D(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>j.length&&j.push(t)}function M(t,e,n){return null==t?0:function t(e,n,r,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case a:u=!0}}if(u)return r(o,e,""===n?"."+I(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=n+I(s=e[c],c);u+=t(s,l,r,o)}else if(null===e||"object"!=typeof e?l=null:l="function"==typeof(l=v&&e[v]||e["@@iterator"])?l:null,"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=t(s=s.value,l=n+I(s,c++),r,o);else if("object"===s)throw r=""+e,Error(m(31,"[object Object]"===r?"object with keys {"+Object.keys(e).join(", ")+"}":r,""));return u}(t,"",e,n)}function I(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,(function(t){return e[t]}))}(t.key):e.toString(36)}function R(t,e){t.func.call(t.context,e,t.count++)}function N(t,e,n){var r=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?F(t,r,n,(function(t){return t})):null!=t&&(E(t)&&(t=function(t,e){return{$$typeof:i,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function F(t,e,n,r,o){var i="";null!=n&&(i=(""+n).replace(A,"$&/")+"/"),M(t,N,e=P(e,i,r,o)),D(e)}var q={current:null};function V(){var t=q.current;if(null===t)throw Error(m(321));return t}var L={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return F(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;M(t,R,e=P(null,null,e,n)),D(e)},count:function(t){return M(t,(function(){return null}),null)},toArray:function(t){var e=[];return F(t,e,null,(function(t){return t})),e},only:function(t){if(!E(t))throw Error(m(143));return t}},e.Component=_,e.Fragment=s,e.Profiler=c,e.PureComponent=x,e.StrictMode=u,e.Suspense=h,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,e.cloneElement=function(t,e,n){if(null==t)throw Error(m(267,t));var o=r({},t.props),a=t.key,s=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(s=e.ref,u=S.current),void 0!==e.key&&(a=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in e)k.call(e,l)&&!T.hasOwnProperty(l)&&(o[l]=void 0===e[l]&&void 0!==c?c[l]:e[l])}var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:i,type:t.type,key:a,ref:s,props:o,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:f,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:l,_context:t},t.Consumer=t},e.createElement=C,e.createFactory=function(t){var e=C.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:p,render:t}},e.isValidElement=E,e.lazy=function(t){return{$$typeof:y,_ctor:t,_status:-1,_result:null}},e.memo=function(t,e){return{$$typeof:d,type:t,compare:void 0===e?null:e}},e.useCallback=function(t,e){return V().useCallback(t,e)},e.useContext=function(t,e){return V().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return V().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return V().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return V().useLayoutEffect(t,e)},e.useMemo=function(t,e){return V().useMemo(t,e)},e.useReducer=function(t,e,n){return V().useReducer(t,e,n)},e.useRef=function(t){return V().useRef(t)},e.useState=function(t){return V().useState(t)},e.version="16.13.0"},function(t,e,n){"use strict";var r=n(0),o=n(122),i=n(1007);function a(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function s(t,e,n,r,o,i,a,s,u){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(t){this.onError(t)}}var u=!1,c=null,l=!1,f=null,p={onError:function(t){u=!0,c=t}};function h(t,e,n,r,o,i,a,l,f){u=!1,c=null,s.apply(p,arguments)}var d=null,y=null,v=null;function m(t,e,n){var r=t.type||"unknown-event";t.currentTarget=v(n),function(t,e,n,r,o,i,s,p,d){if(h.apply(this,arguments),u){if(!u)throw Error(a(198));var y=c;u=!1,c=null,l||(l=!0,f=y)}}(r,e,void 0,t),t.currentTarget=null}var g=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;g.hasOwnProperty("ReactCurrentDispatcher")||(g.ReactCurrentDispatcher={current:null}),g.hasOwnProperty("ReactCurrentBatchConfig")||(g.ReactCurrentBatchConfig={suspense:null});var b=/^(.*)[\\\/]/,_="function"==typeof Symbol&&Symbol.for,w=_?Symbol.for("react.element"):60103,x=_?Symbol.for("react.portal"):60106,O=_?Symbol.for("react.fragment"):60107,S=_?Symbol.for("react.strict_mode"):60108,k=_?Symbol.for("react.profiler"):60114,T=_?Symbol.for("react.provider"):60109,C=_?Symbol.for("react.context"):60110,E=_?Symbol.for("react.concurrent_mode"):60111,A=_?Symbol.for("react.forward_ref"):60112,j=_?Symbol.for("react.suspense"):60113,P=_?Symbol.for("react.suspense_list"):60120,D=_?Symbol.for("react.memo"):60115,M=_?Symbol.for("react.lazy"):60116,I=_?Symbol.for("react.block"):60121,R="function"==typeof Symbol&&Symbol.iterator;function N(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=R&&t[R]||t["@@iterator"])?t:null}function F(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case O:return"Fragment";case x:return"Portal";case k:return"Profiler";case S:return"StrictMode";case j:return"Suspense";case P:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case C:return"Context.Consumer";case T:return"Context.Provider";case A:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case D:return F(t.type);case I:return F(t.render);case M:if(t=1===t._status?t._result:null)return F(t)}return null}function q(t){var e="";do{t:switch(t.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break t;default:var r=t._debugOwner,o=t._debugSource,i=F(t.type);n=null,r&&(n=F(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(b,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}e+=n,t=t.return}while(t);return e}var V=null,L={};function z(){if(V)for(var t in L){var e=L[t],n=V.indexOf(t);if(!(-1<n))throw Error(a(96,t));if(!U[n]){if(!e.extractEvents)throw Error(a(97,t));for(var r in U[n]=e,n=e.eventTypes){var o=void 0,i=n[r],s=e,u=r;if(W.hasOwnProperty(u))throw Error(a(99,u));W[u]=i;var c=i.phasedRegistrationNames;if(c){for(o in c)c.hasOwnProperty(o)&&B(c[o],s,u);o=!0}else i.registrationName?(B(i.registrationName,s,u),o=!0):o=!1;if(!o)throw Error(a(98,r,t))}}}}function B(t,e,n){if($[t])throw Error(a(100,t));$[t]=e,H[t]=e.eventTypes[n].dependencies}var U=[],W={},$={},H={};function G(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];if(!L.hasOwnProperty(e)||L[e]!==r){if(L[e])throw Error(a(102,e));L[e]=r,n=!0}}n&&z()}var K=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Q=null,Y=null,X=null;function J(t){if(t=y(t)){if("function"!=typeof Q)throw Error(a(280));var e=t.stateNode;e&&(e=d(e),Q(t.stateNode,t.type,e))}}function Z(t){Y?X?X.push(t):X=[t]:Y=t}function tt(){if(Y){var t=Y,e=X;if(X=Y=null,J(t),e)for(t=0;t<e.length;t++)J(e[t])}}function et(t,e){return t(e)}function nt(t,e,n,r,o){return t(e,n,r,o)}function rt(){}var ot=et,it=!1,at=!1;function st(){null===Y&&null===X||(rt(),tt())}function ut(t,e,n){if(at)return t(e,n);at=!0;try{return ot(t,e,n)}finally{at=!1,st()}}var ct=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,lt=Object.prototype.hasOwnProperty,ft={},pt={};function ht(t,e,n,r,o,i){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i}var dt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){dt[t]=new ht(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];dt[e]=new ht(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){dt[t]=new ht(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){dt[t]=new ht(t,2,!1,t,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(t){dt[t]=new ht(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){dt[t]=new ht(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){dt[t]=new ht(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){dt[t]=new ht(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){dt[t]=new ht(t,5,!1,t.toLowerCase(),null,!1)}));var yt=/[\-:]([a-z])/g;function vt(t){return t[1].toUpperCase()}function mt(t,e,n,r){var o=dt.hasOwnProperty(e)?dt[e]:null;(null!==o?0===o.type:!r&&(2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1])))||(function(t,e,n,r){if(null==e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t);default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}(e,n,o,r)&&(n=null),r||null===o?function(t){return!!lt.call(pt,t)||!lt.call(ft,t)&&(ct.test(t)?pt[t]=!0:(ft[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):o.mustUseProperty?t[o.propertyName]=null===n?3!==o.type&&"":n:(e=o.attributeName,r=o.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}function gt(t){switch(typeof t){case"boolean":case"number":case"object":case"string":case"undefined":return t;default:return""}}function bt(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function _t(t){t._valueTracker||(t._valueTracker=function(t){var e=bt(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return o.call(this)},set:function(t){r=""+t,i.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function wt(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=bt(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function xt(t,e){var n=e.checked;return o({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function Ot(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=gt(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function St(t,e){null!=(e=e.checked)&&mt(t,"checked",e,!1)}function kt(t,e){St(t,e);var n=gt(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r)return void t.removeAttribute("value");e.hasOwnProperty("value")?Ct(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ct(t,e.type,gt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Tt(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function Ct(t,e,n){"number"===e&&t.ownerDocument.activeElement===t||(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}function Et(t,e){return t=o({children:void 0},e),(e=function(t){var e="";return r.Children.forEach(t,(function(t){null!=t&&(e+=t)})),e}(e.children))&&(t.children=e),t}function At(t,e,n,r){if(t=t.options,e){e={};for(var o=0;o<n.length;o++)e["$"+n[o]]=!0;for(n=0;n<t.length;n++)o=e.hasOwnProperty("$"+t[n].value),t[n].selected!==o&&(t[n].selected=o),o&&r&&(t[n].defaultSelected=!0)}else{for(n=""+gt(n),e=null,o=0;o<t.length;o++){if(t[o].value===n)return t[o].selected=!0,void(r&&(t[o].defaultSelected=!0));null!==e||t[o].disabled||(e=t[o])}null!==e&&(e.selected=!0)}}function jt(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(a(91));return o({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Pt(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:gt(n)}}function Dt(t,e){var n=gt(e.value),r=gt(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function Mt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(t){var e=t.replace(yt,vt);dt[e]=new ht(e,1,!1,t,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(t){var e=t.replace(yt,vt);dt[e]=new ht(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(yt,vt);dt[e]=new ht(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){dt[t]=new ht(t,1,!1,t.toLowerCase(),null,!1)})),dt.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){dt[t]=new ht(t,1,!1,t.toLowerCase(),null,!0)}));var It="http://www.w3.org/1999/xhtml",Rt="http://www.w3.org/2000/svg";function Nt(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ft(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?Nt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var qt,Vt=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction((function(){return t(e,n)}))}:t}((function(t,e){if(t.namespaceURI!==Rt||"innerHTML"in t)t.innerHTML=e;else{for((qt=qt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=qt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}}));function Lt(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e}function zt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Bt={animationend:zt("Animation","AnimationEnd"),animationiteration:zt("Animation","AnimationIteration"),animationstart:zt("Animation","AnimationStart"),transitionend:zt("Transition","TransitionEnd")},Ut={},Wt={};function $t(t){if(Ut[t])return Ut[t];if(!Bt[t])return t;var e,n=Bt[t];for(e in n)if(n.hasOwnProperty(e)&&e in Wt)return Ut[t]=n[e];return t}K&&(Wt=document.createElement("div").style,"AnimationEvent"in window||(delete Bt.animationend.animation,delete Bt.animationiteration.animation,delete Bt.animationstart.animation),"TransitionEvent"in window||delete Bt.transitionend.transition);var Ht=$t("animationend"),Gt=$t("animationiteration"),Kt=$t("animationstart"),Qt=$t("transitionend"),Yt="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xt=new("function"==typeof WeakMap?WeakMap:Map);function Jt(t){var e=Xt.get(t);return void 0===e&&(e=new Map,Xt.set(t,e)),e}function Zt(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{0!=(1026&(e=t).effectTag)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function te(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&(null!==(t=t.alternate)&&(e=t.memoizedState)),null!==e)return e.dehydrated}return null}function ee(t){if(Zt(t)!==t)throw Error(a(188))}function ne(t){if(!(t=function(t){var e=t.alternate;if(!e){if(null===(e=Zt(t)))throw Error(a(188));return e!==t?null:t}for(var n=t,r=e;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return ee(o),t;if(i===r)return ee(o),e;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=i;break}if(u===r){s=!0,r=o,n=i;break}u=u.sibling}if(!s){for(u=i.child;u;){if(u===n){s=!0,n=i,r=o;break}if(u===r){s=!0,r=i,n=o;break}u=u.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?t:e}(t)))return null;for(var e=t;;){if(5===e.tag||6===e.tag)return e;if(e.child)e.child.return=e,e=e.child;else{if(e===t)break;for(;!e.sibling;){if(!e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}}return null}function re(t,e){if(null==e)throw Error(a(30));return null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}function oe(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}var ie=null;function ae(t){if(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e))for(var r=0;r<e.length&&!t.isPropagationStopped();r++)m(t,e[r],n[r]);else e&&m(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function se(t){if(null!==t&&(ie=re(ie,t)),t=ie,ie=null,t){if(oe(t,ae),ie)throw Error(a(95));if(l)throw t=f,l=!1,f=null,t}}function ue(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ce(t){if(!K)return!1;var e=(t="on"+t)in document;return e||((e=document.createElement("div")).setAttribute(t,"return;"),e="function"==typeof e[t]),e}var le=[];function fe(t){t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>le.length&&le.push(t)}function pe(t,e,n,r){if(le.length){var o=le.pop();return o.topLevelType=t,o.eventSystemFlags=r,o.nativeEvent=e,o.targetInst=n,o}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function he(t){var e=t.targetInst,n=e;do{if(!n){t.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(e=n.tag)&&6!==e||t.ancestors.push(n),n=Cn(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var o=ue(t.nativeEvent);r=t.topLevelType;var i=t.nativeEvent,a=t.eventSystemFlags;0===n&&(a|=64);for(var s=null,u=0;u<U.length;u++){var c=U[u];c&&(c=c.extractEvents(r,e,i,o,a))&&(s=re(s,c))}se(s)}}function de(t,e,n){if(!n.has(t)){switch(t){case"scroll":Ke(e,"scroll",!0);break;case"focus":case"blur":Ke(e,"focus",!0),Ke(e,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ce(t)&&Ke(e,t,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Yt.indexOf(t)&&Ge(t,e)}n.set(t,null)}}var ye,ve,me,ge=!1,be=[],_e=null,we=null,xe=null,Oe=new Map,Se=new Map,ke=[],Te="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ce="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ee(t,e,n,r,o){return{blockedOn:t,topLevelType:e,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Ae(t,e){switch(t){case"focus":case"blur":_e=null;break;case"dragenter":case"dragleave":we=null;break;case"mouseover":case"mouseout":xe=null;break;case"pointerover":case"pointerout":Oe.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Se.delete(e.pointerId)}}function je(t,e,n,r,o,i){return null===t||t.nativeEvent!==i?(t=Ee(e,n,r,o,i),null!==e&&(null!==(e=En(e))&&ve(e)),t):(t.eventSystemFlags|=r,t)}function Pe(t){var e=Cn(t.target);if(null!==e){var n=Zt(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=te(n)))return t.blockedOn=e,void i.unstable_runWithPriority(t.priority,(function(){me(n)}))}else if(3===e&&n.stateNode.hydrate)return void(t.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}t.blockedOn=null}function De(t){if(null!==t.blockedOn)return!1;var e=Je(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);if(null!==e){var n=En(e);return null!==n&&ve(n),t.blockedOn=e,!1}return!0}function Me(t,e,n){De(t)&&n.delete(e)}function Ie(){for(ge=!1;0<be.length;){var t=be[0];if(null!==t.blockedOn){null!==(t=En(t.blockedOn))&&ye(t);break}var e=Je(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);null!==e?t.blockedOn=e:be.shift()}null!==_e&&De(_e)&&(_e=null),null!==we&&De(we)&&(we=null),null!==xe&&De(xe)&&(xe=null),Oe.forEach(Me),Se.forEach(Me)}function Re(t,e){t.blockedOn===e&&(t.blockedOn=null,ge||(ge=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ie)))}function Ne(t){function e(e){return Re(e,t)}if(0<be.length){Re(be[0],t);for(var n=1;n<be.length;n++){var r=be[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==_e&&Re(_e,t),null!==we&&Re(we,t),null!==xe&&Re(xe,t),Oe.forEach(e),Se.forEach(e),n=0;n<ke.length;n++)(r=ke[n]).blockedOn===t&&(r.blockedOn=null);for(;0<ke.length&&null===(n=ke[0]).blockedOn;)Pe(n),null===n.blockedOn&&ke.shift()}var Fe={},qe=new Map,Ve=new Map,Le=["abort","abort",Ht,"animationEnd",Gt,"animationIteration",Kt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Qt,"transitionEnd","waiting","waiting"];function ze(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],o=t[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:e},Ve.set(r,e),qe.set(r,i),Fe[o]=i}}ze("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),ze("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),ze(Le,2);for(var Be="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ue=0;Ue<Be.length;Ue++)Ve.set(Be[Ue],0);var We=i.unstable_UserBlockingPriority,$e=i.unstable_runWithPriority,He=!0;function Ge(t,e){Ke(e,t,!1)}function Ke(t,e,n){var r=Ve.get(e);switch(void 0===r?2:r){case 0:r=Qe.bind(null,e,1,t);break;case 1:r=Ye.bind(null,e,1,t);break;default:r=Xe.bind(null,e,1,t)}n?t.addEventListener(e,r,!0):t.addEventListener(e,r,!1)}function Qe(t,e,n,r){it||rt();var o=Xe,i=it;it=!0;try{nt(o,t,e,n,r)}finally{(it=i)||st()}}function Ye(t,e,n,r){$e(We,Xe.bind(null,t,e,n,r))}function Xe(t,e,n,r){if(He)if(0<be.length&&-1<Te.indexOf(t))t=Ee(null,t,e,n,r),be.push(t);else{var o=Je(t,e,n,r);if(null===o)Ae(t,r);else if(-1<Te.indexOf(t))t=Ee(o,t,e,n,r),be.push(t);else if(!function(t,e,n,r,o){switch(e){case"focus":return _e=je(_e,t,e,n,r,o),!0;case"dragenter":return we=je(we,t,e,n,r,o),!0;case"mouseover":return xe=je(xe,t,e,n,r,o),!0;case"pointerover":var i=o.pointerId;return Oe.set(i,je(Oe.get(i)||null,t,e,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Se.set(i,je(Se.get(i)||null,t,e,n,r,o)),!0}return!1}(o,t,e,n,r)){Ae(t,r),t=pe(t,r,null,e);try{ut(he,t)}finally{fe(t)}}}}function Je(t,e,n,r){if(null!==(n=Cn(n=ue(r)))){var o=Zt(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=te(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}t=pe(t,r,n,e);try{ut(he,t)}finally{fe(t)}return null}var Ze={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];function en(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||Ze.hasOwnProperty(t)&&Ze[t]?(""+e).trim():e+"px"}function nn(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=en(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,o):t[n]=o}}Object.keys(Ze).forEach((function(t){tn.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ze[e]=Ze[t]}))}));var rn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(t,e){if(e){if(rn[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(a(137,t,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(a(60));if(!("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=e.style&&"object"!=typeof e.style)throw Error(a(62,""))}}function an(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sn=It;function un(t,e){var n=Jt(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=H[e];for(var r=0;r<e.length;r++)de(e[r],t,n)}function cn(){}function ln(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function fn(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function pn(t,e){var n,r=fn(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=fn(r)}}function hn(){for(var t=window,e=ln();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=ln((t=e.contentWindow).document)}return e}function dn(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var yn=null,vn=null;function mn(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function gn(t,e){return"textarea"===t||"option"===t||"noscript"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,_n="function"==typeof clearTimeout?clearTimeout:void 0;function wn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function xn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var On=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+On,kn="__reactEventHandlers$"+On,Tn="__reactContainere$"+On;function Cn(t){var e=t[Sn];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Tn]||n[Sn]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=xn(t);null!==t;){if(n=t[Sn])return n;t=xn(t)}return e}n=(t=n).parentNode}return null}function En(t){return!(t=t[Sn]||t[Tn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function An(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(a(33))}function jn(t){return t[kn]||null}function Pn(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function Dn(t,e){var n=t.stateNode;if(!n)return null;var r=d(n);if(!r)return null;n=r[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break t;default:t=!1}if(t)return null;if(n&&"function"!=typeof n)throw Error(a(231,e,typeof n));return n}function Mn(t,e,n){(e=Dn(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function In(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=Pn(e);for(e=n.length;0<e--;)Mn(n[e],"captured",t);for(e=0;e<n.length;e++)Mn(n[e],"bubbled",t)}}function Rn(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=Dn(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=re(n._dispatchListeners,e),n._dispatchInstances=re(n._dispatchInstances,t))}function Nn(t){t&&t.dispatchConfig.registrationName&&Rn(t._targetInst,null,t)}function Fn(t){oe(t,In)}var qn=null,Vn=null,Ln=null;function zn(){if(Ln)return Ln;var t,e,n=Vn,r=n.length,o="value"in qn?qn.value:qn.textContent,i=o.length;for(t=0;t<r&&n[t]===o[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===o[i-e];e++);return Ln=o.slice(t,1<e?1-e:void 0)}function Bn(){return!0}function Un(){return!1}function Wn(t,e,n,r){for(var o in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(o)&&((e=t[o])?this[o]=e(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:Un,this.isPropagationStopped=Un,this}function $n(t,e,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,t,e,n,r),o}return new this(t,e,n,r)}function Hn(t){if(!(t instanceof this))throw Error(a(279));t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Gn(t){t.eventPool=[],t.getPooled=$n,t.release=Hn}o(Wn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:Un,destructor:function(){var t,e=this.constructor.Interface;for(t in e)this[t]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Un,this._dispatchInstances=this._dispatchListeners=null}}),Wn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},Wn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var i=new e;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,t),n.extend=r.extend,Gn(n),n},Gn(Wn);var Kn=Wn.extend({data:null}),Qn=Wn.extend({data:null}),Yn=[9,13,27,32],Xn=K&&"CompositionEvent"in window,Jn=null;K&&"documentMode"in document&&(Jn=document.documentMode);var Zn=K&&"TextEvent"in window&&!Jn,tr=K&&(!Xn||Jn&&8<Jn&&11>=Jn),er=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function or(t,e){switch(t){case"keyup":return-1!==Yn.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var ar=!1;var sr={eventTypes:nr,extractEvents:function(t,e,n,r){var o;if(Xn)t:{switch(t){case"compositionstart":var i=nr.compositionStart;break t;case"compositionend":i=nr.compositionEnd;break t;case"compositionupdate":i=nr.compositionUpdate;break t}i=void 0}else ar?or(t,n)&&(i=nr.compositionEnd):"keydown"===t&&229===n.keyCode&&(i=nr.compositionStart);return i?(tr&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(o=zn()):(Vn="value"in(qn=r)?qn.value:qn.textContent,ar=!0)),i=Kn.getPooled(i,e,n,r),o?i.data=o:null!==(o=ir(n))&&(i.data=o),Fn(i),o=i):o=null,(t=Zn?function(t,e){switch(t){case"compositionend":return ir(e);case"keypress":return 32!==e.which?null:(rr=!0,er);case"textInput":return(t=e.data)===er&&rr?null:t;default:return null}}(t,n):function(t,e){if(ar)return"compositionend"===t||!Xn&&or(t,e)?(t=zn(),Ln=Vn=qn=null,ar=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return tr&&"ko"!==e.locale?null:e.data;default:return null}}(t,n))?((e=Qn.getPooled(nr.beforeInput,e,n,r)).data=t,Fn(e)):e=null,null===o?e:null===e?o:[o,e]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function cr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!ur[t.type]:"textarea"===e}var lr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(t,e,n){return(t=Wn.getPooled(lr.change,t,e,n)).type="change",Z(n),Fn(t),t}var pr=null,hr=null;function dr(t){se(t)}function yr(t){if(wt(An(t)))return t}function vr(t,e){if("change"===t)return e}var mr=!1;function gr(){pr&&(pr.detachEvent("onpropertychange",br),hr=pr=null)}function br(t){if("value"===t.propertyName&&yr(hr))if(t=fr(hr,t,ue(t)),it)se(t);else{it=!0;try{et(dr,t)}finally{it=!1,st()}}}function _r(t,e,n){"focus"===t?(gr(),hr=n,(pr=e).attachEvent("onpropertychange",br)):"blur"===t&&gr()}function wr(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return yr(hr)}function xr(t,e){if("click"===t)return yr(e)}function Or(t,e){if("input"===t||"change"===t)return yr(e)}K&&(mr=ce("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:lr,_isInputEventSupported:mr,extractEvents:function(t,e,n,r){var o=e?An(e):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=vr;else if(cr(o))if(mr)a=Or;else{a=wr;var s=_r}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=xr);if(a&&(a=a(t,e)))return fr(a,n,r);s&&s(t,o,e),"blur"===t&&(t=o._wrapperState)&&t.controlled&&"number"===o.type&&Ct(o,"number",o.value)}},kr=Wn.extend({view:null,detail:null}),Tr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cr(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Tr[t])&&!!e[t]}function Er(){return Cr}var Ar=0,jr=0,Pr=!1,Dr=!1,Mr=kr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Er,button:null,buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},movementX:function(t){if("movementX"in t)return t.movementX;var e=Ar;return Ar=t.screenX,Pr?"mousemove"===t.type?t.screenX-e:0:(Pr=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=jr;return jr=t.screenY,Dr?"mousemove"===t.type?t.screenY-e:0:(Dr=!0,0)}}),Ir=Mr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Rr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Nr={eventTypes:Rr,extractEvents:function(t,e,n,r,o){var i="mouseover"===t||"pointerover"===t,a="mouseout"===t||"pointerout"===t;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=e,null!==(e=(e=n.relatedTarget||n.toElement)?Cn(e):null)&&(e!==Zt(e)||5!==e.tag&&6!==e.tag)&&(e=null)):a=null;if(a===e)return null;if("mouseout"===t||"mouseover"===t)var s=Mr,u=Rr.mouseLeave,c=Rr.mouseEnter,l="mouse";else"pointerout"!==t&&"pointerover"!==t||(s=Ir,u=Rr.pointerLeave,c=Rr.pointerEnter,l="pointer");if(t=null==a?i:An(a),i=null==e?i:An(e),(u=s.getPooled(u,a,n,r)).type=l+"leave",u.target=t,u.relatedTarget=i,(n=s.getPooled(c,e,n,r)).type=l+"enter",n.target=i,n.relatedTarget=t,l=e,(r=a)&&l)t:{for(c=l,a=0,t=s=r;t;t=Pn(t))a++;for(t=0,e=c;e;e=Pn(e))t++;for(;0<a-t;)s=Pn(s),a--;for(;0<t-a;)c=Pn(c),t--;for(;a--;){if(s===c||s===c.alternate)break t;s=Pn(s),c=Pn(c)}s=null}else s=null;for(c=s,s=[];r&&r!==c&&(null===(a=r.alternate)||a!==c);)s.push(r),r=Pn(r);for(r=[];l&&l!==c&&(null===(a=l.alternate)||a!==c);)r.push(l),l=Pn(l);for(l=0;l<s.length;l++)Rn(s[l],"bubbled",u);for(l=r.length;0<l--;)Rn(r[l],"captured",n);return 0==(64&o)?[u]:[u,n]}};var Fr="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},qr=Object.prototype.hasOwnProperty;function Vr(t,e){if(Fr(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!qr.call(e,n[r])||!Fr(t[n[r]],e[n[r]]))return!1;return!0}var Lr=K&&"documentMode"in document&&11>=document.documentMode,zr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,Ur=null,Wr=null,$r=!1;function Hr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return $r||null==Br||Br!==ln(n)?null:("selectionStart"in(n=Br)&&dn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},Wr&&Vr(Wr,n)?null:(Wr=n,(t=Wn.getPooled(zr.select,Ur,t,e)).type="select",t.target=Br,Fn(t),t))}var Gr={eventTypes:zr,extractEvents:function(t,e,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{o=Jt(o),i=H.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break t}o=!0}i=!o}if(i)return null;switch(o=e?An(e):window,t){case"focus":(cr(o)||"true"===o.contentEditable)&&(Br=o,Ur=e,Wr=null);break;case"blur":Wr=Ur=Br=null;break;case"mousedown":$r=!0;break;case"contextmenu":case"mouseup":case"dragend":return $r=!1,Hr(n,r);case"selectionchange":if(Lr)break;case"keydown":case"keyup":return Hr(n,r)}return null}},Kr=Wn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=Wn.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Yr=kr.extend({relatedTarget:null});function Xr(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}var Jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},to=kr.extend({key:function(t){if(t.key){var e=Jr[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=Xr(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?Zr[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Er,charCode:function(t){return"keypress"===t.type?Xr(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?Xr(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),eo=Mr.extend({dataTransfer:null}),no=kr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Er}),ro=Wn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),oo=Mr.extend({deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null}),io={eventTypes:Fe,extractEvents:function(t,e,n,r){var o=qe.get(t);if(!o)return null;switch(t){case"keypress":if(0===Xr(n))return null;case"keydown":case"keyup":t=to;break;case"blur":case"focus":t=Yr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":t=Mr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=eo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=no;break;case Ht:case Gt:case Kt:t=Kr;break;case Qt:t=ro;break;case"scroll":t=kr;break;case"wheel":t=oo;break;case"copy":case"cut":case"paste":t=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Ir;break;default:t=Wn}return Fn(e=t.getPooled(o,e,n,r)),e}};if(V)throw Error(a(101));V=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),z(),d=jn,y=En,v=An,G({SimpleEventPlugin:io,EnterLeaveEventPlugin:Nr,ChangeEventPlugin:Sr,SelectEventPlugin:Gr,BeforeInputEventPlugin:sr});var ao=[],so=-1;function uo(t){0>so||(t.current=ao[so],ao[so]=null,so--)}function co(t,e){so++,ao[so]=t.current,t.current=e}var lo={},fo={current:lo},po={current:!1},ho=lo;function yo(t,e){var n=t.type.contextTypes;if(!n)return lo;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=e[o];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function vo(t){return null!=(t=t.childContextTypes)}function mo(){uo(po),uo(fo)}function go(t,e,n){if(fo.current!==lo)throw Error(a(168));co(fo,e),co(po,n)}function bo(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,F(e)||"Unknown",i));return o({},n,{},r)}function _o(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||lo,ho=fo.current,co(fo,t),co(po,po.current),!0}function wo(t,e,n){var r=t.stateNode;if(!r)throw Error(a(169));n?(t=bo(t,e,ho),r.__reactInternalMemoizedMergedChildContext=t,uo(po),uo(fo),co(fo,t)):uo(po),co(po,n)}var xo=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,ko=i.unstable_requestPaint,To=i.unstable_now,Co=i.unstable_getCurrentPriorityLevel,Eo=i.unstable_ImmediatePriority,Ao=i.unstable_UserBlockingPriority,jo=i.unstable_NormalPriority,Po=i.unstable_LowPriority,Do=i.unstable_IdlePriority,Mo={},Io=i.unstable_shouldYield,Ro=void 0!==ko?ko:function(){},No=null,Fo=null,qo=!1,Vo=To(),Lo=1e4>Vo?To:function(){return To()-Vo};function zo(){switch(Co()){case Eo:return 99;case Ao:return 98;case jo:return 97;case Po:return 96;case Do:return 95;default:throw Error(a(332))}}function Bo(t){switch(t){case 99:return Eo;case 98:return Ao;case 97:return jo;case 96:return Po;case 95:return Do;default:throw Error(a(332))}}function Uo(t,e){return t=Bo(t),xo(t,e)}function Wo(t,e,n){return t=Bo(t),Oo(t,e,n)}function $o(t){return null===No?(No=[t],Fo=Oo(Eo,Go)):No.push(t),Mo}function Ho(){if(null!==Fo){var t=Fo;Fo=null,So(t)}Go()}function Go(){if(!qo&&null!==No){qo=!0;var t=0;try{var e=No;Uo(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),No=null}catch(e){throw null!==No&&(No=No.slice(t+1)),Oo(Eo,Ho),e}finally{qo=!1}}}function Ko(t,e,n){return 1073741821-(1+((1073741821-t+e/10)/(n/=10)|0))*n}function Qo(t,e){if(t&&t.defaultProps)for(var n in e=o({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var Yo={current:null},Xo=null,Jo=null,Zo=null;function ti(){Zo=Jo=Xo=null}function ei(t){var e=Yo.current;uo(Yo),t.type._context._currentValue=e}function ni(t,e){for(;null!==t;){var n=t.alternate;if(t.childExpirationTime<e)t.childExpirationTime=e,null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e);else{if(!(null!==n&&n.childExpirationTime<e))break;n.childExpirationTime=e}t=t.return}}function ri(t,e){Xo=t,Zo=Jo=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(t.expirationTime>=e&&(ja=!0),t.firstContext=null)}function oi(t,e){if(Zo!==t&&!1!==e&&0!==e)if("number"==typeof e&&1073741823!==e||(Zo=t,e=1073741823),e={context:t,observedBits:e,next:null},null===Jo){if(null===Xo)throw Error(a(308));Jo=e,Xo.dependencies={expirationTime:0,firstContext:e,responders:null}}else Jo=Jo.next=e;return t._currentValue}var ii=!1;function ai(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function si(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function ui(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function ci(t,e){if(null!==(t=t.updateQueue)){var n=(t=t.shared).pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}}function li(t,e){var n=t.alternate;null!==n&&si(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function fi(t,e,n,r){var i=t.updateQueue;ii=!1;var a=i.baseQueue,s=i.shared.pending;if(null!==s){if(null!==a){var u=a.next;a.next=s.next,s.next=u}a=s,i.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=s))}if(null!==a){u=a.next;var c=i.baseState,l=0,f=null,p=null,h=null;if(null!==u)for(var d=u;;){if((s=d.expirationTime)<r){var y={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===h?(p=h=y,f=c):h=h.next=y,s>l&&(l=s)}else{null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),iu(s,d.suspenseConfig);t:{var v=t,m=d;switch(s=e,y=n,m.tag){case 1:if("function"==typeof(v=m.payload)){c=v.call(y,c,s);break t}c=v;break t;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(s="function"==typeof(v=m.payload)?v.call(y,c,s):v))break t;c=o({},c,s);break t;case 2:ii=!0}}null!==d.callback&&(t.effectTag|=32,null===(s=i.effects)?i.effects=[d]:s.push(d))}if(null===(d=d.next)||d===u){if(null===(s=i.shared.pending))break;d=a.next=s.next,s.next=u,i.baseQueue=a=s,i.shared.pending=null}}null===h?f=c:h.next=p,i.baseState=f,i.baseQueue=h,au(l),t.expirationTime=l,t.memoizedState=c}}function pi(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var hi=g.ReactCurrentBatchConfig,di=(new r.Component).refs;function yi(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:o({},e,n),t.memoizedState=n,0===t.expirationTime&&(t.updateQueue.baseState=n)}var vi={isMounted:function(t){return!!(t=t._reactInternalFiber)&&Zt(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=Hs(),o=hi.suspense;(o=ui(r=Gs(r,t,o),o)).payload=e,null!=n&&(o.callback=n),ci(t,o),Ks(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=Hs(),o=hi.suspense;(o=ui(r=Gs(r,t,o),o)).tag=1,o.payload=e,null!=n&&(o.callback=n),ci(t,o),Ks(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=Hs(),r=hi.suspense;(r=ui(n=Gs(n,t,r),r)).tag=2,null!=e&&(r.callback=e),ci(t,r),Ks(t,n)}};function mi(t,e,n,r,o,i,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,i,a):!e.prototype||!e.prototype.isPureReactComponent||(!Vr(n,r)||!Vr(o,i))}function gi(t,e,n){var r=!1,o=lo,i=e.contextType;return"object"==typeof i&&null!==i?i=oi(i):(o=vo(e)?ho:fo.current,i=(r=null!=(r=e.contextTypes))?yo(t,o):lo),e=new e(n,i),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=vi,t.stateNode=e,e._reactInternalFiber=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=i),e}function bi(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&vi.enqueueReplaceState(e,e.state,null)}function _i(t,e,n,r){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs=di,ai(t);var i=e.contextType;"object"==typeof i&&null!==i?o.context=oi(i):(i=vo(e)?ho:fo.current,o.context=yo(t,i)),fi(t,n,o,r),o.state=t.memoizedState,"function"==typeof(i=e.getDerivedStateFromProps)&&(yi(t,e,i,n),o.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(e=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),e!==o.state&&vi.enqueueReplaceState(o,o.state,null),fi(t,n,o,r),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.effectTag|=4)}var wi=Array.isArray;function xi(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,t));var o=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===o?e.ref:((e=function(t){var e=r.refs;e===di&&(e=r.refs={}),null===t?delete e[o]:e[o]=t})._stringRef=o,e)}if("string"!=typeof t)throw Error(a(284));if(!n._owner)throw Error(a(290,t))}return t}function Oi(t,e){if("textarea"!==t.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,""))}function Si(t){function e(e,n){if(t){var r=e.lastEffect;null!==r?(r.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function o(t,e){return(t=Tu(t,e)).index=0,t.sibling=null,t}function i(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.effectTag=2,n):r:(e.effectTag=2,n):n}function s(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Au(n,t.mode,r)).return=t,e):((e=o(e,n)).return=t,e)}function c(t,e,n,r){return null!==e&&e.elementType===n.type?((r=o(e,n.props)).ref=xi(t,e,n),r.return=t,r):((r=Cu(n.type,n.key,n.props,null,t.mode,r)).ref=xi(t,e,n),r.return=t,r)}function l(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=ju(n,t.mode,r)).return=t,e):((e=o(e,n.children||[])).return=t,e)}function f(t,e,n,r,i){return null===e||7!==e.tag?((e=Eu(n,t.mode,r,i)).return=t,e):((e=o(e,n)).return=t,e)}function p(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=Au(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case w:return(n=Cu(e.type,e.key,e.props,null,t.mode,n)).ref=xi(t,null,e),n.return=t,n;case x:return(e=ju(e,t.mode,n)).return=t,e}if(wi(e)||N(e))return(e=Eu(e,t.mode,n,null)).return=t,e;Oi(t,e)}return null}function h(t,e,n,r){var o=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?n.type===O?f(t,e,n.props.children,r,o):c(t,e,n,r):null;case x:return n.key===o?l(t,e,n,r):null}if(wi(n)||N(n))return null!==o?null:f(t,e,n,r,null);Oi(t,n)}return null}function d(t,e,n,r,o){if("string"==typeof r||"number"==typeof r)return u(e,t=t.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case w:return t=t.get(null===r.key?n:r.key)||null,r.type===O?f(e,t,r.props.children,o,r.key):c(e,t,r,o);case x:return l(e,t=t.get(null===r.key?n:r.key)||null,r,o)}if(wi(r)||N(r))return f(e,t=t.get(n)||null,r,o,null);Oi(e,r)}return null}function y(o,a,s,u){for(var c=null,l=null,f=a,y=a=0,v=null;null!==f&&y<s.length;y++){f.index>y?(v=f,f=null):v=f.sibling;var m=h(o,f,s[y],u);if(null===m){null===f&&(f=v);break}t&&f&&null===m.alternate&&e(o,f),a=i(m,a,y),null===l?c=m:l.sibling=m,l=m,f=v}if(y===s.length)return n(o,f),c;if(null===f){for(;y<s.length;y++)null!==(f=p(o,s[y],u))&&(a=i(f,a,y),null===l?c=f:l.sibling=f,l=f);return c}for(f=r(o,f);y<s.length;y++)null!==(v=d(f,o,y,s[y],u))&&(t&&null!==v.alternate&&f.delete(null===v.key?y:v.key),a=i(v,a,y),null===l?c=v:l.sibling=v,l=v);return t&&f.forEach((function(t){return e(o,t)})),c}function v(o,s,u,c){var l=N(u);if("function"!=typeof l)throw Error(a(150));if(null==(u=l.call(u)))throw Error(a(151));for(var f=l=null,y=s,v=s=0,m=null,g=u.next();null!==y&&!g.done;v++,g=u.next()){y.index>v?(m=y,y=null):m=y.sibling;var b=h(o,y,g.value,c);if(null===b){null===y&&(y=m);break}t&&y&&null===b.alternate&&e(o,y),s=i(b,s,v),null===f?l=b:f.sibling=b,f=b,y=m}if(g.done)return n(o,y),l;if(null===y){for(;!g.done;v++,g=u.next())null!==(g=p(o,g.value,c))&&(s=i(g,s,v),null===f?l=g:f.sibling=g,f=g);return l}for(y=r(o,y);!g.done;v++,g=u.next())null!==(g=d(y,o,v,g.value,c))&&(t&&null!==g.alternate&&y.delete(null===g.key?v:g.key),s=i(g,s,v),null===f?l=g:f.sibling=g,f=g);return t&&y.forEach((function(t){return e(o,t)})),l}return function(t,r,i,u){var c="object"==typeof i&&null!==i&&i.type===O&&null===i.key;c&&(i=i.props.children);var l="object"==typeof i&&null!==i;if(l)switch(i.$$typeof){case w:t:{for(l=i.key,c=r;null!==c;){if(c.key===l){switch(c.tag){case 7:if(i.type===O){n(t,c.sibling),(r=o(c,i.props.children)).return=t,t=r;break t}break;default:if(c.elementType===i.type){n(t,c.sibling),(r=o(c,i.props)).ref=xi(t,c,i),r.return=t,t=r;break t}}n(t,c);break}e(t,c),c=c.sibling}i.type===O?((r=Eu(i.props.children,t.mode,u,i.key)).return=t,t=r):((u=Cu(i.type,i.key,i.props,null,t.mode,u)).ref=xi(t,r,i),u.return=t,t=u)}return s(t);case x:t:{for(c=i.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(t,r.sibling),(r=o(r,i.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=ju(i,t.mode,u)).return=t,t=r}return s(t)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(t,r.sibling),(r=o(r,i)).return=t,t=r):(n(t,r),(r=Au(i,t.mode,u)).return=t,t=r),s(t);if(wi(i))return y(t,r,i,u);if(N(i))return v(t,r,i,u);if(l&&Oi(t,i),void 0===i&&!c)switch(t.tag){case 1:case 0:throw t=t.type,Error(a(152,t.displayName||t.name||"Component"))}return n(t,r)}}var ki=Si(!0),Ti=Si(!1),Ci={},Ei={current:Ci},Ai={current:Ci},ji={current:Ci};function Pi(t){if(t===Ci)throw Error(a(174));return t}function Di(t,e){switch(co(ji,e),co(Ai,t),co(Ei,Ci),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Ft(null,"");break;default:e=Ft(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}uo(Ei),co(Ei,e)}function Mi(){uo(Ei),uo(Ai),uo(ji)}function Ii(t){Pi(ji.current);var e=Pi(Ei.current),n=Ft(e,t.type);e!==n&&(co(Ai,t),co(Ei,n))}function Ri(t){Ai.current===t&&(uo(Ei),uo(Ai))}var Ni={current:0};function Fi(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(64&e.effectTag))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function qi(t,e){return{responder:t,props:e}}var Vi=g.ReactCurrentDispatcher,Li=g.ReactCurrentBatchConfig,zi=0,Bi=null,Ui=null,Wi=null,$i=!1;function Hi(){throw Error(a(321))}function Gi(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Fr(t[n],e[n]))return!1;return!0}function Ki(t,e,n,r,o,i){if(zi=i,Bi=e,e.memoizedState=null,e.updateQueue=null,e.expirationTime=0,Vi.current=null===t||null===t.memoizedState?ma:ga,t=n(r,o),e.expirationTime===zi){i=0;do{if(e.expirationTime=0,!(25>i))throw Error(a(301));i+=1,Wi=Ui=null,e.updateQueue=null,Vi.current=ba,t=n(r,o)}while(e.expirationTime===zi)}if(Vi.current=va,e=null!==Ui&&null!==Ui.next,zi=0,Wi=Ui=Bi=null,$i=!1,e)throw Error(a(300));return t}function Qi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wi?Bi.memoizedState=Wi=t:Wi=Wi.next=t,Wi}function Yi(){if(null===Ui){var t=Bi.alternate;t=null!==t?t.memoizedState:null}else t=Ui.next;var e=null===Wi?Bi.memoizedState:Wi.next;if(null!==e)Wi=e,Ui=t;else{if(null===t)throw Error(a(310));t={memoizedState:(Ui=t).memoizedState,baseState:Ui.baseState,baseQueue:Ui.baseQueue,queue:Ui.queue,next:null},null===Wi?Bi.memoizedState=Wi=t:Wi=Wi.next=t}return Wi}function Xi(t,e){return"function"==typeof e?e(t):e}function Ji(t){var e=Yi(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=Ui,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=s=i=null,c=o;do{var l=c.expirationTime;if(l<zi){var f={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===u?(s=u=f,i=r):u=u.next=f,l>Bi.expirationTime&&(Bi.expirationTime=l,au(l))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),iu(l,c.suspenseConfig),r=c.eagerReducer===t?c.eagerState:t(r,c.action);c=c.next}while(null!==c&&c!==o);null===u?i=r:u.next=s,Fr(r,e.memoizedState)||(ja=!0),e.memoizedState=r,e.baseState=i,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function Zi(t){var e=Yi(),n=e.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=t;var r=n.dispatch,o=n.pending,i=e.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=t(i,s.action),s=s.next}while(s!==o);Fr(i,e.memoizedState)||(ja=!0),e.memoizedState=i,null===e.baseQueue&&(e.baseState=i),n.lastRenderedState=i}return[i,r]}function ta(t){var e=Qi();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:Xi,lastRenderedState:t}).dispatch=ya.bind(null,Bi,t),[e.memoizedState,t]}function ea(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Bi.updateQueue)?(e={lastEffect:null},Bi.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function na(){return Yi().memoizedState}function ra(t,e,n,r){var o=Qi();Bi.effectTag|=t,o.memoizedState=ea(1|e,n,void 0,void 0===r?null:r)}function oa(t,e,n,r){var o=Yi();r=void 0===r?null:r;var i=void 0;if(null!==Ui){var a=Ui.memoizedState;if(i=a.destroy,null!==r&&Gi(r,a.deps))return void ea(e,n,i,r)}Bi.effectTag|=t,o.memoizedState=ea(1|e,n,i,r)}function ia(t,e){return ra(516,4,t,e)}function aa(t,e){return oa(516,4,t,e)}function sa(t,e){return oa(4,2,t,e)}function ua(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function ca(t,e,n){return n=null!=n?n.concat([t]):null,oa(4,2,ua.bind(null,e,t),n)}function la(){}function fa(t,e){return Qi().memoizedState=[t,void 0===e?null:e],t}function pa(t,e){var n=Yi();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Gi(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ha(t,e){var n=Yi();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Gi(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function da(t,e,n){var r=zo();Uo(98>r?98:r,(function(){t(!0)})),Uo(97<r?97:r,(function(){var r=Li.suspense;Li.suspense=void 0===e?null:e;try{t(!1),n()}finally{Li.suspense=r}}))}function ya(t,e,n){var r=Hs(),o=hi.suspense;o={expirationTime:r=Gs(r,t,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=e.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),e.pending=o,i=t.alternate,t===Bi||null!==i&&i===Bi)$i=!0,o.expirationTime=zi,Bi.expirationTime=zi;else{if(0===t.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=e.lastRenderedReducer))try{var a=e.lastRenderedState,s=i(a,n);if(o.eagerReducer=i,o.eagerState=s,Fr(s,a))return}catch(t){}Ks(t,r)}}var va={readContext:oi,useCallback:Hi,useContext:Hi,useEffect:Hi,useImperativeHandle:Hi,useLayoutEffect:Hi,useMemo:Hi,useReducer:Hi,useRef:Hi,useState:Hi,useDebugValue:Hi,useResponder:Hi,useDeferredValue:Hi,useTransition:Hi},ma={readContext:oi,useCallback:fa,useContext:oi,useEffect:ia,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,ra(4,2,ua.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ra(4,2,t,e)},useMemo:function(t,e){var n=Qi();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Qi();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t=(t=r.queue={pending:null,dispatch:null,lastRenderedReducer:t,lastRenderedState:e}).dispatch=ya.bind(null,Bi,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Qi().memoizedState=t},useState:ta,useDebugValue:la,useResponder:qi,useDeferredValue:function(t,e){var n=ta(t),r=n[0],o=n[1];return ia((function(){var n=Li.suspense;Li.suspense=void 0===e?null:e;try{o(t)}finally{Li.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ta(!1),n=e[0];return e=e[1],[fa(da.bind(null,e,t),[e,t]),n]}},ga={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:ha,useReducer:Ji,useRef:na,useState:function(){return Ji(Xi)},useDebugValue:la,useResponder:qi,useDeferredValue:function(t,e){var n=Ji(Xi),r=n[0],o=n[1];return aa((function(){var n=Li.suspense;Li.suspense=void 0===e?null:e;try{o(t)}finally{Li.suspense=n}}),[t,e]),r},useTransition:function(t){var e=Ji(Xi),n=e[0];return e=e[1],[pa(da.bind(null,e,t),[e,t]),n]}},ba={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:ca,useLayoutEffect:sa,useMemo:ha,useReducer:Zi,useRef:na,useState:function(){return Zi(Xi)},useDebugValue:la,useResponder:qi,useDeferredValue:function(t,e){var n=Zi(Xi),r=n[0],o=n[1];return aa((function(){var n=Li.suspense;Li.suspense=void 0===e?null:e;try{o(t)}finally{Li.suspense=n}}),[t,e]),r},useTransition:function(t){var e=Zi(Xi),n=e[0];return e=e[1],[pa(da.bind(null,e,t),[e,t]),n]}},_a=null,wa=null,xa=!1;function Oa(t,e){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=e,n.return=t,n.effectTag=8,null!==t.lastEffect?(t.lastEffect.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n}function Sa(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,!0);case 13:default:return!1}}function ka(t){if(xa){var e=wa;if(e){var n=e;if(!Sa(t,e)){if(!(e=wn(n.nextSibling))||!Sa(t,e))return t.effectTag=-1025&t.effectTag|2,xa=!1,void(_a=t);Oa(_a,n)}_a=t,wa=wn(e.firstChild)}else t.effectTag=-1025&t.effectTag|2,xa=!1,_a=t}}function Ta(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;_a=t}function Ca(t){if(t!==_a)return!1;if(!xa)return Ta(t),xa=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!gn(e,t.memoizedProps))for(e=wa;e;)Oa(t,e),e=wn(e.nextSibling);if(Ta(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(a(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){wa=wn(t.nextSibling);break t}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}wa=null}}else wa=_a?wn(t.stateNode.nextSibling):null;return!0}function Ea(){wa=_a=null,xa=!1}var Aa=g.ReactCurrentOwner,ja=!1;function Pa(t,e,n,r){e.child=null===t?Ti(e,null,n,r):ki(e,t.child,n,r)}function Da(t,e,n,r,o){n=n.render;var i=e.ref;return ri(e,o),r=Ki(t,e,n,r,i,o),null===t||ja?(e.effectTag|=1,Pa(t,e,r,o),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=o&&(t.expirationTime=0),Ka(t,e,o))}function Ma(t,e,n,r,o,i){if(null===t){var a=n.type;return"function"!=typeof a||ku(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Cu(n.type,null,r,null,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Ia(t,e,a,r,o,i))}return a=t.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:Vr)(o,r)&&t.ref===e.ref)?Ka(t,e,i):(e.effectTag|=1,(t=Tu(a,r)).ref=e.ref,t.return=e,e.child=t)}function Ia(t,e,n,r,o,i){return null!==t&&Vr(t.memoizedProps,r)&&t.ref===e.ref&&(ja=!1,o<i)?(e.expirationTime=t.expirationTime,Ka(t,e,i)):Na(t,e,n,r,i)}function Ra(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function Na(t,e,n,r,o){var i=vo(n)?ho:fo.current;return i=yo(e,i),ri(e,o),n=Ki(t,e,n,r,i,o),null===t||ja?(e.effectTag|=1,Pa(t,e,n,o),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=o&&(t.expirationTime=0),Ka(t,e,o))}function Fa(t,e,n,r,o){if(vo(n)){var i=!0;_o(e)}else i=!1;if(ri(e,o),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),gi(e,n,r),_i(e,n,r,o),r=!0;else if(null===t){var a=e.stateNode,s=e.memoizedProps;a.props=s;var u=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=oi(c):c=yo(e,c=vo(n)?ho:fo.current);var l=n.getDerivedStateFromProps,f="function"==typeof l||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bi(e,a,r,c),ii=!1;var p=e.memoizedState;a.state=p,fi(e,r,a,o),u=e.memoizedState,s!==r||p!==u||po.current||ii?("function"==typeof l&&(yi(e,n,l,r),u=e.memoizedState),(s=ii||mi(e,n,s,r,p,u,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.effectTag|=4)):("function"==typeof a.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=u),a.props=r,a.state=u,a.context=c,r=s):("function"==typeof a.componentDidMount&&(e.effectTag|=4),r=!1)}else a=e.stateNode,si(t,e),s=e.memoizedProps,a.props=e.type===e.elementType?s:Qo(e.type,s),u=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=oi(c):c=yo(e,c=vo(n)?ho:fo.current),(f="function"==typeof(l=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==c)&&bi(e,a,r,c),ii=!1,u=e.memoizedState,a.state=u,fi(e,r,a,o),p=e.memoizedState,s!==r||u!==p||po.current||ii?("function"==typeof l&&(yi(e,n,l,r),p=e.memoizedState),(l=ii||mi(e,n,s,r,u,p,c))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,c)),"function"==typeof a.componentDidUpdate&&(e.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=p),a.props=r,a.state=p,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),r=!1);return qa(t,e,n,r,i,o)}function qa(t,e,n,r,o,i){Ra(t,e);var a=0!=(64&e.effectTag);if(!r&&!a)return o&&wo(e,n,!1),Ka(t,e,i);r=e.stateNode,Aa.current=e;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.effectTag|=1,null!==t&&a?(e.child=ki(e,t.child,null,i),e.child=ki(e,null,s,i)):Pa(t,e,s,i),e.memoizedState=r.state,o&&wo(e,n,!0),e.child}function Va(t){var e=t.stateNode;e.pendingContext?go(0,e.pendingContext,e.pendingContext!==e.context):e.context&&go(0,e.context,!1),Di(t,e.containerInfo)}var La,za,Ba,Ua={dehydrated:null,retryTime:0};function Wa(t,e,n){var r,o=e.mode,i=e.pendingProps,a=Ni.current,s=!1;if((r=0!=(64&e.effectTag))||(r=0!=(2&a)&&(null===t||null!==t.memoizedState)),r?(s=!0,e.effectTag&=-65):null!==t&&null===t.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),co(Ni,1&a),null===t){if(void 0!==i.fallback&&ka(e),s){if(s=i.fallback,(i=Eu(null,o,0,null)).return=e,0==(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,i.child=t;null!==t;)t.return=i,t=t.sibling;return(n=Eu(s,o,n,null)).return=e,i.sibling=n,e.memoizedState=Ua,e.child=i,n}return o=i.children,e.memoizedState=null,e.child=Ti(e,null,o,n)}if(null!==t.memoizedState){if(o=(t=t.child).sibling,s){if(i=i.fallback,(n=Tu(t,t.pendingProps)).return=e,0==(2&e.mode)&&(s=null!==e.memoizedState?e.child.child:e.child)!==t.child)for(n.child=s;null!==s;)s.return=n,s=s.sibling;return(o=Tu(o,i)).return=e,n.sibling=o,n.childExpirationTime=0,e.memoizedState=Ua,e.child=n,o}return n=ki(e,t.child,i.children,n),e.memoizedState=null,e.child=n}if(t=t.child,s){if(s=i.fallback,(i=Eu(null,o,0,null)).return=e,i.child=t,null!==t&&(t.return=i),0==(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,i.child=t;null!==t;)t.return=i,t=t.sibling;return(n=Eu(s,o,n,null)).return=e,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,e.memoizedState=Ua,e.child=i,n}return e.memoizedState=null,e.child=ki(e,t,i.children,n)}function $a(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e),ni(t.return,e)}function Ha(t,e,n,r,o,i){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Ga(t,e,n){var r=e.pendingProps,o=r.revealOrder,i=r.tail;if(Pa(t,e,r.children,n),0!=(2&(r=Ni.current)))r=1&r|2,e.effectTag|=64;else{if(null!==t&&0!=(64&t.effectTag))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&$a(t,n);else if(19===t.tag)$a(t,n);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(co(Ni,r),0==(2&e.mode))e.memoizedState=null;else switch(o){case"forwards":for(n=e.child,o=null;null!==n;)null!==(t=n.alternate)&&null===Fi(t)&&(o=n),n=n.sibling;null===(n=o)?(o=e.child,e.child=null):(o=n.sibling,n.sibling=null),Ha(e,!1,o,n,i,e.lastEffect);break;case"backwards":for(n=null,o=e.child,e.child=null;null!==o;){if(null!==(t=o.alternate)&&null===Fi(t)){e.child=o;break}t=o.sibling,o.sibling=n,n=o,o=t}Ha(e,!0,n,null,i,e.lastEffect);break;case"together":Ha(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Ka(t,e,n){null!==t&&(e.dependencies=t.dependencies);var r=e.expirationTime;if(0!==r&&au(r),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child)throw Error(a(153));if(null!==e.child){for(n=Tu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Tu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Qa(t,e){switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Ya(t,e,n){var r=e.pendingProps;switch(e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return vo(e.type)&&mo(),null;case 3:return Mi(),uo(po),uo(fo),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||!Ca(e)||(e.effectTag|=4),null;case 5:Ri(e),n=Pi(ji.current);var i=e.type;if(null!==t&&null!=e.stateNode)za(t,e,i,r,n),t.ref!==e.ref&&(e.effectTag|=128);else{if(!r){if(null===e.stateNode)throw Error(a(166));return null}if(t=Pi(Ei.current),Ca(e)){r=e.stateNode,i=e.type;var s=e.memoizedProps;switch(r[Sn]=e,r[kn]=s,i){case"iframe":case"object":case"embed":Ge("load",r);break;case"video":case"audio":for(t=0;t<Yt.length;t++)Ge(Yt[t],r);break;case"source":Ge("error",r);break;case"img":case"image":case"link":Ge("error",r),Ge("load",r);break;case"form":Ge("reset",r),Ge("submit",r);break;case"details":Ge("toggle",r);break;case"input":Ot(r,s),Ge("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ge("invalid",r),un(n,"onChange");break;case"textarea":Pt(r,s),Ge("invalid",r),un(n,"onChange")}for(var u in on(i,s),t=null,s)if(s.hasOwnProperty(u)){var c=s[u];"children"===u?"string"==typeof c?r.textContent!==c&&(t=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(t=["children",""+c]):$.hasOwnProperty(u)&&null!=c&&un(n,u)}switch(i){case"input":_t(r),Tt(r,s,!0);break;case"textarea":_t(r),Mt(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=cn)}n=t,e.updateQueue=n,null!==n&&(e.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,t===sn&&(t=Nt(i)),t===sn?"script"===i?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=u.createElement(i,{is:r.is}):(t=u.createElement(i),"select"===i&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,i),t[Sn]=e,t[kn]=r,La(t,e),e.stateNode=t,u=an(i,r),i){case"iframe":case"object":case"embed":Ge("load",t),c=r;break;case"video":case"audio":for(c=0;c<Yt.length;c++)Ge(Yt[c],t);c=r;break;case"source":Ge("error",t),c=r;break;case"img":case"image":case"link":Ge("error",t),Ge("load",t),c=r;break;case"form":Ge("reset",t),Ge("submit",t),c=r;break;case"details":Ge("toggle",t),c=r;break;case"input":Ot(t,r),c=xt(t,r),Ge("invalid",t),un(n,"onChange");break;case"option":c=Et(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},c=o({},r,{value:void 0}),Ge("invalid",t),un(n,"onChange");break;case"textarea":Pt(t,r),c=jt(t,r),Ge("invalid",t),un(n,"onChange");break;default:c=r}on(i,c);var l=c;for(s in l)if(l.hasOwnProperty(s)){var f=l[s];"style"===s?nn(t,f):"dangerouslySetInnerHTML"===s?null!=(f=f?f.__html:void 0)&&Vt(t,f):"children"===s?"string"==typeof f?("textarea"!==i||""!==f)&&Lt(t,f):"number"==typeof f&&Lt(t,""+f):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&($.hasOwnProperty(s)?null!=f&&un(n,s):null!=f&&mt(t,s,f,u))}switch(i){case"input":_t(t),Tt(t,r,!1);break;case"textarea":_t(t),Mt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+gt(r.value));break;case"select":t.multiple=!!r.multiple,null!=(n=r.value)?At(t,!!r.multiple,n,!1):null!=r.defaultValue&&At(t,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof c.onClick&&(t.onclick=cn)}mn(i,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Ba(0,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(a(166));n=Pi(ji.current),Pi(Ei.current),Ca(e)?(n=e.stateNode,r=e.memoizedProps,n[Sn]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=e,e.stateNode=n)}return null;case 13:return uo(Ni),r=e.memoizedState,0!=(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&Ca(e):(r=null!==(i=t.memoizedState),n||null===i||null!==(i=t.child.sibling)&&(null!==(s=e.firstEffect)?(e.firstEffect=i,i.nextEffect=s):(e.firstEffect=e.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!=(1&Ni.current)?Cs===_s&&(Cs=ws):(Cs!==_s&&Cs!==ws||(Cs=xs),0!==Ds&&null!==Ss&&(Mu(Ss,Ts),Iu(Ss,Ds)))),(n||r)&&(e.effectTag|=4),null);case 4:return Mi(),null;case 10:return ei(e),null;case 17:return vo(e.type)&&mo(),null;case 19:if(uo(Ni),null===(r=e.memoizedState))return null;if(i=0!=(64&e.effectTag),null===(s=r.rendering)){if(i)Qa(r,!1);else if(Cs!==_s||null!==t&&0!=(64&t.effectTag))for(s=e.child;null!==s;){if(null!==(t=Fi(s))){for(e.effectTag|=64,Qa(r,!1),null!==(i=t.updateQueue)&&(e.updateQueue=i,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)s=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(t=i.alternate)?(i.childExpirationTime=0,i.expirationTime=s,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=t.childExpirationTime,i.expirationTime=t.expirationTime,i.child=t.child,i.memoizedProps=t.memoizedProps,i.memoizedState=t.memoizedState,i.updateQueue=t.updateQueue,s=t.dependencies,i.dependencies=null===s?null:{expirationTime:s.expirationTime,firstContext:s.firstContext,responders:s.responders}),r=r.sibling;return co(Ni,1&Ni.current|2),e.child}s=s.sibling}}else{if(!i)if(null!==(t=Fi(s))){if(e.effectTag|=64,i=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Lo()-r.renderingStartTime>r.tailExpiration&&1<n&&(e.effectTag|=64,i=!0,Qa(r,!1),e.expirationTime=e.childExpirationTime=n-1);r.isBackwards?(s.sibling=e.child,e.child=s):(null!==(n=r.last)?n.sibling=s:e.child=s,r.last=s)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Lo()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Lo(),n.sibling=null,e=Ni.current,co(Ni,i?1&e|2:1&e),n):null}throw Error(a(156,e.tag))}function Xa(t){switch(t.tag){case 1:vo(t.type)&&mo();var e=t.effectTag;return 4096&e?(t.effectTag=-4097&e|64,t):null;case 3:if(Mi(),uo(po),uo(fo),0!=(64&(e=t.effectTag)))throw Error(a(285));return t.effectTag=-4097&e|64,t;case 5:return Ri(t),null;case 13:return uo(Ni),4096&(e=t.effectTag)?(t.effectTag=-4097&e|64,t):null;case 19:return uo(Ni),null;case 4:return Mi(),null;case 10:return ei(t),null;default:return null}}function Ja(t,e){return{value:t,source:e,stack:q(e)}}La=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},za=function(t,e,n,r,i){var a=t.memoizedProps;if(a!==r){var s,u,c=e.stateNode;switch(Pi(Ei.current),t=null,n){case"input":a=xt(c,a),r=xt(c,r),t=[];break;case"option":a=Et(c,a),r=Et(c,r),t=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),t=[];break;case"textarea":a=jt(c,a),r=jt(c,r),t=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(c.onclick=cn)}for(s in on(n,r),n=null,a)if(!r.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if("style"===s)for(u in c=a[s])c.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==s&&"children"!==s&&"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&($.hasOwnProperty(s)?t||(t=[]):(t=t||[]).push(s,null));for(s in r){var l=r[s];if(c=null!=a?a[s]:void 0,r.hasOwnProperty(s)&&l!==c&&(null!=l||null!=c))if("style"===s)if(c){for(u in c)!c.hasOwnProperty(u)||l&&l.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in l)l.hasOwnProperty(u)&&c[u]!==l[u]&&(n||(n={}),n[u]=l[u])}else n||(t||(t=[]),t.push(s,n)),n=l;else"dangerouslySetInnerHTML"===s?(l=l?l.__html:void 0,c=c?c.__html:void 0,null!=l&&c!==l&&(t=t||[]).push(s,l)):"children"===s?c===l||"string"!=typeof l&&"number"!=typeof l||(t=t||[]).push(s,""+l):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&($.hasOwnProperty(s)?(null!=l&&un(i,s),t||c===l||(t=[])):(t=t||[]).push(s,l))}n&&(t=t||[]).push("style",n),i=t,(e.updateQueue=i)&&(e.effectTag|=4)}},Ba=function(t,e,n,r){n!==r&&(e.effectTag|=4)};var Za="function"==typeof WeakSet?WeakSet:Set;function ts(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=q(n)),null!==n&&F(n.type),e=e.value,null!==t&&1===t.tag&&F(t.type);try{console.error(e)}catch(t){setTimeout((function(){throw t}))}}function es(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){gu(t,e)}else e.current=null}function ns(t,e){switch(e.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&e.effectTag&&null!==t){var n=t.memoizedProps,r=t.memoizedState;e=(t=e.stateNode).getSnapshotBeforeUpdate(e.elementType===e.type?n:Qo(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rs(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==e)}}function os(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function is(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:return void os(3,n);case 1:if(t=n.stateNode,4&n.effectTag)if(null===e)t.componentDidMount();else{var r=n.elementType===n.type?e.memoizedProps:Qo(n.type,e.memoizedProps);t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate)}return void(null!==(e=n.updateQueue)&&pi(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}pi(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.effectTag&&mn(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ne(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function as(t,e,n){switch("function"==typeof xu&&xu(e),e.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(t=e.updateQueue)&&null!==(t=t.lastEffect)){var r=t.next;Uo(97<n?97:n,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var o=e;try{n()}catch(t){gu(o,t)}}t=t.next}while(t!==r)}))}break;case 1:es(e),"function"==typeof(n=e.stateNode).componentWillUnmount&&function(t,e){try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){gu(t,e)}}(e,n);break;case 5:es(e);break;case 4:ls(t,e,n)}}function ss(t){var e=t.alternate;t.return=null,t.child=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.alternate=null,t.firstEffect=null,t.lastEffect=null,t.pendingProps=null,t.memoizedProps=null,t.stateNode=null,null!==e&&ss(e)}function us(t){return 5===t.tag||3===t.tag||4===t.tag}function cs(t){t:{for(var e=t.return;null!==e;){if(us(e)){var n=e;break t}e=e.return}throw Error(a(160))}switch(e=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:e=e.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&(Lt(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||us(n.return)){n=null;break t}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue e;if(null===n.child||4===n.tag)continue e;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break t}}r?function t(e,n,r){var o=e.tag,i=5===o||6===o;if(i)e=i?e.stateNode:e.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(8===r.nodeType?(n=r.parentNode).insertBefore(e,r):(n=r).appendChild(e),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=cn));else if(4!==o&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e):function t(e,n,r){var o=e.tag,i=5===o||6===o;if(i)e=i?e.stateNode:e.stateNode.instance,n?r.insertBefore(e,n):r.appendChild(e);else if(4!==o&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,n,e)}function ls(t,e,n){for(var r,o,i=e,s=!1;;){if(!s){s=i.return;t:for(;;){if(null===s)throw Error(a(160));switch(r=s.stateNode,s.tag){case 5:o=!1;break t;case 3:case 4:r=r.containerInfo,o=!0;break t}s=s.return}s=!0}if(5===i.tag||6===i.tag){t:for(var u=t,c=i,l=n,f=c;;)if(as(u,f,l),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===c)break t;for(;null===f.sibling;){if(null===f.return||f.return===c)break t;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,c=i.stateNode,8===u.nodeType?u.parentNode.removeChild(c):u.removeChild(c)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(as(t,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function fs(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:return void rs(3,e);case 1:return;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,o=null!==t?t.memoizedProps:r;t=e.type;var i=e.updateQueue;if(e.updateQueue=null,null!==i){for(n[kn]=r,"input"===t&&"radio"===r.type&&null!=r.name&&St(n,r),an(t,o),e=an(t,r),o=0;o<i.length;o+=2){var s=i[o],u=i[o+1];"style"===s?nn(n,u):"dangerouslySetInnerHTML"===s?Vt(n,u):"children"===s?Lt(n,u):mt(n,s,u,e)}switch(t){case"input":kt(n,r);break;case"textarea":Dt(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(t=r.value)?At(n,!!r.multiple,t,!1):e!==!!r.multiple&&(null!=r.defaultValue?At(n,!!r.multiple,r.defaultValue,!0):At(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===e.stateNode)throw Error(a(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((e=e.stateNode).hydrate&&(e.hydrate=!1,Ne(e.containerInfo)));case 12:return;case 13:if(n=e,null===e.memoizedState?r=!1:(r=!0,n=e.child,Is=Lo()),null!==n)t:for(t=n;;){if(5===t.tag)i=t.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=t.stateNode,o=null!=(o=t.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=en("display",o));else if(6===t.tag)t.stateNode.nodeValue=r?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(i=t.child.sibling).return=t,t=i;continue}if(null!==t.child){t.child.return=t,t=t.child;continue}}if(t===n)break;for(;null===t.sibling;){if(null===t.return||t.return===n)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}return void ps(e);case 19:return void ps(e);case 17:return}throw Error(a(163))}function ps(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new Za),e.forEach((function(e){var r=_u.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function ds(t,e,n){(n=ui(n,null)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Ns||(Ns=!0,Fs=r),ts(t,e)},n}function ys(t,e,n){(n=ui(n,null)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var o=e.value;n.payload=function(){return ts(t,e),r(o)}}var i=t.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===qs?qs=new Set([this]):qs.add(this),ts(t,e));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}var vs,ms=Math.ceil,gs=g.ReactCurrentDispatcher,bs=g.ReactCurrentOwner,_s=0,ws=3,xs=4,Os=0,Ss=null,ks=null,Ts=0,Cs=_s,Es=null,As=1073741823,js=1073741823,Ps=null,Ds=0,Ms=!1,Is=0,Rs=null,Ns=!1,Fs=null,qs=null,Vs=!1,Ls=null,zs=90,Bs=null,Us=0,Ws=null,$s=0;function Hs(){return 0!=(48&Os)?1073741821-(Lo()/10|0):0!==$s?$s:$s=1073741821-(Lo()/10|0)}function Gs(t,e,n){if(0==(2&(e=e.mode)))return 1073741823;var r=zo();if(0==(4&e))return 99===r?1073741823:1073741822;if(0!=(16&Os))return Ts;if(null!==n)t=Ko(t,0|n.timeoutMs||5e3,250);else switch(r){case 99:t=1073741823;break;case 98:t=Ko(t,150,100);break;case 97:case 96:t=Ko(t,5e3,250);break;case 95:t=2;break;default:throw Error(a(326))}return null!==Ss&&t===Ts&&--t,t}function Ks(t,e){if(50<Us)throw Us=0,Ws=null,Error(a(185));if(null!==(t=Qs(t,e))){var n=zo();1073741823===e?0!=(8&Os)&&0==(48&Os)?Zs(t):(Xs(t),0===Os&&Ho()):Xs(t),0==(4&Os)||98!==n&&99!==n||(null===Bs?Bs=new Map([[t,e]]):(void 0===(n=Bs.get(t))||n>e)&&Bs.set(t,e))}}function Qs(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var r=t.return,o=null;if(null===r&&3===t.tag)o=t.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<e&&(r.childExpirationTime=e),null!==n&&n.childExpirationTime<e&&(n.childExpirationTime=e),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Ss===o&&(au(e),Cs===xs&&Mu(o,Ts)),Iu(o,e)),o}function Ys(t){var e=t.lastExpiredTime;if(0!==e)return e;if(!Du(t,e=t.firstPendingTime))return e;var n=t.lastPingedTime;return 2>=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function Xs(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=$o(Zs.bind(null,t));else{var e=Ys(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=Hs();if(1073741823===e?r=99:1===e||2===e?r=95:r=0>=(r=10*(1073741821-e)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=t.callbackPriority;if(t.callbackExpirationTime===e&&o>=r)return;n!==Mo&&So(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?$o(Zs.bind(null,t)):Wo(r,Js.bind(null,t),{timeout:10*(1073741821-e)-Lo()}),t.callbackNode=e}}}function Js(t,e){if($s=0,e)return Ru(t,e=Hs()),Xs(t),null;var n=Ys(t);if(0!==n){if(e=t.callbackNode,0!=(48&Os))throw Error(a(327));if(yu(),t===Ss&&n===Ts||nu(t,n),null!==ks){var r=Os;Os|=16;for(var o=ou();;)try{uu();break}catch(e){ru(t,e)}if(ti(),Os=r,gs.current=o,1===Cs)throw e=Es,nu(t,n),Mu(t,n),Xs(t),e;if(null===ks)switch(o=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=Cs,Ss=null,r){case _s:case 1:throw Error(a(345));case 2:Ru(t,2<n?2:n);break;case ws:if(Mu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=fu(o)),1073741823===As&&10<(o=Is+500-Lo())){if(Ms){var i=t.lastPingedTime;if(0===i||i>=n){t.lastPingedTime=n,nu(t,n);break}}if(0!==(i=Ys(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=bn(pu.bind(null,t),o);break}pu(t);break;case xs:if(Mu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=fu(o)),Ms&&(0===(o=t.lastPingedTime)||o>=n)){t.lastPingedTime=n,nu(t,n);break}if(0!==(o=Ys(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==js?r=10*(1073741821-js)-Lo():1073741823===As?r=0:(r=10*(1073741821-As)-5e3,0>(r=(o=Lo())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ms(r/1960))-r)&&(r=n)),10<r){t.timeoutHandle=bn(pu.bind(null,t),r);break}pu(t);break;case 5:if(1073741823!==As&&null!==Ps){i=As;var s=Ps;if(0>=(r=0|s.busyMinDurationMs)?r=0:(o=0|s.busyDelayMs,r=(i=Lo()-(10*(1073741821-i)-(0|s.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Mu(t,n),t.timeoutHandle=bn(pu.bind(null,t),r);break}}pu(t);break;default:throw Error(a(329))}if(Xs(t),t.callbackNode===e)return Js.bind(null,t)}}return null}function Zs(t){var e=t.lastExpiredTime;if(e=0!==e?e:1073741823,0!=(48&Os))throw Error(a(327));if(yu(),t===Ss&&e===Ts||nu(t,e),null!==ks){var n=Os;Os|=16;for(var r=ou();;)try{su();break}catch(e){ru(t,e)}if(ti(),Os=n,gs.current=r,1===Cs)throw n=Es,nu(t,e),Mu(t,e),Xs(t),n;if(null!==ks)throw Error(a(261));t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,Ss=null,pu(t),Xs(t)}return null}function tu(t,e){var n=Os;Os|=1;try{return t(e)}finally{0===(Os=n)&&Ho()}}function eu(t,e){var n=Os;Os&=-2,Os|=8;try{return t(e)}finally{0===(Os=n)&&Ho()}}function nu(t,e){t.finishedWork=null,t.finishedExpirationTime=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,_n(n)),null!==ks)for(n=ks.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&mo();break;case 3:Mi(),uo(po),uo(fo);break;case 5:Ri(r);break;case 4:Mi();break;case 13:case 19:uo(Ni);break;case 10:ei(r)}n=n.return}Ss=t,ks=Tu(t.current,null),Ts=e,Cs=_s,Es=null,js=As=1073741823,Ps=null,Ds=0,Ms=!1}function ru(t,e){for(;;){try{if(ti(),Vi.current=va,$i)for(var n=Bi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(zi=0,Wi=Ui=Bi=null,$i=!1,null===ks||null===ks.return)return Cs=1,Es=e,ks=null;t:{var o=t,i=ks.return,a=ks,s=e;if(e=Ts,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s;if(0==(2&a.mode)){var c=a.alternate;c?(a.memoizedState=c.memoizedState,a.expirationTime=c.expirationTime):a.memoizedState=null}var l=0!=(1&Ni.current),f=i;do{var p;if(p=13===f.tag){var h=f.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var d=f.memoizedProps;p=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!l)}}if(p){var y=f.updateQueue;if(null===y){var v=new Set;v.add(u),f.updateQueue=v}else y.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var m=ui(1073741823,null);m.tag=2,ci(a,m)}a.expirationTime=1073741823;break t}s=void 0,a=e;var g=o.pingCache;if(null===g?(g=o.pingCache=new hs,s=new Set,g.set(u,s)):void 0===(s=g.get(u))&&(s=new Set,g.set(u,s)),!s.has(a)){s.add(a);var b=bu.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=e;break t}f=f.return}while(null!==f);s=Error((F(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+q(a))}5!==Cs&&(Cs=2),s=Ja(s,a),f=i;do{switch(f.tag){case 3:u=s,f.effectTag|=4096,f.expirationTime=e,li(f,ds(f,u,e));break t;case 1:u=s;var _=f.type,w=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===qs||!qs.has(w)))){f.effectTag|=4096,f.expirationTime=e,li(f,ys(f,u,e));break t}}f=f.return}while(null!==f)}ks=lu(ks)}catch(t){e=t;continue}break}}function ou(){var t=gs.current;return gs.current=va,null===t?va:t}function iu(t,e){t<As&&2<t&&(As=t),null!==e&&t<js&&2<t&&(js=t,Ps=e)}function au(t){t>Ds&&(Ds=t)}function su(){for(;null!==ks;)ks=cu(ks)}function uu(){for(;null!==ks&&!Io();)ks=cu(ks)}function cu(t){var e=vs(t.alternate,t,Ts);return t.memoizedProps=t.pendingProps,null===e&&(e=lu(t)),bs.current=null,e}function lu(t){ks=t;do{var e=ks.alternate;if(t=ks.return,0==(2048&ks.effectTag)){if(e=Ya(e,ks,Ts),1===Ts||1!==ks.childExpirationTime){for(var n=0,r=ks.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}ks.childExpirationTime=n}if(null!==e)return e;null!==t&&0==(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=ks.firstEffect),null!==ks.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=ks.firstEffect),t.lastEffect=ks.lastEffect),1<ks.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=ks:t.firstEffect=ks,t.lastEffect=ks))}else{if(null!==(e=Xa(ks)))return e.effectTag&=2047,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=2048)}if(null!==(e=ks.sibling))return e;ks=t}while(null!==ks);return Cs===_s&&(Cs=5),null}function fu(t){var e=t.expirationTime;return e>(t=t.childExpirationTime)?e:t}function pu(t){var e=zo();return Uo(99,hu.bind(null,t,e)),null}function hu(t,e){do{yu()}while(null!==Ls);if(0!=(48&Os))throw Error(a(327));var n=t.finishedWork,r=t.finishedExpirationTime;if(null===n)return null;if(t.finishedWork=null,t.finishedExpirationTime=0,n===t.current)throw Error(a(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var o=fu(n);if(t.firstPendingTime=o,r<=t.lastSuspendedTime?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:r<=t.firstSuspendedTime&&(t.firstSuspendedTime=r-1),r<=t.lastPingedTime&&(t.lastPingedTime=0),r<=t.lastExpiredTime&&(t.lastExpiredTime=0),t===Ss&&(ks=Ss=null,Ts=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=Os;Os|=32,bs.current=null,yn=He;var s=hn();if(dn(s)){if("selectionStart"in s)var u={start:s.selectionStart,end:s.selectionEnd};else t:{var c=(u=(u=s.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(c&&0!==c.rangeCount){u=c.anchorNode;var l=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{u.nodeType,f.nodeType}catch(t){u=null;break t}var p=0,h=-1,d=-1,y=0,v=0,m=s,g=null;e:for(;;){for(var b;m!==u||0!==l&&3!==m.nodeType||(h=p+l),m!==f||0!==c&&3!==m.nodeType||(d=p+c),3===m.nodeType&&(p+=m.nodeValue.length),null!==(b=m.firstChild);)g=m,m=b;for(;;){if(m===s)break e;if(g===u&&++y===l&&(h=p),g===f&&++v===c&&(d=p),null!==(b=m.nextSibling))break;g=(m=g).parentNode}m=b}u=-1===h||-1===d?null:{start:h,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;vn={activeElementDetached:null,focusedElem:s,selectionRange:u},He=!1,Rs=o;do{try{du()}catch(t){if(null===Rs)throw Error(a(330));gu(Rs,t),Rs=Rs.nextEffect}}while(null!==Rs);Rs=o;do{try{for(s=t,u=e;null!==Rs;){var _=Rs.effectTag;if(16&_&&Lt(Rs.stateNode,""),128&_){var w=Rs.alternate;if(null!==w){var x=w.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&_){case 2:cs(Rs),Rs.effectTag&=-3;break;case 6:cs(Rs),Rs.effectTag&=-3,fs(Rs.alternate,Rs);break;case 1024:Rs.effectTag&=-1025;break;case 1028:Rs.effectTag&=-1025,fs(Rs.alternate,Rs);break;case 4:fs(Rs.alternate,Rs);break;case 8:ls(s,l=Rs,u),ss(l)}Rs=Rs.nextEffect}}catch(t){if(null===Rs)throw Error(a(330));gu(Rs,t),Rs=Rs.nextEffect}}while(null!==Rs);if(x=vn,w=hn(),_=x.focusedElem,u=x.selectionRange,w!==_&&_&&_.ownerDocument&&function t(e,n){return!(!e||!n)&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}(_.ownerDocument.documentElement,_)){null!==u&&dn(_)&&(w=u.start,void 0===(x=u.end)&&(x=w),"selectionStart"in _?(_.selectionStart=w,_.selectionEnd=Math.min(x,_.value.length)):(x=(w=_.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),l=_.textContent.length,s=Math.min(u.start,l),u=void 0===u.end?s:Math.min(u.end,l),!x.extend&&s>u&&(l=u,u=s,s=l),l=pn(_,s),f=pn(_,u),l&&f&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==f.node||x.focusOffset!==f.offset)&&((w=w.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),s>u?(x.addRange(w),x.extend(f.node,f.offset)):(w.setEnd(f.node,f.offset),x.addRange(w))))),w=[];for(x=_;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_<w.length;_++)(x=w[_]).element.scrollLeft=x.left,x.element.scrollTop=x.top}He=!!yn,vn=yn=null,t.current=n,Rs=o;do{try{for(_=t;null!==Rs;){var O=Rs.effectTag;if(36&O&&is(_,Rs.alternate,Rs),128&O){w=void 0;var S=Rs.ref;if(null!==S){var k=Rs.stateNode;switch(Rs.tag){case 5:w=k;break;default:w=k}"function"==typeof S?S(w):S.current=w}}Rs=Rs.nextEffect}}catch(t){if(null===Rs)throw Error(a(330));gu(Rs,t),Rs=Rs.nextEffect}}while(null!==Rs);Rs=null,Ro(),Os=i}else t.current=n;if(Vs)Vs=!1,Ls=t,zs=e;else for(Rs=o;null!==Rs;)e=Rs.nextEffect,Rs.nextEffect=null,Rs=e;if(0===(e=t.firstPendingTime)&&(qs=null),1073741823===e?t===Ws?Us++:(Us=0,Ws=t):Us=0,"function"==typeof wu&&wu(n.stateNode,r),Xs(t),Ns)throw Ns=!1,t=Fs,Fs=null,t;return 0!=(8&Os)||Ho(),null}function du(){for(;null!==Rs;){var t=Rs.effectTag;0!=(256&t)&&ns(Rs.alternate,Rs),0==(512&t)||Vs||(Vs=!0,Wo(97,(function(){return yu(),null}))),Rs=Rs.nextEffect}}function yu(){if(90!==zs){var t=97<zs?97:zs;return zs=90,Uo(t,vu)}}function vu(){if(null===Ls)return!1;var t=Ls;if(Ls=null,0!=(48&Os))throw Error(a(331));var e=Os;for(Os|=32,t=t.current.firstEffect;null!==t;){try{var n=t;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rs(5,n),os(5,n)}}catch(e){if(null===t)throw Error(a(330));gu(t,e)}n=t.nextEffect,t.nextEffect=null,t=n}return Os=e,Ho(),!0}function mu(t,e,n){ci(t,e=ds(t,e=Ja(n,e),1073741823)),null!==(t=Qs(t,1073741823))&&Xs(t)}function gu(t,e){if(3===t.tag)mu(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){mu(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===qs||!qs.has(r))){ci(n,t=ys(n,t=Ja(e,t),1073741823)),null!==(n=Qs(n,1073741823))&&Xs(n);break}}n=n.return}}function bu(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),Ss===t&&Ts===n?Cs===xs||Cs===ws&&1073741823===As&&Lo()-Is<500?nu(t,Ts):Ms=!0:Du(t,n)&&(0!==(e=t.lastPingedTime)&&e<n||(t.lastPingedTime=n,Xs(t)))}function _u(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(e=Gs(e=Hs(),t,null)),null!==(t=Qs(t,e))&&Xs(t)}vs=function(t,e,n){var r=e.expirationTime;if(null!==t){var o=e.pendingProps;if(t.memoizedProps!==o||po.current)ja=!0;else{if(r<n){switch(ja=!1,e.tag){case 3:Va(e),Ea();break;case 5:if(Ii(e),4&e.mode&&1!==n&&o.hidden)return e.expirationTime=e.childExpirationTime=1,null;break;case 1:vo(e.type)&&_o(e);break;case 4:Di(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value,o=e.type._context,co(Yo,o._currentValue),o._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(r=e.child.childExpirationTime)&&r>=n?Wa(t,e,n):(co(Ni,1&Ni.current),null!==(e=Ka(t,e,n))?e.sibling:null);co(Ni,1&Ni.current);break;case 19:if(r=e.childExpirationTime>=n,0!=(64&t.effectTag)){if(r)return Ga(t,e,n);e.effectTag|=64}if(null!==(o=e.memoizedState)&&(o.rendering=null,o.tail=null),co(Ni,Ni.current),!r)return null}return Ka(t,e,n)}ja=!1}}else ja=!1;switch(e.expirationTime=0,e.tag){case 2:if(r=e.type,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,o=yo(e,fo.current),ri(e,n),o=Ki(null,e,r,t,o,n),e.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,vo(r)){var i=!0;_o(e)}else i=!1;e.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(e);var s=r.getDerivedStateFromProps;"function"==typeof s&&yi(e,r,s,t),o.updater=vi,e.stateNode=o,o._reactInternalFiber=e,_i(e,r,t,n),e=qa(null,e,r,!0,i,n)}else e.tag=0,Pa(null,e,o,n),e=e.child;return e;case 16:t:{if(o=e.elementType,null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),t=e.pendingProps,function(t){if(-1===t._status){t._status=0;var e=t._ctor;e=e(),t._result=e,e.then((function(e){0===t._status&&(e=e.default,t._status=1,t._result=e)}),(function(e){0===t._status&&(t._status=2,t._result=e)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,e.type=o,i=e.tag=function(t){if("function"==typeof t)return ku(t)?1:0;if(null!=t){if((t=t.$$typeof)===A)return 11;if(t===D)return 14}return 2}(o),t=Qo(o,t),i){case 0:e=Na(null,e,o,t,n);break t;case 1:e=Fa(null,e,o,t,n);break t;case 11:e=Da(null,e,o,t,n);break t;case 14:e=Ma(null,e,o,Qo(o.type,t),r,n);break t}throw Error(a(306,o,""))}return e;case 0:return r=e.type,o=e.pendingProps,Na(t,e,r,o=e.elementType===r?o:Qo(r,o),n);case 1:return r=e.type,o=e.pendingProps,Fa(t,e,r,o=e.elementType===r?o:Qo(r,o),n);case 3:if(Va(e),r=e.updateQueue,null===t||null===r)throw Error(a(282));if(r=e.pendingProps,o=null!==(o=e.memoizedState)?o.element:null,si(t,e),fi(e,r,null,n),(r=e.memoizedState.element)===o)Ea(),e=Ka(t,e,n);else{if((o=e.stateNode.hydrate)&&(wa=wn(e.stateNode.containerInfo.firstChild),_a=e,o=xa=!0),o)for(n=Ti(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Pa(t,e,r,n),Ea();e=e.child}return e;case 5:return Ii(e),null===t&&ka(e),r=e.type,o=e.pendingProps,i=null!==t?t.memoizedProps:null,s=o.children,gn(r,o)?s=null:null!==i&&gn(r,i)&&(e.effectTag|=16),Ra(t,e),4&e.mode&&1!==n&&o.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Pa(t,e,s,n),e=e.child),e;case 6:return null===t&&ka(e),null;case 13:return Wa(t,e,n);case 4:return Di(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=ki(e,null,r,n):Pa(t,e,r,n),e.child;case 11:return r=e.type,o=e.pendingProps,Da(t,e,r,o=e.elementType===r?o:Qo(r,o),n);case 7:return Pa(t,e,e.pendingProps,n),e.child;case 8:case 12:return Pa(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,o=e.pendingProps,s=e.memoizedProps,i=o.value;var u=e.type._context;if(co(Yo,u._currentValue),u._currentValue=i,null!==s)if(u=s.value,0===(i=Fr(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(s.children===o.children&&!po.current){e=Ka(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var c=u.dependencies;if(null!==c){s=u.child;for(var l=c.firstContext;null!==l;){if(l.context===r&&0!=(l.observedBits&i)){1===u.tag&&((l=ui(n,null)).tag=2,ci(u,l)),u.expirationTime<n&&(u.expirationTime=n),null!==(l=u.alternate)&&l.expirationTime<n&&(l.expirationTime=n),ni(u.return,n),c.expirationTime<n&&(c.expirationTime=n);break}l=l.next}}else s=10===u.tag&&u.type===e.type?null:u.child;if(null!==s)s.return=u;else for(s=u;null!==s;){if(s===e){s=null;break}if(null!==(u=s.sibling)){u.return=s.return,s=u;break}s=s.return}u=s}Pa(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,r=(i=e.pendingProps).children,ri(e,n),r=r(o=oi(o,i.unstable_observedBits)),e.effectTag|=1,Pa(t,e,r,n),e.child;case 14:return i=Qo(o=e.type,e.pendingProps),Ma(t,e,o,i=Qo(o.type,i),r,n);case 15:return Ia(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,o=e.pendingProps,o=e.elementType===r?o:Qo(r,o),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,vo(r)?(t=!0,_o(e)):t=!1,ri(e,n),gi(e,r,o),_i(e,r,o,n),qa(null,e,r,!0,t,n);case 19:return Ga(t,e,n)}throw Error(a(156,e.tag))};var wu=null,xu=null;function Ou(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(t,e,n,r){return new Ou(t,e,n,r)}function ku(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Tu(t,e){var n=t.alternate;return null===n?((n=Su(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=t.childExpirationTime,n.expirationTime=t.expirationTime,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{expirationTime:e.expirationTime,firstContext:e.firstContext,responders:e.responders},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Cu(t,e,n,r,o,i){var s=2;if(r=t,"function"==typeof t)ku(t)&&(s=1);else if("string"==typeof t)s=5;else t:switch(t){case O:return Eu(n.children,o,i,e);case E:s=8,o|=7;break;case S:s=8,o|=1;break;case k:return(t=Su(12,n,e,8|o)).elementType=k,t.type=k,t.expirationTime=i,t;case j:return(t=Su(13,n,e,o)).type=j,t.elementType=j,t.expirationTime=i,t;case P:return(t=Su(19,n,e,o)).elementType=P,t.expirationTime=i,t;default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case T:s=10;break t;case C:s=9;break t;case A:s=11;break t;case D:s=14;break t;case M:s=16,r=null;break t;case I:s=22;break t}throw Error(a(130,null==t?t:typeof t,""))}return(e=Su(s,n,e,o)).elementType=t,e.type=r,e.expirationTime=i,e}function Eu(t,e,n,r){return(t=Su(7,t,r,e)).expirationTime=n,t}function Au(t,e,n){return(t=Su(6,t,null,e)).expirationTime=n,t}function ju(t,e,n){return(e=Su(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Pu(t,e,n){this.tag=e,this.current=null,this.containerInfo=t,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Du(t,e){var n=t.firstSuspendedTime;return t=t.lastSuspendedTime,0!==n&&n>=e&&t<=e}function Mu(t,e){var n=t.firstSuspendedTime,r=t.lastSuspendedTime;n<e&&(t.firstSuspendedTime=e),(r>e||0===n)&&(t.lastSuspendedTime=e),e<=t.lastPingedTime&&(t.lastPingedTime=0),e<=t.lastExpiredTime&&(t.lastExpiredTime=0)}function Iu(t,e){e>t.firstPendingTime&&(t.firstPendingTime=e);var n=t.firstSuspendedTime;0!==n&&(e>=n?t.firstSuspendedTime=t.lastSuspendedTime=t.nextKnownPendingLevel=0:e>=t.lastSuspendedTime&&(t.lastSuspendedTime=e+1),e>t.nextKnownPendingLevel&&(t.nextKnownPendingLevel=e))}function Ru(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function Nu(t,e,n,r){var o=e.current,i=Hs(),s=hi.suspense;i=Gs(i,o,s);t:if(n){e:{if(Zt(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(vo(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var c=n.type;if(vo(c)){n=bo(n,c,u);break t}}n=u}else n=lo;return null===e.context?e.context=n:e.pendingContext=n,(e=ui(i,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),ci(o,e),Ks(o,i),i}function Fu(t){if(!(t=t.current).child)return null;switch(t.child.tag){case 5:default:return t.child.stateNode}}function qu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime<e&&(t.retryTime=e)}function Vu(t,e){qu(t,e),(t=t.alternate)&&qu(t,e)}function Lu(t,e,n){var r=new Pu(t,e,n=null!=n&&!0===n.hydrate),o=Su(3,null,null,2===e?7:1===e?3:0);r.current=o,o.stateNode=r,ai(o),t[Tn]=r.current,n&&0!==e&&function(t,e){var n=Jt(e);Te.forEach((function(t){de(t,e,n)})),Ce.forEach((function(t){de(t,e,n)}))}(0,9===t.nodeType?t:t.ownerDocument),this._internalRoot=r}function zu(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function Bu(t,e,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var t=Fu(a);s.call(t)}}Nu(e,a,t,o)}else{if(i=n._reactRootContainer=function(t,e){if(e||(e=!(!(e=t?9===t.nodeType?t.documentElement:t.firstChild:null)||1!==e.nodeType||!e.hasAttribute("data-reactroot"))),!e)for(var n;n=t.lastChild;)t.removeChild(n);return new Lu(t,0,e?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var u=o;o=function(){var t=Fu(a);u.call(t)}}eu((function(){Nu(e,a,t,o)}))}return Fu(a)}function Uu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Wu(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!zu(e))throw Error(a(200));return Uu(t,e,null,n)}Lu.prototype.render=function(t){Nu(t,this._internalRoot,null,null)},Lu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;Nu(null,t,null,(function(){e[Tn]=null}))},ye=function(t){if(13===t.tag){var e=Ko(Hs(),150,100);Ks(t,e),Vu(t,e)}},ve=function(t){13===t.tag&&(Ks(t,3),Vu(t,3))},me=function(t){if(13===t.tag){var e=Hs();Ks(t,e=Gs(e,t,null)),Vu(t,e)}},Q=function(t,e,n){switch(e){case"input":if(kt(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var o=jn(r);if(!o)throw Error(a(90));wt(r),kt(r,o)}}}break;case"textarea":Dt(t,n);break;case"select":null!=(e=n.value)&&At(t,!!n.multiple,e,!1)}},et=tu,nt=function(t,e,n,r,o){var i=Os;Os|=4;try{return Uo(98,t.bind(null,e,n,r,o))}finally{0===(Os=i)&&Ho()}},rt=function(){0==(49&Os)&&(function(){if(null!==Bs){var t=Bs;Bs=null,t.forEach((function(t,e){Ru(e,t),Xs(e)})),Ho()}}(),yu())},ot=function(t,e){var n=Os;Os|=2;try{return t(e)}finally{0===(Os=n)&&Ho()}};var $u,Hu,Gu={Events:[En,An,jn,G,W,Fn,function(t){oe(t,Nn)},Z,tt,Xe,se,yu,{current:!1}]};Hu=($u={findFiberByHostInstance:Cn,bundleType:0,version:"16.13.0",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(t){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)return!0;try{var n=e.inject(t);wu=function(t){try{e.onCommitFiberRoot(n,t,void 0,64==(64&t.current.effectTag))}catch(t){}},xu=function(t){try{e.onCommitFiberUnmount(n,t)}catch(t){}}}catch(t){}}(o({},$u,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:g.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=ne(t))?null:t.stateNode},findFiberByHostInstance:function(t){return Hu?Hu(t):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gu,e.createPortal=Wu,e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternalFiber;if(void 0===e){if("function"==typeof t.render)throw Error(a(188));throw Error(a(268,Object.keys(t)))}return t=null===(t=ne(e))?null:t.stateNode},e.flushSync=function(t,e){if(0!=(48&Os))throw Error(a(187));var n=Os;Os|=1;try{return Uo(99,t.bind(null,e))}finally{Os=n,Ho()}},e.hydrate=function(t,e,n){if(!zu(e))throw Error(a(200));return Bu(null,t,e,!0,n)},e.render=function(t,e,n){if(!zu(e))throw Error(a(200));return Bu(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!zu(t))throw Error(a(40));return!!t._reactRootContainer&&(eu((function(){Bu(null,null,t,!1,(function(){t._reactRootContainer=null,t[Tn]=null}))})),!0)},e.unstable_batchedUpdates=tu,e.unstable_createPortal=function(t,e){return Wu(t,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!zu(n))throw Error(a(200));if(null==t||void 0===t._reactInternalFiber)throw Error(a(38));return Bu(t,e,n,!1,r)},e.version="16.13.0"},function(t,e,n){"use strict";t.exports=n(1008)},function(t,e,n){"use strict";var r,o,i,a,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,c=null,l=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(l,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(l,0))},o=function(t,e){c=setTimeout(t,e)},i=function(){clearTimeout(c)},a=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var p=window.performance,h=window.Date,d=window.setTimeout,y=window.clearTimeout;if("undefined"!=typeof console){var v=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)e.unstable_now=function(){return p.now()};else{var m=h.now();e.unstable_now=function(){return h.now()-m}}var g=!1,b=null,_=-1,w=5,x=0;a=function(){return e.unstable_now()>=x},s=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):w=0<t?Math.floor(1e3/t):5};var O=new MessageChannel,S=O.port2;O.port1.onmessage=function(){if(null!==b){var t=e.unstable_now();x=t+w;try{b(!0,t)?S.postMessage(null):(g=!1,b=null)}catch(t){throw S.postMessage(null),t}}else g=!1},r=function(t){b=t,g||(g=!0,S.postMessage(null))},o=function(t,n){_=d((function(){t(e.unstable_now())}),n)},i=function(){y(_),_=-1}}function k(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,o=t[r];if(!(void 0!==o&&0<E(o,e)))break t;t[r]=e,t[n]=o,n=r}}function T(t){return void 0===(t=t[0])?null:t}function C(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,o=t.length;r<o;){var i=2*(r+1)-1,a=t[i],s=i+1,u=t[s];if(void 0!==a&&0>E(a,n))void 0!==u&&0>E(u,a)?(t[r]=u,t[s]=n,r=s):(t[r]=a,t[i]=n,r=i);else{if(!(void 0!==u&&0>E(u,n)))break t;t[r]=u,t[s]=n,r=s}}}return e}return null}function E(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var A=[],j=[],P=1,D=null,M=3,I=!1,R=!1,N=!1;function F(t){for(var e=T(j);null!==e;){if(null===e.callback)C(j);else{if(!(e.startTime<=t))break;C(j),e.sortIndex=e.expirationTime,k(A,e)}e=T(j)}}function q(t){if(N=!1,F(t),!R)if(null!==T(A))R=!0,r(V);else{var e=T(j);null!==e&&o(q,e.startTime-t)}}function V(t,n){R=!1,N&&(N=!1,i()),I=!0;var r=M;try{for(F(n),D=T(A);null!==D&&(!(D.expirationTime>n)||t&&!a());){var s=D.callback;if(null!==s){D.callback=null,M=D.priorityLevel;var u=s(D.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?D.callback=u:D===T(A)&&C(A),F(n)}else C(A);D=T(A)}if(null!==D)var c=!0;else{var l=T(j);null!==l&&o(q,l.startTime-n),c=!1}return c}finally{D=null,M=r,I=!1}}function L(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){R||I||(R=!0,r(V))},e.unstable_getCurrentPriorityLevel=function(){return M},e.unstable_getFirstCallbackNode=function(){return T(A)},e.unstable_next=function(t){switch(M){case 1:case 2:case 3:var e=3;break;default:e=M}var n=M;M=e;try{return t()}finally{M=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=z,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=M;M=t;try{return e()}finally{M=n}},e.unstable_scheduleCallback=function(t,n,a){var s=e.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?s+u:s,a="number"==typeof a.timeout?a.timeout:L(t)}else a=L(t),u=s;return t={id:P++,callback:n,priorityLevel:t,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>s?(t.sortIndex=u,k(j,t),null===T(A)&&t===T(j)&&(N?i():N=!0,o(q,u-s))):(t.sortIndex=a,k(A,t),R||I||(R=!0,r(V))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();F(t);var n=T(A);return n!==D&&null!==D&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<D.expirationTime||a()},e.unstable_wrapCallback=function(t){var e=M;return function(){var n=M;M=e;try{return t.apply(this,arguments)}finally{M=n}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118;function _(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case o:switch(t=t.type){case f:case p:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case h:case c:return t;default:return e}}case m:case v:case i:return e}}}function w(t){return _(t)===p}e.typeOf=_,e.AsyncMode=f,e.ConcurrentMode=p,e.ContextConsumer=l,e.ContextProvider=c,e.Element=o,e.ForwardRef=h,e.Fragment=a,e.Lazy=m,e.Memo=v,e.Portal=i,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===p||t===u||t===s||t===d||t===y||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===c||t.$$typeof===l||t.$$typeof===h||t.$$typeof===g||t.$$typeof===b)},e.isAsyncMode=function(t){return w(t)||_(t)===f},e.isConcurrentMode=w,e.isContextConsumer=function(t){return _(t)===l},e.isContextProvider=function(t){return _(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===o},e.isForwardRef=function(t){return _(t)===h},e.isFragment=function(t){return _(t)===a},e.isLazy=function(t){return _(t)===m},e.isMemo=function(t){return _(t)===v},e.isPortal=function(t){return _(t)===i},e.isProfiler=function(t){return _(t)===u},e.isStrictMode=function(t){return _(t)===s},e.isSuspense=function(t){return _(t)===d}},function(t,e,n){"use strict";var r="URLSearchParams"in self,o="Symbol"in self&&"iterator"in Symbol,i="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in self,s="ArrayBuffer"in self;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function p(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function y(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function v(t){var e=new FileReader,n=y(e);return e.readAsArrayBuffer(t),n}function m(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=m(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=m(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,e,n,r=d(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=y(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=l(t),e=f(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[l(t)]},h.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},h.prototype.set=function(t,e){this.map[l(t)]=f(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),p(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),p(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),p(t)},o&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var n,r,o=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,o||null==t._bodyInit||(o=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}})),e}function x(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},g.call(_.prototype),g.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},x.error=function(){var t=new x(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];x.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new x(null,{status:e,headers:{location:t}})};var S=self.DOMException;try{new S}catch(t){(S=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),S.prototype.constructor=S}function k(t,e){return new Promise((function(n,r){var o=new _(t,e);if(o.signal&&o.signal.aborted)return r(new S("Aborted","AbortError"));var a=new XMLHttpRequest;function s(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new x(o,r))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new S("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&i&&(a.responseType="blob"),o.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),o.signal&&(o.signal.addEventListener("abort",s),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",s)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,self.fetch||(self.fetch=k,self.Headers=h,self.Request=_,self.Response=x)},function(t,e,n){var r,o,i;o=[],void 0===(i="function"==typeof(r=function(){return function(){function t(t,e){if(this.app="loki",this.options=e||{},void 0!==t&&(this.app=t),this.catalog=null,!this.checkAvailability())throw new Error("indexedDB does not seem to be supported for your environment")}function e(t){this.db=null,this.initializeLokiCatalog(t)}return t.prototype.closeDatabase=function(){this.catalog&&this.catalog.db&&(this.catalog.db.close(),this.catalog.db=null)},t.prototype.checkAvailability=function(){return!("undefined"==typeof indexedDB||!indexedDB)},t.prototype.loadDatabase=function(t,n){var r=this.app,o=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,t,(function(t){if("function"==typeof n){if(0===t.id)return void n(null);n(t.val)}else console.log(t.val)})):this.catalog=new e((function(e){o.catalog=e,o.loadDatabase(t,n)}))},t.prototype.loadKey=t.prototype.loadDatabase,t.prototype.saveDatabase=function(t,n,r){var o=this.app,i=this;function a(t){t&&!0===t.success?r(null):r(new Error("Error saving database")),i.options.closeAfterSave&&i.closeDatabase()}null!==this.catalog&&null!==this.catalog.db?this.catalog.setAppKey(o,t,n,a):this.catalog=new e((function(e){i.saveDatabase(t,n,a)}))},t.prototype.saveKey=t.prototype.saveDatabase,t.prototype.deleteDatabase=function(t,n){var r=this.app,o=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,t,(function(t){var e=t.id;0!==e?o.catalog.deleteAppKey(e,n):"function"==typeof n&&n({success:!0})})):this.catalog=new e((function(e){o.catalog=e,o.deleteDatabase(t,n)}))},t.prototype.deleteKey=t.prototype.deleteDatabase,t.prototype.deleteDatabasePartitions=function(t){var e=this;this.getDatabaseList((function(n){n.forEach((function(n){n.startsWith(t)&&e.deleteDatabase(n)}))}))},t.prototype.getDatabaseList=function(t){var n=this.app,r=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKeys(n,(function(e){for(var n=[],r=0;r<e.length;r++)n.push(e[r].key);"function"==typeof t?t(n):n.forEach((function(t){console.log(t)}))})):this.catalog=new e((function(e){r.catalog=e,r.getDatabaseList(t)}))},t.prototype.getKeyList=t.prototype.getDatabaseList,t.prototype.getCatalogSummary=function(t){this.app;var n=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAllKeys((function(e){for(var n,r,o,i,a,s=[],u=0;u<e.length;u++)o=(n=e[u]).app||"",i=n.key||"",a=n.val||"",r=2*o.length+2*i.length+a.length+1,s.push({app:n.app,key:n.key,size:r});"function"==typeof t?t(s):s.forEach((function(t){console.log(t)}))})):this.catalog=new e((function(e){n.catalog=e,n.getCatalogSummary(t)}))},e.prototype.initializeLokiCatalog=function(t){var e=indexedDB.open("LokiCatalog",1),n=this;e.onupgradeneeded=function(t){var e=t.target.result;if(e.objectStoreNames.contains("LokiAKV")&&e.deleteObjectStore("LokiAKV"),!e.objectStoreNames.contains("LokiAKV")){var n=e.createObjectStore("LokiAKV",{keyPath:"id",autoIncrement:!0});n.createIndex("app","app",{unique:!1}),n.createIndex("key","key",{unique:!1}),n.createIndex("appkey","appkey",{unique:!0})}},e.onsuccess=function(e){n.db=e.target.result,"function"==typeof t&&t(n)},e.onerror=function(t){throw t}},e.prototype.getAppKey=function(t,e,n){var r,o=t+","+e,i=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("appkey").get(o);i.onsuccess=(r=n,function(t){var e=t.target.result;null==e&&(e={id:0,success:!1}),"function"==typeof r?r(e):console.log(e)}),i.onerror=function(t){return function(e){if("function"!=typeof t)throw e;t({id:0,success:!1})}}(n)},e.prototype.getAppKeyById=function(t,e,n){this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").get(t).onsuccess=function(t,e){return function(n){"function"==typeof e?e(n.target.result,t):console.log(n.target.result)}}(n,e)},e.prototype.setAppKey=function(t,e,n,r){var o,i=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV"),a=i.index("appkey"),s=t+","+e,u=a.get(s);u.onsuccess=function(o){var a=o.target.result;null==a?a={app:t,key:e,appkey:t+","+e,val:n}:a.val=n;var s,c=i.put(a);c.onerror=(s=r,function(t){"function"==typeof s?s({success:!1}):(console.error("LokiCatalog.setAppKey (set) onerror"),console.error(u.error))}),c.onsuccess=function(t){return function(e){"function"==typeof t&&t({success:!0})}}(r)},u.onerror=(o=r,function(t){"function"==typeof o?o({success:!1}):(console.error("LokiCatalog.setAppKey (get) onerror"),console.error(u.error))})},e.prototype.deleteAppKey=function(t,e){var n,r=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV").delete(t);r.onsuccess=(n=e,function(t){"function"==typeof n&&n({success:!0})}),r.onerror=function(t){return function(e){"function"==typeof t?t({success:!1}):(console.error("LokiCatalog.deleteAppKey raised onerror"),console.error(r.error))}}(e)},e.prototype.getAppKeys=function(t,e){var n,r=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("app"),o=IDBKeyRange.only(t),i=r.openCursor(o);i.onsuccess=function(t,e){return function(n){var r=n.target.result;if(r){var o=r.value;t.push(o),r.continue()}else"function"==typeof e?e(t):console.log(t)}}([],e),i.onerror=(n=e,function(t){"function"==typeof n?n(null):(console.error("LokiCatalog.getAppKeys raised onerror"),console.error(t))})},e.prototype.getAllKeys=function(t){var e,n=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").openCursor();n.onsuccess=function(t,e){return function(n){var r=n.target.result;if(r){var o=r.value;t.push(o),r.continue()}else"function"==typeof e?e(t):console.log(t)}}([],t),n.onerror=(e=t,function(t){"function"==typeof e&&e(null)})},t}()})?r.apply(e,o):r)||(t.exports=i)},function(t,e){},,function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e){function n(e,r){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,r)}t.exports=n},function(t,e,n){"use strict";var r=n(1017);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultProps=e.propTypes=void 0;var r,o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=n(76),a=(r=i)&&r.__esModule?r:{default:r},s=n(75);function u(t){var e=o({},s.stateProps);return delete e[t],Object.keys(e)}var c={};Object.keys(s.iStates).forEach((function(t){c[t]=a.default.bool}));var l={as:a.default.any.isRequired,children:a.default.node,normal:a.default.oneOfType([a.default.object,a.default.oneOf(u("normal"))]),hover:a.default.oneOfType([a.default.object,a.default.oneOf(u("hover"))]),active:a.default.oneOfType([a.default.object,a.default.oneOf(u("active"))]),hoverActive:a.default.oneOfType([a.default.object,a.default.oneOf(u("hoverActive"))]),touchActive:a.default.oneOfType([a.default.object,a.default.oneOf(u("touchActive"))]),keyActive:a.default.oneOfType([a.default.object,a.default.oneOf(u("keyActive"))]),focus:a.default.oneOfType([a.default.object,a.default.oneOf(u("focus"))]),focusFromTab:a.default.oneOfType([a.default.object,a.default.oneOf(u("focusFromTab"))]),focusFromTouch:a.default.oneOfType([a.default.object,a.default.oneOf(u("focusFromTouch"))]),focusFromMouse:a.default.oneOfType([a.default.object,a.default.oneOf(u("focusFromMouse"))]),forceState:a.default.shape({iState:a.default.oneOf(Object.keys(s.iStates)),focus:a.default.oneOf([!1,"tab","mouse","touch"])}),initialState:a.default.shape({iState:a.default.oneOf(Object.keys(s.iStates)),focus:a.default.oneOf([!1,"tab","mouse","touch"])}),style:a.default.object,className:a.default.string,wrapperStyle:a.default.object,wrapperClassName:a.default.string,onStateChange:a.default.func,setStateCallback:a.default.func,onClick:a.default.func,onTapTwo:a.default.func,onTapThree:a.default.func,onTapFour:a.default.func,tapTimeCutoff:a.default.number,onMouseEnter:a.default.func,onMouseLeave:a.default.func,onMouseMove:a.default.func,onMouseDown:a.default.func,onMouseUp:a.default.func,onTouchStart:a.default.func,onTouchMove:a.default.func,onTouchEnd:a.default.func,onTouchCancel:a.default.func,onFocus:a.default.func,onBlur:a.default.func,onKeyDown:a.default.func,onKeyUp:a.default.func,mutableProps:a.default.bool,refDOMNode:a.default.func,tabIndex:a.default.string,useBrowserOutlineFocus:a.default.bool,useBrowserCursor:a.default.bool,touchActiveTapOnly:a.default.bool,extraTouchNoTap:a.default.bool,focusToggleOff:a.default.bool,stylePriority:a.default.shape(c),nonContainedChild:a.default.bool,interactiveChild:a.default.bool},f={tapTimeCutoff:s.defaultTapTimeCutoff};e.propTypes=l,e.defaultProps=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(1021)),o=s(n(1022)),i=s(n(1023)),a=s(n(1024));function s(t){return t&&t.__esModule?t:{default:t}}var u={state:{detectHover:r.default,detectPointer:o.default,detectTouchEvents:i.default,detectPassiveEvents:a.default},update:function(){u.state.detectHover.update(),u.state.detectPointer.update(),u.state.detectTouchEvents.update(),u.state.detectPassiveEvents.update(),u.updateOnlyOwnProperties()},updateOnlyOwnProperties:function(){if("undefined"!=typeof window){u.passiveEvents=u.state.detectPassiveEvents.hasSupport||!1,u.hasTouch=u.state.detectTouchEvents.hasSupport||!1,u.deviceType=(e=u.hasTouch,n=u.state.detectHover.anyHover,r=u.state.detectPointer.anyFine,o=u.state,e&&(n||r)?"hybrid":e&&Object.keys(o.detectHover).filter((function(t){return"update"!==t})).every((function(t){return!1===o.detectHover[t]}))&&Object.keys(o.detectPointer).filter((function(t){return"update"!==t})).every((function(t){return!1===o.detectPointer[t]}))?window.navigator&&/android/.test(window.navigator.userAgent.toLowerCase())?"touchOnly":"hybrid":e?"touchOnly":"mouseOnly"),u.hasMouse="touchOnly"!==u.deviceType,u.primaryInput=("mouseOnly"===u.deviceType?"mouse":"touchOnly"===u.deviceType&&"touch")||u.state.detectPointer.fine&&"mouse"||u.state.detectPointer.coarse&&"touch"||"mouse";/windows/.test(window.navigator.userAgent.toLowerCase())&&/chrome/.test(window.navigator.userAgent.toLowerCase())&&((t=parseInt(/Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1],10))>=59&&t<62)&&u.hasTouch&&(u.deviceType="hybrid",u.hasMouse=!0,u.primaryInput="mouse")}var t,e,n,r,o}};u.updateOnlyOwnProperties(),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(r.hover=window.matchMedia("(hover: hover)").matches,r.none=window.matchMedia("(hover: none)").matches||window.matchMedia("(hover: on-demand)").matches,r.anyHover=window.matchMedia("(any-hover: hover)").matches,r.anyNone=window.matchMedia("(any-hover: none)").matches||window.matchMedia("(any-hover: on-demand)").matches)}};r.update(),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&"function"==typeof window.matchMedia&&(r.fine=window.matchMedia("(pointer: fine)").matches,r.coarse=window.matchMedia("(pointer: coarse)").matches,r.none=window.matchMedia("(pointer: none)").matches,r.anyFine=window.matchMedia("(any-pointer: fine)").matches,r.anyCoarse=window.matchMedia("(any-pointer: coarse)").matches,r.anyNone=window.matchMedia("(any-pointer: none)").matches)}};r.update(),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={update:function(){"undefined"!=typeof window&&(r.hasSupport="ontouchstart"in window,r.browserSupportsApi=Boolean(window.TouchEvent))}};r.update(),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,e),window.removeEventListener("testPassiveEventSupport",n,e),r.hasSupport=t}}};r.update(),e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(e.children!==n.children)return!1;var r=Object.keys(n),o=n.forceState?-1:0,s=e.forceState?-1:0;if(r.length+o!==Object.keys(e).length+s)return!1;for(var u=function(t){return!!a.statePropOptionKeys.some((function(e){return n[t][e]}))&&a.statePropOptionKeys.every((function(r){return n[t][r]===e[t][r]}))},c=0;c<r.length;c++)if("forceState"!==r[c]){if(!Object.prototype.hasOwnProperty.call(e,r[c]))return!1;if(n[r[c]]!==e[r[c]])if("as"===r[c]){if(!i.default.isValidElement(e.as)||!i.default.isValidElement(n.as))return!1;if(e.as.type!==n.as.type)return!1;if(!t(e.as.props,n.as.props))return!1}else if(!a.stateProps[r[c]]||!u(r[c]))return!1}return!0};var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},a=n(75);t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n={},r={};Object.keys(t).forEach((function(o){n[o]=t[o],e[o]||(r[o]=t[o])})),i.default.isValidElement(t.as)?(Object.keys(t.as.props).forEach((function(o){n[o]=t.as.props[o],e[o]||(r[o]=t.as.props[o])})),n.as=t.as.type):n.as=t.as;return{mergedProps:n,passThroughProps:r}};var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.extractStyle=function(t,e){var n="hoverActive"!==e||t.hoverActive?e:"hover",i=0;for(;"string"==typeof n&&i<10;)n=t[n],i++;if("object"!==(void 0===n?"undefined":r(n)))return{style:null,className:""};var a={};o.statePropOptionKeys.some((function(t){return n[t]}))?(a.style=n.style||null,a.className=n.className||""):(a.style=n,a.className="");return a},e.setActiveAndFocusProps=function(t){t.active&&(t.hoverActive||(t.hoverActive=t.active),t.touchActive||(t.touchActive=t.active),t.keyActive||(t.keyActive=t.active));t.focus&&(t.focusFromTab||(t.focusFromTab=t.focus),t.focusFromMouse||(t.focusFromMouse=t.focus),t.focusFromTouch||(t.focusFromTouch=t.focus))},e.joinClasses=function(t,e,n){var r=t;return r+=r&&e?" "+e:""+e,r+=r&&n?" "+n:""+n};var o=n(75)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if(n(e))return!0;for(var r=0;r<e.children.length;r++)if(t(e.children[r],n))return!0;return!1},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.focusRegistry=void 0,e.updateMouseFromRI=function(t){s(t),i.mouse.mouseOnDocument=!0};var r=n(160),o=n(75),i={mouse:{mouseOnDocument:!1,clientX:0,clientY:0,buttons:0},touch:{touchOnScreen:!1,recentTouch:!1},key:{recentEnterKeyDown:!1}},a=null;function s(t){i.mouse.clientX=t.clientX,i.mouse.clientY=t.clientY,i.mouse.buttons=t.buttons,"mouseleave"===t.type?i.mouse.mouseOnDocument=!1:i.mouse.mouseOnDocument=!0}var u=null;o.deviceHasTouch&&(0,r.notifyOfAll)(Object.keys(o.touchEvents),(function(t){"touchstart"===t.type?(i.touch.touchOnScreen=!0,i.mouse.mouseOnDocument=!1):"touchend"!==t.type&&"touchcancel"!==t.type||(i.touch.recentTouch=!0,a&&window.clearTimeout(a),a=window.setTimeout((function(){i.touch.recentTouch=!1,a=null}),o.queueTime)),0===t.touches.length&&(i.touch.touchOnScreen=!1)})),o.deviceHasMouse&&(0,r.notifyOfAll)(Object.keys(o.mouseEvents),"hybrid"===o.deviceType?function(t){i.touch.recentTouch||i.touch.touchOnScreen||s(t)}:s),(0,r.notifyOfAll)(["keydown"],(function(t){"Enter"===t.key&&(i.key.recentEnterKeyDown=!0,u&&window.clearTimeout(u),u=window.setTimeout((function(){i.key.recentEnterKeyDown=!1,u=null}),o.queueTime))}));e.focusRegistry={focus:null,blur:null};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){s++,null!==a&&window.clearTimeout(a);i=!1,t.click(),i=!0,a=window.setTimeout((function(){i=!1,s=0,a=null}),o.queueTime)};var r=n(160),o=n(75),i=!1,a=null,s=0;o.deviceHasTouch&&(0,r.notifyOfAll)(["click"],(function(t){i&&(t.stopPropagation(),t.preventDefault(),0===--s&&(i=!1,null!==a&&(window.clearTimeout(a),a=null)))})),t.exports=e.default},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=m(n(0)),a=m(n(122)),s=n(1019),u=m(n(1025)),c=m(n(1026)),l=n(1027),f=m(n(1028)),p=n(1029),h=m(p),d=n(160),y=m(n(1030)),v=n(75);function m(t){return t&&t.__esModule?t:{default:t}}var g=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.refCallback=function(t){if(n.refNode=t,t){var e=n.topNode;"string"!=typeof n.p.props.as?n.topNode=t.firstChild:n.topNode=t,n.tagName=n.topNode.tagName.toLowerCase(),n.type=n.topNode.type&&n.topNode.type.toLowerCase(),n.enterKeyTrigger=(0,v.enterKeyTrigger)(n.tagName,n.type),n.spaceKeyTrigger=(0,v.spaceKeyTrigger)(n.tagName,n.type),n.setClickListener(n.p.props)&&(n.p.passThroughProps.onClick=n.handleEvent),e!==n.topNode&&(n.manageFocus("refCallback"),n.p.props.refDOMNode&&n.p.props.refDOMNode(n.topNode))}},n.handleEvent=function(t){if(n.isValidEvent(t)){if(v.mouseEvents[t.type]){if("terminate"===n.handleMouseEvent(t))return}else if(v.touchEvents[t.type]||"touchmove"===t.type||"touchtapcancel"===t.type){if("terminate"===n.handleTouchEvent(t))return}else if("click"===t.type){if("terminate"===n.handleClickEvent(t))return}else if("terminate"===n.handleOtherEvent(t))return;n.updateState(n.computeState(),n.p.props,t)}},n.handleNotifyOfNext=function(t){var e=!1;switch(t.type){case"scroll":case"mouseenter":case"mutation":if(n.track.mouseOn&&"mouseOn"===n.checkMousePosition())return"reNotifyOfNext";n.track.mouseOn=!1,n.track.buttonDown=!1,e=!0;break;case"touchstart":if(n.p.props.extraTouchNoTap){if(n.track.touches.active<n.maxTapPoints&&(0,f.default)(n.topNode,(function(e){return t.target===e})))return"reNotifyOfNext";e="updateState"===n.handleTouchEvent({type:"touchtapcancel"})}break;case"dragstart":n.manageSetTimeout("dragstart",(function(){n.track.drag||(n.forceTrackIState("normal"),n.updateState(n.computeState(),n.p.props,t,!0))}),30);break;case"focus":!1!==n.track.previousFocus&&(n.track.reinstateFocus=!0,n.manageSetTimeout("windowFocus",(function(){n.track.reinstateFocus=!1}),v.queueTime));break;case"blur":n.cancelTimeout("elementBlur"),n.track.notifyOfNext.focus||(n.track.notifyOfNext.focus=(0,d.notifyOfNext)("focus",n.handleNotifyOfNext))}return e&&n.updateState(n.computeState(),n.p.props,t,!0),delete n.track.notifyOfNext[t.type],null},n.state={iState:"normal",focus:!1},n.track={touchDown:!1,recentTouch:!1,touches:{points:{},active:0},mouseOn:!1,buttonDown:!1,clickType:"reset",focus:!1,previousFocus:!1,reinstateFocus:!1,focusTransition:"reset",focusStateOnMouseDown:!1,spaceKeyDown:!1,enterKeyDown:!1,drag:!1,updateTopNode:!1,notifyOfNext:{},timeoutIDs:{},state:n.state},n.refNode=null,n.topNode=null,n.tagName="string"==typeof t.as&&t.as||"",n.type=t.type||"",n.enterKeyTrigger=!1,n.spaceKeyTrigger=!1,n.maxTapPoints=1,n.eventHandlers=n.setupEventHandlers(),n.p={sameProps:!1},n.propsSetup(t),n.p.props.initialState&&n.p.props.initialState.iState&&(n.forceTrackIState(n.p.props.initialState.iState),n.state=n.computeState()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"componentDidMount",value:function(){this.p.props.initialState&&void 0!==this.p.props.initialState.focus&&this.forceState({focus:this.p.props.initialState.focus})}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){this.track.updateTopNode=this.props.as!==t.as&&"string"!=typeof this.props.as&&"string"!=typeof t.as,this.p.sameProps=!1,!t.mutableProps&&(0,u.default)(this.props,t)?this.p.sameProps=!0:this.propsSetup(t),this.p.props.forceState&&this.forceState(this.p.props.forceState)}},{key:"shouldComponentUpdate",value:function(t,e){return!this.p.sameProps&&t!==this.props||t.interactiveChild||e.iState!==this.state.iState&&(this.p[e.iState+"Style"].style!==this.p[this.state.iState+"Style"].style||this.p[e.iState+"Style"].className!==this.p[this.state.iState+"Style"].className)||e.focus!==this.state.focus}},{key:"componentDidUpdate",value:function(){this.track.updateTopNode&&(this.track.updateTopNode=!1,this.refCallback(this.refNode))}},{key:"componentWillUnmount",value:function(){var t=this;Object.keys(this.track.notifyOfNext).forEach((function(e){(0,d.cancelNotifyOfNext)(e,t.track.notifyOfNext[e])})),Object.keys(this.track.timeoutIDs).forEach((function(e){window.clearTimeout(t.track.timeoutIDs[e])}))}},{key:"setupEventHandlers",value:function(){var t=this,e={};return Object.keys(v.otherEvents).forEach((function(n){e[v.otherEvents[n]]=t.handleEvent})),v.deviceHasTouch&&Object.keys(v.touchEvents).forEach((function(n){e[v.touchEvents[n]]=t.handleEvent})),v.deviceHasMouse&&Object.keys(v.mouseEvents).forEach((function(n){e[v.mouseEvents[n]]=t.handleEvent})),e}},{key:"setClickListener",value:function(t){if(t.onClick)return!0;if(v.deviceHasTouch){if(t.tabIndex)return!0;if(v.knownRoleTags[this.tagName])return!0}return!1}},{key:"propsSetup",value:function(t){var e=(0,c.default)(t,v.knownProps),n=e.mergedProps,r=e.passThroughProps;(0,l.setActiveAndFocusProps)(n),null===r.tabIndex?delete r.tabIndex:!r.tabIndex&&(n.focus||n.focusFromTab||n.focusFromMouse||n.focusFromTouch||n.onClick)&&(n.tabIndex="0",r.tabIndex="0"),null===r.role?delete r.role:!n.onClick||n.role||"string"!=typeof n.as||v.knownRoleTags[n.as]||(n.role="button",r.role="button"),this.maxTapPoints=(n.onTapFour?4:n.onTapThree&&3)||n.onTapTwo&&2||1,this.setClickListener(n)&&(r.onClick=this.handleEvent),v.deviceHasTouch&&(n.touchActiveTapOnly||n.onLongPress||n.onTouchMove)&&(r.onTouchMove=this.handleEvent),(0,a.default)(r,this.eventHandlers),this.p.normalStyle=(0,l.extractStyle)(n,"normal"),this.p.hoverStyle=(0,l.extractStyle)(n,"hover"),this.p.hoverActiveStyle=(0,l.extractStyle)(n,"hoverActive"),this.p.touchActiveStyle=(0,l.extractStyle)(n,"touchActive"),this.p.keyActiveStyle=(0,l.extractStyle)(n,"keyActive"),this.p.tabFocusStyle=(0,l.extractStyle)(n,"focusFromTab"),this.p.mouseFocusStyle=(0,l.extractStyle)(n,"focusFromMouse"),this.p.touchFocusStyle=(0,l.extractStyle)(n,"focusFromTouch"),this.p.passThroughProps=r,this.p.props=n}},{key:"manageSetTimeout",value:function(t,e,n){var r=this;void 0!==this.track.timeoutIDs[t]&&window.clearTimeout(this.track.timeoutIDs[t]),this.track.timeoutIDs[t]=window.setTimeout((function(){delete r.track.timeoutIDs[t],e()}),n)}},{key:"cancelTimeout",value:function(t){void 0!==this.track.timeoutIDs[t]&&(window.clearTimeout(this.track.timeoutIDs[t]),delete this.track.timeoutIDs[t])}},{key:"forceTrackIState",value:function(t){this.computeState().iState!==t&&(this.track.mouseOn="hover"===t||"hoverActive"===t,this.track.buttonDown="hoverActive"===t,this.track.touchDown="touchActive"===t,this.track.spaceKeyDown="keyActive"===t,this.track.enterKeyDown="keyActive"===t,this.track.drag=!1)}},{key:"forceState",value:function(t){if(void 0!==t.iState&&this.forceTrackIState(t.iState),void 0!==t.focus&&t.focus!==this.track.state.focus)return this.track.focus=t.focus,void this.manageFocus(t.focus?"forceStateFocusTrue":"forceStateFocusFalse");this.updateState(this.computeState(),this.p.props,(0,v.dummyEvent)("forcestate"))}},{key:"computeState",value:function(){var t=this.track,e=t.mouseOn,n=t.buttonDown,r=t.touchDown,o=t.focus,i=t.drag,a=o&&(this.track.enterKeyDown&&this.enterKeyTrigger||this.track.spaceKeyDown&&this.spaceKeyTrigger),s={focus:o};return e||n||r||a||i?!e||n||r||a||i?e&&n&&!r&&!a||i&&!r?s.iState="hoverActive":a&&!r?s.iState="keyActive":(r||i)&&(s.iState="touchActive"):s.iState="hover":s.iState="normal",s}},{key:"updateState",value:function(t,e,n,r){r||this.manageNotifyOfNext(t);var o=this.track.state.iState,i=t.iState,a=i!==o,s=t.focus!==this.track.state.focus;if(a||s){var u={iState:o,focus:this.track.state.focus},c={iState:i,focus:t.focus};e.onStateChange&&e.onStateChange({prevState:u,nextState:c,event:n}),this.track.state=t,this.setState(t,e.setStateCallback&&e.setStateCallback.bind(this,{prevState:u,nextState:c}))}}},{key:"isValidEvent",value:function(t){if("click"===t.type&&"reset"!==this.track.clickType)return!0;if(("focus"===t.type||"blur"===t.type)&&t.target!==this.topNode)return!0;if("focus"===t.type&&"refCallbackFocus"===this.track.focusTransition)return t.stopPropagation(),this.track.focusTransition="reset",!1;if("blur"===t.type&&"focusForceBlur"===this.track.focusTransition&&!this.track.state.focus)return t.stopPropagation(),this.track.focusTransition="reset",!1;if(v.deviceHasTouch){if("click"===t.type&&(h.default.touch.recentTouch||h.default.touch.touchOnScreen)&&(this.p.props.active||this.p.props.touchActive))return t.preventDefault(),t.stopPropagation(),!1;if("focus"===t.type&&"reset"===this.track.focusTransition&&(h.default.touch.recentTouch||!this.track.touchDown&&h.default.touch.touchOnScreen))return t.preventDefault(),t.stopPropagation(),this.manageFocus("focusForceBlur"),!1}return"hybrid"!==v.deviceType||!/mouse/.test(t.type)||!h.default.touch.touchOnScreen&&!h.default.touch.recentTouch||(t.preventDefault(),t.stopPropagation(),!1)}},{key:"manageNotifyOfNext",value:function(t){var e=this,n=function(t){e.track.notifyOfNext[t]||(e.track.notifyOfNext[t]=(0,d.notifyOfNext)(t,e.handleNotifyOfNext))},r=function(t){e.track.notifyOfNext[t]&&((0,d.cancelNotifyOfNext)(t,e.track.notifyOfNext[t]),delete e.track.notifyOfNext[t])};if(v.deviceHasMouse){var o="normal"!==t.iState&&!this.track.drag;o?n("mouseenter"):r("mouseenter"),o?n("dragstart"):r("dragstart"),v.passiveEventSupport&&(o?n("scroll"):r("scroll")),this.track.mouseOn?n("mutation"):r("mutation")}v.deviceHasTouch&&("touchActive"===t.iState?this.p.props.extraTouchNoTap&&n("touchstart"):r("touchstart")),this.track.state.focus&&!t.focus&&(n("blur"),this.manageSetTimeout("elementBlur",(function(){e.track.previousFocus=!1,r("blur")}),v.queueTime))}},{key:"checkMousePosition",value:function(t){if(!v.deviceHasMouse)return null;var e=t&&t.clientX||h.default.mouse.clientX,n=t&&t.clientY||h.default.mouse.clientY;function r(t){var r=t.getBoundingClientRect();return e>=r.left-1&&e<=r.right+1&&n>=r.top-1&&n<=r.bottom+1}return!!h.default.mouse.mouseOnDocument&&(this.p.props.nonContainedChild?(0,f.default)(this.topNode,r):r(this.topNode))?"mouseOn":"mouseOff"}},{key:"manageFocus",value:function(t,e){var n=this;if(e&&(p.focusRegistry.focus===e||p.focusRegistry.blur===e))return"updateState";var r,o,i=!v.nonBlurrableTags[this.tagName]&&!this.p.props.focusToggleOff,a=this.p.props.tabIndex||v.knownRoleTags[this.tagName],s=function(t,r,o){return("force"===o||"focus"===t&&a||"blur"===t&&i)&&(e&&(p.focusRegistry[t]=e,n.manageSetTimeout("focusRegistry",(function(){p.focusRegistry[t]=null}),0)),n.track.focusTransition=r,n.topNode[t](),n.track.focusTransition!==r)?"terminate":(n.track.focusTransition="reset","updateState")};switch(t){case"mousedown":return s("focus","mouseDownFocus");case"mouseup":return this.track.focusStateOnMouseDown?s("blur","mouseUpBlur"):(this.track.focusTransition="reset","updateState");case"touchclick":return r="touchClick",n.track.state.focus?s("blur",r+"Blur",o):s("focus",r+"Focus",o);case"forceStateFocusTrue":return this.manageSetTimeout("forceStateFocusTrue",(function(){!n.track.state.focus&&s("focus","forceStateFocus","force")}),0),"terminate";case"forceStateFocusFalse":return this.manageSetTimeout("forceStateFocusFalse",(function(){n.track.state.focus&&s("blur","forceStateBlur","force")}),0),"terminate";case"refCallback":return this.track.state.focus?s("focus","refCallbackFocus","force"):(this.track.focusTransition="reset","terminate");case"focusForceBlur":return s("blur","focusForceBlur","force");default:return"updateState"}}},{key:"handleMouseEvent",value:function(t){switch(t.type){case"mouseenter":return(0,p.updateMouseFromRI)(t),this.p.props.onMouseEnter&&this.p.props.onMouseEnter(t),this.track.mouseOn=!0,this.track.buttonDown=1===t.buttons,"updateState";case"mouseleave":return(0,p.updateMouseFromRI)(t),this.p.props.onMouseLeave&&this.p.props.onMouseLeave(t),this.track.mouseOn=!1,this.track.buttonDown=!1,"updateState";case"mousemove":return this.p.props.onMouseMove&&this.p.props.onMouseMove(t),this.track.mouseOn&&this.track.buttonDown===(1===t.buttons)?"terminate":(this.track.mouseOn=!0,this.track.buttonDown=1===t.buttons,"updateState");case"mousedown":return this.p.props.onMouseDown&&this.p.props.onMouseDown(t),this.track.mouseOn=!0,this.track.buttonDown=!0,this.track.focusStateOnMouseDown=this.track.state.focus,this.manageFocus("mousedown",t);case"mouseup":this.p.props.onMouseUp&&this.p.props.onMouseUp(t),this.track.buttonDown=!1;var e=this.manageFocus("mouseup",t);return this.manageClick("mouseClick"),e;default:return"terminate"}}},{key:"handleTouchEvent",value:function(t){var e=this;this.track.mouseOn=!1,this.track.buttonDown=!1;var n=function(){e.track.touchDown=!1,e.track.touches={points:{},active:0},e.cancelTimeout("touchTapTimer")},r=function(){e.track.recentTouch=!0,e.manageSetTimeout("recentTouchTimer",(function(){e.track.recentTouch=!1}),v.queueTime)},o=function(){return e.p.props.extraTouchNoTap&&t.touches.length!==e.track.touches.active||e.track.touches.active>e.maxTapPoints},i=function(t,e,n){return Math.abs(t.clientX-e.startX)>=15+3*n||Math.abs(t.clientY-e.startY)>=15+3*n},a=function(n){for(var r=0;r<t.changedTouches.length;r++){var o=e.track.touches.points[t.changedTouches[r].identifier]||{};o[n+"X"]=t.changedTouches[r].clientX,o[n+"Y"]=t.changedTouches[r].clientY,e.track.touches.points[t.changedTouches[r].identifier]=o}};switch(t.type){case"touchstart":if(this.p.props.onTouchStart&&this.p.props.onTouchStart(t),this.track.touches.active+=t.changedTouches.length,this.track.touches.tapCanceled)return"terminate";var s=!this.track.touchDown;return this.track.touchDown=!0,this.track.touches.touchend||o()?"updateState"===this.handleTouchEvent({type:"touchtapcancel"})||s?"updateState":"terminate":(s&&(t.persist(),this.manageSetTimeout("touchTapTimer",(function(){e.p.props.onLongPress&&e.p.props.onLongPress(t),e.handleEvent((0,v.dummyEvent)("touchtapcancel"))}),this.p.props.tapTimeCutoff)),a("start"),"updateState");case"touchmove":if(this.p.props.onTouchMove&&this.p.props.onTouchMove(t),this.track.touches.tapCanceled)return"terminate";if(o())return this.handleTouchEvent({type:"touchtapcancel"});if(this.p.props.touchActiveTapOnly||this.p.props.onLongPress)for(var u=0;u<t.changedTouches.length;u++){var c=this.track.touches.points[t.changedTouches[u].identifier];if(c&&i(t.changedTouches[u],c,this.maxTapPoints))return this.handleTouchEvent({type:"touchtapcancel"})}return"terminate";case"touchend":if(r(),this.p.props.onTouchEnd&&this.p.props.onTouchEnd(t),this.track.touches.active-=t.changedTouches.length,this.track.touches.active<0||0===t.touches.length&&this.track.touches.active>0)return n(),"updateState";if(this.track.touches.touchend=!0,0===this.track.touches.active&&(this.track.touches.tapCanceled||o()))return n(),"updateState";if(this.track.touches.tapCanceled)return"terminate";if(o())return this.handleTouchEvent({type:"touchtapcancel"});if(a("client"),0===this.track.touches.active){var l=this.track.touches.points,f=Object.keys(l),p=f.length,h=f.every((function(t){return!i(l[t],l[t],p)}))?p:0;switch(n(),h){case 1:var d="updateState";return(this.p.props.active||this.p.props.touchActive)&&(d=this.manageFocus("touchclick",t),this.manageClick("tapClick")),d;case 2:this.p.props.onTapTwo&&this.p.props.onTapTwo(t);break;case 3:this.p.props.onTapThree&&this.p.props.onTapThree(t);break;case 4:this.p.props.onTapFour&&this.p.props.onTapFour(t)}}return"updateState";case"touchcancel":return r(),this.p.props.onTouchCancel&&this.p.props.onTouchCancel(t),this.track.touches.active-=t.changedTouches.length,0===this.track.touches.active?(n(),"updateState"):this.handleTouchEvent({type:"touchtapcancel"});case"touchtapcancel":return this.cancelTimeout("touchTapTimer"),this.track.touchDown&&(this.track.touches.tapCanceled=!0,this.p.props.touchActiveTapOnly)?(this.track.touchDown=!1,"updateState"):"terminate";default:return"terminate"}}},{key:"manageClick",value:function(t){var e=this;this.cancelTimeout("clickType");var n=function(){e.manageSetTimeout("clickType",(function(){e.track.clickType="reset"}),v.queueTime)};switch(t){case"mouseClick":this.track.clickType="mouseClick",n();break;case"tapClick":this.track.clickType="tapClick",(0,y.default)(this.topNode),this.track.clickType="reset";break;case"keyClick":this.track.clickType="keyClick",v.knownRoleTags[this.tagName]?n():this.p.props.onClick&&(this.topNode.click(),this.track.clickType="reset")}}},{key:"handleClickEvent",value:function(t){this.cancelTimeout("clickType");var e="terminate";"reset"===this.track.clickType&&("input"===this.tagName&&"submit"===this.type&&h.default.key.recentEnterKeyDown?this.track.clickType="keyClick":h.default.touch.recentTouch||h.default.touch.touchOnScreen||"touchOnly"===v.deviceType?(e=this.manageFocus("touchclick",t),this.track.keyClick="tapClick"):this.track.keyClick="mouseClick");return"_blank"!==this.p.props.target||"tapClick"!==this.track.clickType||this.track.notifyOfNext.focus||(this.track.previousFocus="touch",this.track.notifyOfNext.focus=(0,d.notifyOfNext)("focus",this.handleNotifyOfNext)),this.p.props.onClick&&this.p.props.onClick(t,this.track.clickType),this.track.clickType="reset",e}},{key:"handleOtherEvent",value:function(t){switch(t.type){case"focus":if(this.p.props.onFocus&&this.p.props.onFocus(t),t.target!==this.topNode)return"terminate";if("reset"!==this.track.focusTransition||!this.track.focus){var e=this.track.focusTransition.toLowerCase();/mouse/.test(e)?this.track.focus="mouse":/touch/.test(e)||this.track.touchDown?this.track.focus="touch":this.track.reinstateFocus?this.track.focus=this.track.previousFocus:/forcestate/.test(e)||(this.track.focus="tab")}return this.cancelTimeout("windowFocus"),this.track.reinstateFocus=!1,this.track.focusTransition="reset","updateState";case"blur":return this.p.props.onBlur&&this.p.props.onBlur(t),t.target!==this.topNode?"terminate":(this.track.focusTransition="reset",this.track.previousFocus=this.track.focus,this.track.focus=!1,this.track.spaceKeyDown=!1,this.track.enterKeyDown=!1,"updateState");case"keydown":if(this.p.props.onKeyDown&&this.p.props.onKeyDown(t),!this.track.focus)return"terminate";if(" "===t.key)this.track.spaceKeyDown=!0;else{if("Enter"!==t.key)return"terminate";this.track.enterKeyDown=!0,this.enterKeyTrigger&&this.manageClick("keyClick")}return"updateState";case"keyup":if(this.p.props.onKeyUp&&this.p.props.onKeyUp(t),!this.track.focus)return"terminate";if("Enter"===t.key)this.track.enterKeyDown=!1;else{if(" "!==t.key)return"terminate";this.track.spaceKeyDown=!1,this.spaceKeyTrigger&&this.manageClick("keyClick")}return"updateState";case"dragstart":return this.p.props.onDragStart&&this.p.props.onDragStart(t),this.track.drag=!0,"updateState";case"dragend":return this.p.props.onDragEnd&&this.p.props.onDragEnd(t),this.forceTrackIState("normal"),"updateState";default:return"terminate"}}},{key:"computeStyle",value:function(){var t={};this.p.props.useBrowserOutlineFocus||!this.p.props.focusFromTab&&("tab"===this.state.focus||v.nonBlurrableTags[this.tagName])||(t.outline=0,t.outlineOffset=0),(this.p.props.touchActive||this.p.props.active)&&v.deviceHasTouch&&(t.WebkitTapHighlightColor="rgba(0, 0, 0, 0)");var e="string"==typeof this.p.props.as&&this.p.props.as.toLowerCase();this.p.props.useBrowserCursor||!(this.p.props.onClick||"input"!==e&&this.p.props.tabIndex&&(this.p.mouseFocusStyle.style||this.p.mouseFocusStyle.className)||"input"===e&&("checkbox"===this.p.props.type||"radio"===this.p.props.type||"submit"===this.p.props.type)||"button"===e||"a"===e||"area"===e||"select"===e)||this.p.props.disabled||(t.cursor="pointer"),(0,a.default)(t,this.p.props.style);var n="keyActive"===this.state.iState||this.p.props.stylePriority&&this.p.props.stylePriority[this.state.iState],r=this.p[this.state.iState+"Style"].style,o=this.state.focus?this.p[this.state.focus+"FocusStyle"].style:null;return n?(0,a.default)(t,o,r):(0,a.default)(t,r,o),t}},{key:"computeClassName",value:function(){return(0,l.joinClasses)(this.p.props.className||"",this.p[this.state.iState+"Style"].className,this.state.focus?this.p[this.state.focus+"FocusStyle"].className:"")}},{key:"computeChildren",value:function(){var t=this,n=this.state.focus&&"focusFrom"+this.state.focus.charAt(0).toUpperCase()+this.state.focus.slice(1),o=this.p.props.stylePriority&&this.p.props.stylePriority[this.state.iState];return function s(u){return i.default.Children.map(u,(function(u){if(!i.default.isValidElement(u))return u;if(u.props.showOnParent&&!u.props.showOnParent.split(" ").some((function(e){return e===t.state.iState||/Active/.test(t.state.iState)&&"active"===e||t.state.focus&&(e===n||"focus"===e)})))return null;var c=Object.keys(u.props);if(!c.some((function(t){return v.childInteractiveProps[t]})))return u.type===e?u:i.default.cloneElement(u,{},s(u.props.children));var f={},p={};c.forEach((function(t){v.childInteractiveProps[t]?"showOnParent"!==t&&(p[""+t.slice(8).charAt(0).toLowerCase()+t.slice(9)]=u.props[t]):f[t]=u.props[t]})),p.style=u.props.style,p.className=u.props.className;var h=function(e){var i=e.style?r({},e.style):{};(0,l.setActiveAndFocusProps)(e);var s=(0,l.extractStyle)(e,t.state.iState),u=t.state.focus&&(0,l.extractStyle)(e,n);return{className:(0,l.joinClasses)(e.className||"",s.className,u&&u.className||""),style:o&&(0,a.default)(i,u.style,s.style)||(0,a.default)(i,s.style,u.style)}}(p),d=h.style,y=h.className;return f.style=d,y&&(f.className=y),i.default.createElement(u.type,f,u.type===e?u.props.children:s(u.props.children))}))}(this.p.props.children)}},{key:"render",value:function(){this.p.passThroughProps.style=this.computeStyle();var t=this.computeClassName();t&&(this.p.passThroughProps.className=t);var e=this.p.props.interactiveChild?this.computeChildren():this.p.props.children;return"string"==typeof this.p.props.as?(this.p.passThroughProps.ref=this.refCallback,i.default.createElement(this.p.props.as,this.p.passThroughProps,e)):i.default.createElement("span",{ref:this.refCallback,style:this.p.props.wrapperStyle,className:this.p.props.wrapperClassName},i.default.createElement(this.p.props.as,this.p.passThroughProps,e))}}]),e}(i.default.Component);g.propTypes=s.propTypes,g.defaultProps=s.defaultProps,e.default=g,t.exports=e.default},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});e.__esModule=!0;var i=n(0),a=n(58);function s(t){return"TEXTAREA"===t.tagName}function u(t){return"INPUT"===t.tagName}var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._inputs=[],e}return o(e,t),e.prototype._getInput=function(t){var e=this._inputs[t];if(null==e)return null;var n=a.findDOMNode(e);if(s(n)||u(n))return n;var r=n.querySelector("textarea,input");return r&&(s(r)||u(r))?r:null},e.prototype.render=function(){for(var t=this,e=this.props.value;e.length<this.props.length;)e+=" ";e=e.substr(0,this.props.length);for(var n=[],r=function(r){n.push({ref:function(e){return t._inputs[r]=e},value:" "===e[r]?"":e[r],onKeyDown:function(n){var o=t._getInput(r);switch(n.key){case"Backspace":if(n.preventDefault()," "===e[r]||o&&0===o.selectionEnd){if(r>0){t.props.onChange(e.substring(0,r-1)+" "+e.substring(r));var i=t._getInput(r-1);i&&i.focus()}}else t.props.onChange(e.substring(0,r)+" "+e.substring(r+1));break;case"ArrowLeft":if(n.preventDefault(),r>0){var a=t._getInput(r-1);a&&(a.focus(),window.requestAnimationFrame((function(){a.setSelectionRange(1,1)})))}break;case"ArrowRight":if(n.preventDefault(),r+1<t.props.length){var s=t._getInput(r+1);s&&(s.focus(),window.requestAnimationFrame((function(){s.setSelectionRange(1,1)})))}break;default:if(1===n.key.length&&!(n.metaKey||n.altKey||n.ctrlKey)&&(n.preventDefault(),t.props.acceptedCharacters.test(n.key)&&(t.props.onChange(e.substring(0,r)+n.key+e.substring(r+1)),r+1<t.props.length))){var u=t._getInput(r+1);u&&(u.focus(),window.requestAnimationFrame((function(){u.setSelectionRange(0,0)})))}}},onChange:function(n){var o=n.target.value.split("").filter((function(e){return t.props.acceptedCharacters.test(e)})).join("");if(t.props.onChange((e.substring(0,r)+o+e.substring(r+o.length)).substr(0,t.props.length)),r<t.props.length-1){var i=t._getInput(r+o.length<t.props.length?r+o.length:t.props.length-1);i&&(i.focus(),window.requestAnimationFrame((function(){i.setSelectionRange(0,0)})))}}})},o=0;o<this.props.length;o++)r(o);return this.props.children(n)},e}(i.Component);e.default=c,t.exports=c,t.exports.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),a=u(i),s=u(n(76));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.timeout=void 0,n.handleTriggerClick=n.handleTriggerClick.bind(n),n.handleTransitionEnd=n.handleTransitionEnd.bind(n),n.continueOpenCollapsible=n.continueOpenCollapsible.bind(n),n.setInnerRef=n.setInnerRef.bind(n),t.open?n.state={isClosed:!1,shouldSwitchAutoOnNextCycle:!1,height:"auto",transition:"none",hasBeenOpened:!0,overflow:t.overflowWhenOpen,inTransition:!1}:n.state={isClosed:!0,shouldSwitchAutoOnNextCycle:!1,height:0,transition:"height "+t.transitionTime+"ms "+t.easing,hasBeenOpened:!1,overflow:"hidden",inTransition:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"componentDidUpdate",value:function(t,e){var n=this;this.state.shouldOpenOnNextCycle&&this.continueOpenCollapsible(),"auto"===e.height&&!0===this.state.shouldSwitchAutoOnNextCycle&&(window.clearTimeout(this.timeout),this.timeout=window.setTimeout((function(){n.setState({height:0,overflow:"hidden",isClosed:!0,shouldSwitchAutoOnNextCycle:!1})}),50)),t.open!==this.props.open&&(!0===this.props.open?(this.openCollapsible(),this.props.onOpening()):(this.closeCollapsible(),this.props.onClosing()))}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.timeout)}},{key:"closeCollapsible",value:function(){this.setState({shouldSwitchAutoOnNextCycle:!0,height:this.innerRef.scrollHeight,transition:"height "+(this.props.transitionCloseTime?this.props.transitionCloseTime:this.props.transitionTime)+"ms "+this.props.easing,inTransition:!0})}},{key:"openCollapsible",value:function(){this.setState({inTransition:!0,shouldOpenOnNextCycle:!0})}},{key:"continueOpenCollapsible",value:function(){this.setState({height:this.innerRef.scrollHeight,transition:"height "+this.props.transitionTime+"ms "+this.props.easing,isClosed:!1,hasBeenOpened:!0,inTransition:!0,shouldOpenOnNextCycle:!1})}},{key:"handleTriggerClick",value:function(t){this.props.triggerDisabled||(t.preventDefault(),this.props.handleTriggerClick?this.props.handleTriggerClick(this.props.accordionPosition):!0===this.state.isClosed?(this.openCollapsible(),this.props.onOpening()):(this.closeCollapsible(),this.props.onClosing()))}},{key:"renderNonClickableTriggerElement",value:function(){return this.props.triggerSibling&&"string"==typeof this.props.triggerSibling?a.default.createElement("span",{className:this.props.classParentString+"__trigger-sibling"},this.props.triggerSibling):this.props.triggerSibling?a.default.createElement(this.props.triggerSibling,null):null}},{key:"handleTransitionEnd",value:function(t){t.target===this.innerRef&&(this.state.isClosed?(this.setState({inTransition:!1}),this.props.onClose()):(this.setState({height:"auto",overflow:this.props.overflowWhenOpen,inTransition:!1}),this.props.onOpen()))}},{key:"setInnerRef",value:function(t){this.innerRef=t}},{key:"render",value:function(){var t=this,e={height:this.state.height,WebkitTransition:this.state.transition,msTransition:this.state.transition,transition:this.state.transition,overflow:this.state.overflow},n=this.state.isClosed?"is-closed":"is-open",o=this.props.triggerDisabled?"is-disabled":"",i=!1===this.state.isClosed&&void 0!==this.props.triggerWhenOpen?this.props.triggerWhenOpen:this.props.trigger,s=this.props.contentContainerTagName,u=this.props.triggerTagName,c=this.props.lazyRender&&!this.state.hasBeenOpened&&this.state.isClosed&&!this.state.inTransition?null:this.props.children,l=this.props.classParentString+"__trigger "+n+" "+o+" "+(this.state.isClosed?this.props.triggerClassName:this.props.triggerOpenedClassName),f=this.props.classParentString+" "+(this.state.isClosed?this.props.className:this.props.openedClassName),p=this.props.classParentString+"__contentOuter "+this.props.contentOuterClassName,h=this.props.classParentString+"__contentInner "+this.props.contentInnerClassName;return a.default.createElement(s,r({className:f.trim()},this.props.containerElementProps),a.default.createElement(u,r({className:l.trim(),onClick:this.handleTriggerClick,style:this.props.triggerStyle&&this.props.triggerStyle,onKeyPress:function(e){var n=e.key;" "!==n&&"Enter"!==n||t.handleTriggerClick(e)},tabIndex:this.props.tabIndex&&this.props.tabIndex},this.props.triggerElementProps),i),this.renderNonClickableTriggerElement(),a.default.createElement("div",{className:p.trim(),style:e,onTransitionEnd:this.handleTransitionEnd,ref:this.setInnerRef},a.default.createElement("div",{className:h.trim()},c)))}}]),e}(i.Component);c.propTypes={transitionTime:s.default.number,transitionCloseTime:s.default.number,triggerTagName:s.default.string,easing:s.default.string,open:s.default.bool,containerElementProps:s.default.object,triggerElementProps:s.default.object,classParentString:s.default.string,openedClassName:s.default.string,triggerStyle:s.default.object,triggerClassName:s.default.string,triggerOpenedClassName:s.default.string,contentOuterClassName:s.default.string,contentInnerClassName:s.default.string,accordionPosition:s.default.oneOfType([s.default.string,s.default.number]),handleTriggerClick:s.default.func,onOpen:s.default.func,onClose:s.default.func,onOpening:s.default.func,onClosing:s.default.func,trigger:s.default.oneOfType([s.default.string,s.default.element]),triggerWhenOpen:s.default.oneOfType([s.default.string,s.default.element]),triggerDisabled:s.default.bool,lazyRender:s.default.bool,overflowWhenOpen:s.default.oneOf(["hidden","visible","auto","scroll","inherit","initial","unset"]),triggerSibling:s.default.oneOfType([s.default.element,s.default.func]),tabIndex:s.default.number,contentContainerTagName:s.default.string},c.defaultProps={transitionTime:400,transitionCloseTime:null,triggerTagName:"span",easing:"linear",open:!1,classParentString:"Collapsible",triggerDisabled:!1,lazyRender:!1,overflowWhenOpen:"hidden",openedClassName:"",triggerStyle:null,triggerClassName:"",triggerOpenedClassName:"",contentOuterClassName:"",contentInnerClassName:"",className:"",triggerSibling:null,onOpen:function(){},onClose:function(){},onOpening:function(){},onClosing:function(){},tabIndex:null,contentContainerTagName:"div"},e.default=c},function(t,e,n){"use strict";n.r(e),n.d(e,"IGNORE_CLASS_NAME",(function(){return p}));var r=n(0),o=n(58);function i(t,e,n){return t===e||(t.correspondingElement?t.correspondingElement.classList.contains(n):t.classList.contains(n))}var a,s,u=(void 0===a&&(a=0),function(){return++a}),c={},l={},f=["touchstart","touchmove"],p="ignore-react-onclickoutside";function h(t,e){var n=null;return-1!==f.indexOf(e)&&s&&(n={passive:!t.props.preventDefault}),n}e.default=function(t,e){var n,a,f=t.displayName||t.name||"Component";return a=n=function(n){var a,p;function d(t){var r;return(r=n.call(this,t)||this).__outsideClickHandler=function(t){if("function"!=typeof r.__clickOutsideHandlerProp){var e=r.getInstance();if("function"!=typeof e.props.handleClickOutside){if("function"!=typeof e.handleClickOutside)throw new Error("WrappedComponent: "+f+" lacks a handleClickOutside(event) function for processing outside click events.");e.handleClickOutside(t)}else e.props.handleClickOutside(t)}else r.__clickOutsideHandlerProp(t)},r.__getComponentNode=function(){var t=r.getInstance();return e&&"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef()(t):"function"==typeof t.setClickOutsideRef?t.setClickOutsideRef():Object(o.findDOMNode)(t)},r.enableOnClickOutside=function(){if("undefined"!=typeof document&&!l[r._uid]){void 0===s&&(s=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var t=!1,e=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,e),window.removeEventListener("testPassiveEventSupport",n,e),t}}()),l[r._uid]=!0;var t=r.props.eventTypes;t.forEach||(t=[t]),c[r._uid]=function(t){var e;null!==r.componentNode&&(r.props.preventDefault&&t.preventDefault(),r.props.stopPropagation&&t.stopPropagation(),r.props.excludeScrollbar&&(e=t,document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY)||function(t,e,n){if(t===e)return!0;for(;t.parentNode;){if(i(t,e,n))return!0;t=t.parentNode}return t}(t.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(t))},t.forEach((function(t){document.addEventListener(t,c[r._uid],h(r,t))}))}},r.disableOnClickOutside=function(){delete l[r._uid];var t=c[r._uid];if(t&&"undefined"!=typeof document){var e=r.props.eventTypes;e.forEach||(e=[e]),e.forEach((function(e){return document.removeEventListener(e,t,h(r,e))})),delete c[r._uid]}},r.getRef=function(t){return r.instanceRef=t},r._uid=u(),r}p=n,(a=d).prototype=Object.create(p.prototype),a.prototype.constructor=a,a.__proto__=p;var y=d.prototype;return y.getInstance=function(){if(!t.prototype.isReactComponent)return this;var e=this.instanceRef;return e.getInstance?e.getInstance():e},y.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var t=this.getInstance();if(e&&"function"==typeof e.handleClickOutside&&(this.__clickOutsideHandlerProp=e.handleClickOutside(t),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+f+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},y.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},y.componentWillUnmount=function(){this.disableOnClickOutside()},y.render=function(){var e=this.props,n=(e.excludeScrollbar,function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,["excludeScrollbar"]));return t.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,Object(r.createElement)(t,n)},d}(r.Component),n.displayName="OnClickOutside("+f+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:e&&e.excludeScrollbar||!1,outsideClickIgnoreClass:p,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return t.getClass?t.getClass():t},a}},function(t,e,n){"use strict";var r=n(48),o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function a(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function s(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function u(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function c(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(l(arguments[e]));return t}function p(t,e){if(!t)throw new Error(e)}function h(t,e,n){if(void 0===n&&(n=1/0),!(e<=t&&t<=n))throw new RangeError("Value must be within ["+e+", "+n+"], got: "+t)}function d(t){t.isOffline||"running"===t.state||m('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}var y=console;function v(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];y.log.apply(y,f(t))}function m(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];y.warn.apply(y,f(t))}function g(t){return void 0===t}function b(t){return!g(t)}function _(t){return"function"==typeof t}function w(t){return"number"==typeof t}function x(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object}function O(t){return"boolean"==typeof t}function S(t){return Array.isArray(t)}function k(t){return"string"==typeof t}function T(t){return k(t)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(t)}function C(){return new r.AudioContext}function E(t,e,n){return new r.OfflineAudioContext(t,e,n)}var A="object"==typeof self?self:null,j=A&&(A.hasOwnProperty("AudioContext")||A.hasOwnProperty("webkitAudioContext"));var P=function(){function t(t,e,n){this._callback=t,this._type=e,this._updateInterval=n,this._createClock()}return t.prototype._createWorker=function(){var t=new Blob(["\n\t\t\t// the initial timeout time\n\t\t\tlet timeoutTime = "+(1e3*this._updateInterval).toFixed(1)+";\n\t\t\t// onmessage callback\n\t\t\tself.onmessage = function(msg){\n\t\t\t\ttimeoutTime = parseInt(msg.data);\n\t\t\t};\n\t\t\t// the tick function which posts a message\n\t\t\t// and schedules a new tick\n\t\t\tfunction tick(){\n\t\t\t\tsetTimeout(tick, timeoutTime);\n\t\t\t\tself.postMessage('tick');\n\t\t\t}\n\t\t\t// call tick initially\n\t\t\ttick();\n\t\t\t"],{type:"text/javascript"}),e=URL.createObjectURL(t),n=new Worker(e);n.onmessage=this._callback.bind(this),this._worker=n},t.prototype._createTimeout=function(){var t=this;this._timeout=setTimeout((function(){t._createTimeout(),t._callback()}),1e3*this._updateInterval)},t.prototype._createClock=function(){if("worker"===this._type)try{this._createWorker()}catch(t){this._type="timeout",this._createClock()}else"timeout"===this._type&&this._createTimeout()},t.prototype._disposeClock=function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=0),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)},Object.defineProperty(t.prototype,"updateInterval",{get:function(){return this._updateInterval},set:function(t){this._updateInterval=Math.max(t,128/44100),"worker"===this._type&&this._worker.postMessage(Math.max(1e3*t,1))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(t){this._disposeClock(),this._type=t,this._createClock()},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._disposeClock()},t}();function D(t){return Object(r.isAnyAudioParam)(t)}function M(t){return Object(r.isAnyAudioNode)(t)}function I(t){return Object(r.isAnyOfflineAudioContext)(t)}function R(t){return Object(r.isAnyAudioContext)(t)}function N(t){return t instanceof AudioBuffer}function F(t,e){return"value"===t||D(e)||M(e)||N(e)}function q(t){for(var e,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return t;var i=r.shift();if(x(t)&&x(i))for(var a in i)F(a,i[a])?t[a]=i[a]:x(i[a])?(t[a]||Object.assign(t,((e={})[a]={},e)),q(t[a],i[a])):Object.assign(t,((n={})[a]=i[a],n));return q.apply(void 0,f([t],r))}function V(t,e,n,r){var o;void 0===n&&(n=[]);var i={},a=Array.from(e);x(a[0])&&r&&!Reflect.has(a[0],r)&&(Object.keys(a[0]).some((function(e){return Reflect.has(t,e)}))||(q(i,((o={})[r]=a[0],o)),n.splice(n.indexOf(r),1),a.shift()));if(1===a.length&&x(a[0]))q(i,a[0]);else for(var s=0;s<n.length;s++)b(a[s])&&(i[n[s]]=a[s]);return q(t,i)}function L(t,e){return g(t)?e:t}function z(t,e){return e.forEach((function(e){Reflect.has(t,e)&&delete t[e]})),t}var B=function(){function t(){this.debug=!1,this._wasDisposed=!1}return t.getDefaults=function(){return{}},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];(this.debug||A&&this.toString()===A.TONE_DEBUG_CLASS)&&v.apply(void 0,f([this],t))},t.prototype.dispose=function(){return this._wasDisposed=!0,this},Object.defineProperty(t.prototype,"disposed",{get:function(){return this._wasDisposed},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.name},t.version="14.5.39",t}();function U(t,e){return t>e+1e-6}function W(t,e){return U(t,e)||H(t,e)}function $(t,e){return t+1e-6<e}function H(t,e){return Math.abs(t-e)<1e-6}function G(t,e,n){return Math.max(Math.min(t,n),e)}var K=function(t){function e(){var n=t.call(this)||this;n.name="Timeline",n._timeline=[];var r=V(e.getDefaults(),arguments,["memory"]);return n.memory=r.memory,n.increasing=r.increasing,n}return i(e,t),e.getDefaults=function(){return{memory:1/0,increasing:!1}},Object.defineProperty(e.prototype,"length",{get:function(){return this._timeline.length},enumerable:!0,configurable:!0}),e.prototype.add=function(t){if(p(Reflect.has(t,"time"),"Timeline: events must have a time attribute"),t.time=t.time.valueOf(),this.increasing&&this.length){var e=this._timeline[this.length-1];p(W(t.time,e.time),"The time must be greater than or equal to the last scheduled time"),this._timeline.push(t)}else{var n=this._search(t.time);this._timeline.splice(n+1,0,t)}if(this.length>this.memory){var r=this.length-this.memory;this._timeline.splice(0,r)}return this},e.prototype.remove=function(t){var e=this._timeline.indexOf(t);return-1!==e&&this._timeline.splice(e,1),this},e.prototype.get=function(t,e){void 0===e&&(e="time");var n=this._search(t,e);return-1!==n?this._timeline[n]:null},e.prototype.peek=function(){return this._timeline[0]},e.prototype.shift=function(){return this._timeline.shift()},e.prototype.getAfter=function(t,e){void 0===e&&(e="time");var n=this._search(t,e);return n+1<this._timeline.length?this._timeline[n+1]:null},e.prototype.getBefore=function(t){var e=this._timeline.length;if(e>0&&this._timeline[e-1].time<t)return this._timeline[e-1];var n=this._search(t);return n-1>=0?this._timeline[n-1]:null},e.prototype.cancel=function(t){if(this._timeline.length>1){var e=this._search(t);if(e>=0)if(H(this._timeline[e].time,t)){for(var n=e;n>=0&&H(this._timeline[n].time,t);n--)e=n;this._timeline=this._timeline.slice(0,e)}else this._timeline=this._timeline.slice(0,e+1);else this._timeline=[]}else 1===this._timeline.length&&W(this._timeline[0].time,t)&&(this._timeline=[]);return this},e.prototype.cancelBefore=function(t){var e=this._search(t);return e>=0&&(this._timeline=this._timeline.slice(e+1)),this},e.prototype.previousEvent=function(t){var e=this._timeline.indexOf(t);return e>0?this._timeline[e-1]:null},e.prototype._search=function(t,e){if(void 0===e&&(e="time"),0===this._timeline.length)return-1;var n=0,r=this._timeline.length,o=r;if(r>0&&this._timeline[r-1][e]<=t)return r-1;for(;n<o;){var i=Math.floor(n+(o-n)/2),a=this._timeline[i],s=this._timeline[i+1];if(H(a[e],t)){for(var u=i;u<this._timeline.length;u++){if(!H(this._timeline[u][e],t))break;i=u}return i}if($(a[e],t)&&U(s[e],t))return i;U(a[e],t)?o=i:n=i+1}return-1},e.prototype._iterate=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this._timeline.length-1),this._timeline.slice(e,n+1).forEach(t)},e.prototype.forEach=function(t){return this._iterate(t),this},e.prototype.forEachBefore=function(t,e){var n=this._search(t);return-1!==n&&this._iterate(e,0,n),this},e.prototype.forEachAfter=function(t,e){var n=this._search(t);return this._iterate(e,n+1),this},e.prototype.forEachBetween=function(t,e,n){var r=this._search(t),o=this._search(e);return-1!==r&&-1!==o?(this._timeline[r].time!==t&&(r+=1),this._timeline[o].time===e&&(o-=1),this._iterate(n,r,o)):-1===r&&this._iterate(n,0,o),this},e.prototype.forEachFrom=function(t,e){for(var n=this._search(t);n>=0&&this._timeline[n].time>=t;)n--;return this._iterate(e,n+1),this},e.prototype.forEachAtTime=function(t,e){var n=this._search(t);if(-1!==n&&H(this._timeline[n].time,t)){for(var r=n,o=n;o>=0&&H(this._timeline[o].time,t);o--)r=o;this._iterate((function(t){e(t)}),r,n)}return this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._timeline=[],this},e}(B),Q=[];function Y(t){Q.push(t)}var X=[];function J(t){X.push(t)}var Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Emitter",e}return i(e,t),e.prototype.on=function(t,e){var n=this;return t.split(/\W+/).forEach((function(t){g(n._events)&&(n._events={}),n._events.hasOwnProperty(t)||(n._events[t]=[]),n._events[t].push(e)})),this},e.prototype.once=function(t,e){var n=this,r=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];e.apply(void 0,f(o)),n.off(t,r)};return this.on(t,r),this},e.prototype.off=function(t,e){var n=this;return t.split(/\W+/).forEach((function(r){if(g(n._events)&&(n._events={}),n._events.hasOwnProperty(t))if(g(e))n._events[t]=[];else for(var o=n._events[t],i=0;i<o.length;i++)o[i]===e&&o.splice(i,1)})),this},e.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(this._events&&this._events.hasOwnProperty(t))for(var r=this._events[t].slice(0),o=0,i=r.length;o<i;o++)r[o].apply(this,e);return this},e.mixin=function(t){["on","once","off","emit"].forEach((function(n){var r=Object.getOwnPropertyDescriptor(e.prototype,n);Object.defineProperty(t.prototype,n,r)}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events=void 0,this},e}(B),tt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isOffline=!1,e}return i(e,t),e}(Z),et=function(t){function e(){var n=t.call(this)||this;n.name="Context",n._constants=new Map,n._timeouts=new K,n._timeoutIds=0,n._initialized=!1,n.isOffline=!1,n._workletModules=new Map;var r=V(e.getDefaults(),arguments,["context"]);return r.context?n._context=r.context:n._context=C(),n._latencyHint=r.latencyHint,n.lookAhead=r.lookAhead,n._ticker=new P(n.emit.bind(n,"tick"),r.clockSource,r.updateInterval),n.on("tick",n._timeoutLoop.bind(n)),n._context.onstatechange=function(){n.emit("statechange",n.state)},n}return i(e,t),e.getDefaults=function(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}},e.prototype.initialize=function(){var t;return this._initialized||(t=this,Q.forEach((function(e){return e(t)})),this._initialized=!0),this},e.prototype.createAnalyser=function(){return this._context.createAnalyser()},e.prototype.createOscillator=function(){return this._context.createOscillator()},e.prototype.createBufferSource=function(){return this._context.createBufferSource()},e.prototype.createBiquadFilter=function(){return this._context.createBiquadFilter()},e.prototype.createBuffer=function(t,e,n){return this._context.createBuffer(t,e,n)},e.prototype.createChannelMerger=function(t){return this._context.createChannelMerger(t)},e.prototype.createChannelSplitter=function(t){return this._context.createChannelSplitter(t)},e.prototype.createConstantSource=function(){return this._context.createConstantSource()},e.prototype.createConvolver=function(){return this._context.createConvolver()},e.prototype.createDelay=function(t){return this._context.createDelay(t)},e.prototype.createDynamicsCompressor=function(){return this._context.createDynamicsCompressor()},e.prototype.createGain=function(){return this._context.createGain()},e.prototype.createIIRFilter=function(t,e){return this._context.createIIRFilter(t,e)},e.prototype.createPanner=function(){return this._context.createPanner()},e.prototype.createPeriodicWave=function(t,e,n){return this._context.createPeriodicWave(t,e,n)},e.prototype.createStereoPanner=function(){return this._context.createStereoPanner()},e.prototype.createWaveShaper=function(){return this._context.createWaveShaper()},e.prototype.createMediaStreamSource=function(t){if(R(this._context))return this._context.createMediaStreamSource(t);throw new Error("Only available on online audio context")},e.prototype.decodeAudioData=function(t){return this._context.decodeAudioData(t)},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._context.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._context.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sampleRate",{get:function(){return this._context.sampleRate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listener",{get:function(){return this.initialize(),this._listener},set:function(t){p(!this._initialized,"The listener cannot be set after initialization."),this._listener=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transport",{get:function(){return this.initialize(),this._transport},set:function(t){p(!this._initialized,"The transport cannot be set after initialization."),this._transport=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draw",{get:function(){return this.initialize(),this._draw},set:function(t){p(!this._initialized,"Draw cannot be set after initialization."),this._draw=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destination",{get:function(){return this.initialize(),this._destination},set:function(t){p(!this._initialized,"The destination cannot be set after initialization."),this._destination=t},enumerable:!0,configurable:!0}),e.prototype.createAudioWorkletNode=function(t,e){return function(t,e,n){return p(b(r.AudioWorkletNode),"This node only works in a secure context (https or localhost)"),new r.AudioWorkletNode(t,e,n)}(this.rawContext,t,e)},e.prototype.addAudioWorkletModule=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return p(b(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletModules.has(e)||this._workletModules.set(e,this.rawContext.audioWorklet.addModule(t)),[4,this._workletModules.get(e)];case 1:return n.sent(),[2]}}))}))},e.prototype.workletsAreReady=function(){return s(this,void 0,void 0,(function(){var t;return u(this,(function(e){switch(e.label){case 0:return t=[],this._workletModules.forEach((function(e){return t.push(e)})),[4,Promise.all(t)];case 1:return e.sent(),[2]}}))}))},Object.defineProperty(e.prototype,"updateInterval",{get:function(){return this._ticker.updateInterval},set:function(t){this._ticker.updateInterval=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"clockSource",{get:function(){return this._ticker.type},set:function(t){this._ticker.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"latencyHint",{get:function(){return this._latencyHint},set:function(t){var e=0;if(this._latencyHint=t,k(t))switch(t){case"interactive":e=.1;break;case"playback":e=.8;break;case"balanced":e=.25;break;case"fastest":e=.01}this.lookAhead=e,this.updateInterval=e/2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawContext",{get:function(){return this._context},enumerable:!0,configurable:!0}),e.prototype.now=function(){return this._context.currentTime+this.lookAhead},e.prototype.immediate=function(){return this._context.currentTime},e.prototype.resume=function(){return"suspended"===this._context.state&&R(this._context)?this._context.resume():Promise.resolve()},e.prototype.close=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return R(this._context)?[4,this._context.close()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this._initialized&&(e=this,X.forEach((function(t){return t(e)}))),[2]}var e}))}))},e.prototype.getConstant=function(t){if(this._constants.has(t))return this._constants.get(t);for(var e=this._context.createBuffer(1,128,this._context.sampleRate),n=e.getChannelData(0),r=0;r<n.length;r++)n[r]=t;var o=this._context.createBufferSource();return o.channelCount=1,o.channelCountMode="explicit",o.buffer=e,o.loop=!0,o.start(0),this._constants.set(t,o),o},e.prototype.dispose=function(){var e=this;return t.prototype.dispose.call(this),this._ticker.dispose(),this._timeouts.dispose(),Object.keys(this._constants).map((function(t){return e._constants[t].disconnect()})),this},e.prototype._timeoutLoop=function(){for(var t=this.now(),e=this._timeouts.peek();this._timeouts.length&&e&&e.time<=t;)e.callback(),this._timeouts.shift(),e=this._timeouts.peek()},e.prototype.setTimeout=function(t,e){this._timeoutIds++;var n=this.now();return this._timeouts.add({callback:t,id:this._timeoutIds,time:n+e}),this._timeoutIds},e.prototype.clearTimeout=function(t){var e=this;return this._timeouts.forEach((function(n){n.id===t&&e._timeouts.remove(n)})),this},e.prototype.clearInterval=function(t){return this.clearTimeout(t)},e.prototype.setInterval=function(t,e){var n=this,r=++this._timeoutIds,o=function(){var i=n.now();n._timeouts.add({callback:function(){t(),o()},id:r,time:i+e})};return o(),r},e}(tt),nt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.lookAhead=0,e.latencyHint=0,e.isOffline=!1,e}return i(e,t),e.prototype.createAnalyser=function(){return{}},e.prototype.createOscillator=function(){return{}},e.prototype.createBufferSource=function(){return{}},e.prototype.createBiquadFilter=function(){return{}},e.prototype.createBuffer=function(t,e,n){return{}},e.prototype.createChannelMerger=function(t){return{}},e.prototype.createChannelSplitter=function(t){return{}},e.prototype.createConstantSource=function(){return{}},e.prototype.createConvolver=function(){return{}},e.prototype.createDelay=function(t){return{}},e.prototype.createDynamicsCompressor=function(){return{}},e.prototype.createGain=function(){return{}},e.prototype.createIIRFilter=function(t,e){return{}},e.prototype.createPanner=function(){return{}},e.prototype.createPeriodicWave=function(t,e,n){return{}},e.prototype.createStereoPanner=function(){return{}},e.prototype.createWaveShaper=function(){return{}},e.prototype.createMediaStreamSource=function(t){return{}},e.prototype.decodeAudioData=function(t){return Promise.resolve({})},e.prototype.createAudioWorkletNode=function(t,e){return{}},Object.defineProperty(e.prototype,"rawContext",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.addAudioWorkletModule=function(t,e){return s(this,void 0,void 0,(function(){return u(this,(function(t){return[2,Promise.resolve()]}))}))},e.prototype.resume=function(){return Promise.resolve()},e.prototype.setTimeout=function(t,e){return 0},e.prototype.clearTimeout=function(t){return this},e.prototype.setInterval=function(t,e){return 0},e.prototype.clearInterval=function(t){return this},e.prototype.getConstant=function(t){return{}},Object.defineProperty(e.prototype,"currentTime",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sampleRate",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listener",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"transport",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"draw",{get:function(){return{}},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destination",{get:function(){return{}},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.now=function(){return 0},e.prototype.immediate=function(){return 0},e}(tt);function rt(t,e){S(e)?e.forEach((function(e){return rt(t,e)})):Object.defineProperty(t,e,{enumerable:!0,writable:!1})}function ot(t,e){S(e)?e.forEach((function(e){return ot(t,e)})):Object.defineProperty(t,e,{writable:!0})}var it=function(){},at=function(t){function e(){var n=t.call(this)||this;n.name="ToneAudioBuffer",n.onload=it;var r=V(e.getDefaults(),arguments,["url","onload","onerror"]);return n.reverse=r.reverse,n.onload=r.onload,r.url&&N(r.url)||r.url instanceof e?n.set(r.url):k(r.url)&&n.load(r.url).catch(r.onerror),n}return i(e,t),e.getDefaults=function(){return{onerror:it,onload:it,reverse:!1}},Object.defineProperty(e.prototype,"sampleRate",{get:function(){return this._buffer?this._buffer.sampleRate:lt().sampleRate},enumerable:!0,configurable:!0}),e.prototype.set=function(t){var n=this;return t instanceof e?t.loaded?this._buffer=t.get():t.onload=function(){n.set(t),n.onload(n)}:this._buffer=t,this._reversed&&this._reverse(),this},e.prototype.get=function(){return this._buffer},e.prototype.load=function(t){return s(this,void 0,void 0,(function(){var n,r,o;return u(this,(function(i){switch(i.label){case 0:n=e.load(t),e.downloads.push(n),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,n];case 2:return r=i.sent(),this.set(r),this.onload(this),[3,4];case 3:return o=e.downloads.indexOf(n),e.downloads.splice(o,1),[7];case 4:return[2,this]}}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffer=void 0,this},e.prototype.fromArray=function(t){for(var e=S(t)&&t[0].length>0,n=e?t.length:1,r=e?t[0].length:t.length,o=lt(),i=o.createBuffer(n,r,o.sampleRate),a=e||1!==n?t:[t],s=0;s<n;s++)i.copyToChannel(a[s],s);return this._buffer=i,this},e.prototype.toMono=function(t){if(w(t))this.fromArray(this.toArray(t));else{for(var e=new Float32Array(this.length),n=this.numberOfChannels,r=0;r<n;r++)for(var o=this.toArray(r),i=0;i<o.length;i++)e[i]+=o[i];e=e.map((function(t){return t/n})),this.fromArray(e)}return this},e.prototype.toArray=function(t){if(w(t))return this.getChannelData(t);if(1===this.numberOfChannels)return this.toArray(0);for(var e=[],n=0;n<this.numberOfChannels;n++)e[n]=this.getChannelData(n);return e},e.prototype.getChannelData=function(t){return this._buffer?this._buffer.getChannelData(t):new Float32Array(0)},e.prototype.slice=function(t,n){void 0===n&&(n=this.duration);var r=Math.floor(t*this.sampleRate),o=Math.floor(n*this.sampleRate);p(r<o,"The start time must be less than the end time");for(var i=o-r,a=lt().createBuffer(this.numberOfChannels,i,this.sampleRate),s=0;s<this.numberOfChannels;s++)a.copyToChannel(this.getChannelData(s).subarray(r,o),s);return new e(a)},e.prototype._reverse=function(){if(this.loaded)for(var t=0;t<this.numberOfChannels;t++)this.getChannelData(t).reverse();return this},Object.defineProperty(e.prototype,"loaded",{get:function(){return this.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._buffer?this._buffer.duration:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer?this._buffer.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfChannels",{get:function(){return this._buffer?this._buffer.numberOfChannels:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverse",{get:function(){return this._reversed},set:function(t){this._reversed!==t&&(this._reversed=t,this._reverse())},enumerable:!0,configurable:!0}),e.fromArray=function(t){return(new e).fromArray(t)},e.fromUrl=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,(new e).load(t)];case 1:return[2,n.sent()]}}))}))},e.load=function(t){return s(this,void 0,void 0,(function(){var n,r,o,i,a,s,l,f,p,h,d;return u(this,(function(u){switch(u.label){case 0:if(n=t.match(/\[(.+\|?)+\]$/)){r=n[1].split("|"),o=r[0];try{for(i=c(r),a=i.next();!a.done;a=i.next())if(s=a.value,e.supportsType(s)){o=s;break}}catch(t){h={error:t}}finally{try{a&&!a.done&&(d=i.return)&&d.call(i)}finally{if(h)throw h.error}}t=t.replace(n[0],o)}return l=""===e.baseUrl||e.baseUrl.endsWith("/")?e.baseUrl:e.baseUrl+"/",[4,fetch(l+t)];case 1:if(!(f=u.sent()).ok)throw new Error("could not load url: "+t);return[4,f.arrayBuffer()];case 2:return p=u.sent(),[4,lt().decodeAudioData(p)];case 3:return[2,u.sent()]}}))}))},e.supportsType=function(t){var e=t.split("."),n=e[e.length-1];return""!==document.createElement("audio").canPlayType("audio/"+n)},e.loaded=function(){return s(this,void 0,void 0,(function(){var t,n,r,o,i;return u(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,6,7]),t=c(e.downloads),n=t.next(),a.label=1;case 1:return n.done?[3,4]:[4,n.value];case 2:a.sent(),a.label=3;case 3:return n=t.next(),[3,1];case 4:return[3,7];case 5:return r=a.sent(),o={error:r},[3,7];case 6:try{n&&!n.done&&(i=t.return)&&i.call(t)}finally{if(o)throw o.error}return[7];case 7:return[2,Promise.resolve()]}}))}))},e.baseUrl="",e.downloads=[],e}(B),st=function(t){function e(){var e=t.call(this,{clockSource:"offline",context:I(arguments[0])?arguments[0]:E(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:I(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]})||this;return e.name="OfflineContext",e._currentTime=0,e.isOffline=!0,e._duration=I(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1],e}return i(e,t),e.prototype.now=function(){return this._currentTime},Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._currentTime},enumerable:!0,configurable:!0}),e.prototype._renderClock=function(t){return s(this,void 0,void 0,(function(){var e,n;return u(this,(function(r){switch(r.label){case 0:e=0,r.label=1;case 1:return this._duration-this._currentTime>=0?(this.emit("tick"),this._currentTime+=128/this.sampleRate,e++,n=Math.floor(this.sampleRate/128),t&&e%n==0?[4,new Promise((function(t){return setTimeout(t,1)}))]:[3,3]):[3,4];case 2:r.sent(),r.label=3;case 3:return[3,1];case 4:return[2]}}))}))},e.prototype.render=function(t){return void 0===t&&(t=!0),s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,this.workletsAreReady()];case 1:return n.sent(),[4,this._renderClock(t)];case 2:return n.sent(),[4,this._context.startRendering()];case 3:return e=n.sent(),[2,new at(e)]}}))}))},e.prototype.close=function(){return Promise.resolve()},e}(et),ut=new nt,ct=ut;function lt(){return ct===ut&&j&&ft(new et),ct}function ft(t){ct=R(t)?new et(t):I(t)?new st(t):t}if(A&&!A.TONE_SILENCE_LOGGING){var pt="v";0;var ht=" * Tone.js "+pt+"14.5.39 * ";console.log("%c"+ht,"background: #000; color: #fff")}function dt(t){return Math.pow(10,t/20)}function yt(t){return Math.log(t)/Math.LN10*20}function vt(t){return Math.pow(2,t/12)}var mt=440;function gt(t){return Math.round(function(t){return 69+12*Math.log2(t/mt)}(t))}function bt(t){return mt*Math.pow(2,(t-69)/12)}var _t=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="TimeClass",e}return i(e,t),e.prototype._getExpressions=function(){var n=this;return Object.assign(t.prototype._getExpressions.call(this),{now:{method:function(t){return n._now()+new n.constructor(n.context,t).valueOf()},regexp:/^\+(.+)/},quantize:{method:function(t){var r=new e(n.context,t).valueOf();return n._secondsToUnits(n.context.transport.nextSubdivision(r))},regexp:/^@(.+)/}})},e.prototype.quantize=function(t,e){void 0===e&&(e=1);var n=new this.constructor(this.context,t).valueOf(),r=this.valueOf();return r+(Math.round(r/n)*n-r)*e},e.prototype.toNotation=function(){for(var t=this,n=this.toSeconds(),r=["1m"],o=1;o<9;o++){var i=Math.pow(2,o);r.push(i+"n."),r.push(i+"n"),r.push(i+"t")}r.push("0");var a=r[0],s=new e(this.context,r[0]).toSeconds();return r.forEach((function(r){var o=new e(t.context,r).toSeconds();Math.abs(o-n)<Math.abs(s-n)&&(a=r,s=o)})),a},e.prototype.toBarsBeatsSixteenths=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t;e=parseFloat(e.toFixed(4));var n=Math.floor(e/this._getTimeSignature()),r=e%1*4;e=Math.floor(e)%this._getTimeSignature();var o=r.toString();return o.length>3&&(r=parseFloat(parseFloat(o).toFixed(3))),[n,e,r].join(":")},e.prototype.toTicks=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.round(e*this._getPPQ())},e.prototype.toSeconds=function(){return this.valueOf()},e.prototype.toMidi=function(){return gt(this.toFrequency())},e.prototype._now=function(){return this.context.now()},e}(function(t){function e(e,n,r){var o=t.call(this)||this;return o.defaultUnits="s",o._val=n,o._units=r,o.context=e,o._expressions=o._getExpressions(),o}return i(e,t),e.prototype._getExpressions=function(){var t=this;return{hz:{method:function(e){return t._frequencyToUnits(parseFloat(e))},regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:function(e){return t._ticksToUnits(parseInt(e,10))},regexp:/^(\d+)i$/i},m:{method:function(e){return t._beatsToUnits(parseInt(e,10)*t._getTimeSignature())},regexp:/^(\d+)m$/i},n:{method:function(e,n){var r=parseInt(e,10),o="."===n?1.5:1;return 1===r?t._beatsToUnits(t._getTimeSignature())*o:t._beatsToUnits(4/r)*o},regexp:/^(\d+)n(\.?)$/i},number:{method:function(e){return t._expressions[t.defaultUnits].method.call(t,e)},regexp:/^(\d+(?:\.\d+)?)$/},s:{method:function(e){return t._secondsToUnits(parseFloat(e))},regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:function(e){return parseInt(e,10)/t.context.sampleRate},regexp:/^(\d+)samples$/},t:{method:function(e){var n=parseInt(e,10);return t._beatsToUnits(8/(3*Math.floor(n)))},regexp:/^(\d+)t$/i},tr:{method:function(e,n,r){var o=0;return e&&"0"!==e&&(o+=t._beatsToUnits(t._getTimeSignature()*parseFloat(e))),n&&"0"!==n&&(o+=t._beatsToUnits(parseFloat(n))),r&&"0"!==r&&(o+=t._beatsToUnits(parseFloat(r)/4)),o},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}},e.prototype.valueOf=function(){if(this._val instanceof e&&this.fromType(this._val),g(this._val))return this._noArg();if(k(this._val)&&g(this._units)){for(var t in this._expressions)if(this._expressions[t].regexp.test(this._val.trim())){this._units=t;break}}else if(x(this._val)){var n=0;for(var r in this._val)if(b(this._val[r])){var o=this._val[r];n+=new this.constructor(this.context,r).valueOf()*o}return n}if(b(this._units)){var i=this._expressions[this._units],a=this._val.toString().trim().match(i.regexp);return a?i.method.apply(this,a.slice(1)):i.method.call(this,this._val)}return k(this._val)?parseFloat(this._val):this._val},e.prototype._frequencyToUnits=function(t){return 1/t},e.prototype._beatsToUnits=function(t){return 60/this._getBpm()*t},e.prototype._secondsToUnits=function(t){return t},e.prototype._ticksToUnits=function(t){return t*this._beatsToUnits(1)/this._getPPQ()},e.prototype._noArg=function(){return this._now()},e.prototype._getBpm=function(){return this.context.transport.bpm.value},e.prototype._getTimeSignature=function(){return this.context.transport.timeSignature},e.prototype._getPPQ=function(){return this.context.transport.PPQ},e.prototype.fromType=function(t){switch(this._units=void 0,this.defaultUnits){case"s":this._val=t.toSeconds();break;case"i":this._val=t.toTicks();break;case"hz":this._val=t.toFrequency();break;case"midi":this._val=t.toMidi()}return this},e.prototype.toFrequency=function(){return 1/this.toSeconds()},e.prototype.toSamples=function(){return this.toSeconds()*this.context.sampleRate},e.prototype.toMilliseconds=function(){return 1e3*this.toSeconds()},e}(B));var wt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Frequency",e.defaultUnits="hz",e}return i(e,t),Object.defineProperty(e,"A4",{get:function(){return mt},set:function(t){!function(t){mt=t}(t)},enumerable:!0,configurable:!0}),e.prototype._getExpressions=function(){return Object.assign({},t.prototype._getExpressions.call(this),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method:function(t){return"midi"===this.defaultUnits?t:e.mtof(t)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method:function(t,n){var r=xt[t.toLowerCase()]+12*(parseInt(n,10)+1);return"midi"===this.defaultUnits?r:e.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method:function(t,e,n){var r=1;return t&&"0"!==t&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(t))),e&&"0"!==e&&(r*=this._beatsToUnits(parseFloat(e))),n&&"0"!==n&&(r*=this._beatsToUnits(parseFloat(n)/4)),r}}})},e.prototype.transpose=function(t){return new e(this.context,this.valueOf()*vt(t))},e.prototype.harmonize=function(t){var e=this;return t.map((function(t){return e.transpose(t)}))},e.prototype.toMidi=function(){return gt(this.valueOf())},e.prototype.toNote=function(){var t=this.toFrequency(),n=Math.log2(t/e.A4),r=Math.round(12*n)+57,o=Math.floor(r/12);return o<0&&(r+=-12*o),Ot[r%12]+o.toString()},e.prototype.toSeconds=function(){return 1/t.prototype.toSeconds.call(this)},e.prototype.toTicks=function(){var t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.floor(e*this._getPPQ())},e.prototype._noArg=function(){return 0},e.prototype._frequencyToUnits=function(t){return t},e.prototype._ticksToUnits=function(t){return 1/(60*t/(this._getBpm()*this._getPPQ()))},e.prototype._beatsToUnits=function(e){return 1/t.prototype._beatsToUnits.call(this,e)},e.prototype._secondsToUnits=function(t){return 1/t},e.mtof=function(t){return bt(t)},e.ftom=function(t){return gt(t)},e}(_t),xt={cbb:-2,cb:-1,c:0,"c#":1,cx:2,dbb:0,db:1,d:2,"d#":3,dx:4,ebb:2,eb:3,e:4,"e#":5,ex:6,fbb:3,fb:4,f:5,"f#":6,fx:7,gbb:5,gb:6,g:7,"g#":8,gx:9,abb:7,ab:8,a:9,"a#":10,ax:11,bbb:9,bb:10,b:11,"b#":12,bx:13},Ot=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];var St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="TransportTime",e}return i(e,t),e.prototype._now=function(){return this.context.transport.seconds},e}(_t);var kt=function(t){function e(){var n=t.call(this)||this,r=V(e.getDefaults(),arguments,["context"]);return n.defaultContext?n.context=n.defaultContext:n.context=r.context,n}return i(e,t),e.getDefaults=function(){return{context:lt()}},e.prototype.now=function(){return this.context.currentTime+this.context.lookAhead},e.prototype.immediate=function(){return this.context.currentTime},Object.defineProperty(e.prototype,"sampleTime",{get:function(){return 1/this.context.sampleRate},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blockTime",{get:function(){return 128/this.context.sampleRate},enumerable:!0,configurable:!0}),e.prototype.toSeconds=function(t){return new _t(this.context,t).toSeconds()},e.prototype.toFrequency=function(t){return new wt(this.context,t).toFrequency()},e.prototype.toTicks=function(t){return new St(this.context,t).toTicks()},e.prototype._getPartialProperties=function(t){var e=this.get();return Object.keys(e).forEach((function(n){g(t[n])&&delete e[n]})),e},e.prototype.get=function(){var t=this,n=this.constructor.getDefaults();return Object.keys(n).forEach((function(r){if(Reflect.has(t,r)){var o=t[r];b(o)&&b(o.value)&&b(o.setValueAtTime)?n[r]=o.value:o instanceof e?n[r]=o._getPartialProperties(n[r]):S(o)||w(o)||k(o)||O(o)?n[r]=o:delete n[r]}})),n},e.prototype.set=function(t){var n=this;return Object.keys(t).forEach((function(r){Reflect.has(n,r)&&b(n[r])&&(n[r]&&b(n[r].value)&&b(n[r].setValueAtTime)?n[r].value!==t[r]&&(n[r].value=t[r]):n[r]instanceof e?n[r].set(t[r]):n[r]=t[r])})),this},e}(B),Tt=function(t){function e(e){void 0===e&&(e="stopped");var n=t.call(this)||this;return n.name="StateTimeline",n._initial=e,n.setStateAtTime(n._initial,0),n}return i(e,t),e.prototype.getValueAtTime=function(t){var e=this.get(t);return null!==e?e.state:this._initial},e.prototype.setStateAtTime=function(t,e,n){return h(e,0),this.add(Object.assign({},n,{state:t,time:e})),this},e.prototype.getLastState=function(t,e){for(var n=this._search(e);n>=0;n--){var r=this._timeline[n];if(r.state===t)return r}},e.prototype.getNextState=function(t,e){var n=this._search(e);if(-1!==n)for(var r=n;r<this._timeline.length;r++){var o=this._timeline[r];if(o.state===t)return o}},e}(K),Ct=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["param","units","convert"]))||this;n.name="Param",n.overridden=!1,n._minOutput=1e-7;var r=V(e.getDefaults(),arguments,["param","units","convert"]);for(p(b(r.param)&&(D(r.param)||r.param instanceof e),"param must be an AudioParam");!D(r.param);)r.param=r.param._param;return n._swappable=!!b(r.swappable)&&r.swappable,n._swappable?(n.input=n.context.createGain(),n._param=r.param,n.input.connect(n._param)):n._param=n.input=r.param,n._events=new K(1e3),n._initialValue=n._param.defaultValue,n.units=r.units,n.convert=r.convert,n._minValue=r.minValue,n._maxValue=r.maxValue,b(r.value)&&r.value!==n._toType(n._initialValue)&&n.setValueAtTime(r.value,0),n}return i(e,t),e.getDefaults=function(){return Object.assign(kt.getDefaults(),{convert:!0,units:"number"})},Object.defineProperty(e.prototype,"value",{get:function(){var t=this.now();return this.getValueAtTime(t)},set:function(t){this.cancelScheduledValues(this.now()),this.setValueAtTime(t,this.now())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minValue",{get:function(){return b(this._minValue)?this._minValue:"time"===this.units||"frequency"===this.units||"normalRange"===this.units||"positive"===this.units||"transportTime"===this.units||"ticks"===this.units||"bpm"===this.units||"hertz"===this.units||"samples"===this.units?0:"audioRange"===this.units?-1:"decibels"===this.units?-1/0:this._param.minValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxValue",{get:function(){return b(this._maxValue)?this._maxValue:"normalRange"===this.units||"audioRange"===this.units?1:this._param.maxValue},enumerable:!0,configurable:!0}),e.prototype._is=function(t,e){return this.units===e},e.prototype._assertRange=function(t){return b(this.maxValue)&&b(this.minValue)&&h(t,this._fromType(this.minValue),this._fromType(this.maxValue)),t},e.prototype._fromType=function(t){return this.convert&&!this.overridden?this._is(t,"time")?this.toSeconds(t):this._is(t,"decibels")?dt(t):this._is(t,"frequency")?this.toFrequency(t):t:this.overridden?0:t},e.prototype._toType=function(t){return this.convert&&"decibels"===this.units?yt(t):t},e.prototype.setValueAtTime=function(t,e){var n=this.toSeconds(e),r=this._fromType(t);return p(isFinite(r)&&isFinite(n),"Invalid argument(s) to setValueAtTime: "+JSON.stringify(t)+", "+JSON.stringify(e)),this._assertRange(r),this.log(this.units,"setValueAtTime",t,n),this._events.add({time:n,type:"setValueAtTime",value:r}),this._param.setValueAtTime(r,n),this},e.prototype.getValueAtTime=function(t){var e=Math.max(this.toSeconds(t),0),n=this._events.getAfter(e),r=this._events.get(e),o=this._initialValue;if(null===r)o=this._initialValue;else if("setTargetAtTime"!==r.type||null!==n&&"setValueAtTime"!==n.type)if(null===n)o=r.value;else if("linearRampToValueAtTime"===n.type||"exponentialRampToValueAtTime"===n.type){var i=r.value;if("setTargetAtTime"===r.type)i=null===(a=this._events.getBefore(r.time))?this._initialValue:a.value;o="linearRampToValueAtTime"===n.type?this._linearInterpolate(r.time,i,n.time,n.value,e):this._exponentialInterpolate(r.time,i,n.time,n.value,e)}else o=r.value;else{var a,s=void 0;s=null===(a=this._events.getBefore(r.time))?this._initialValue:a.value,"setTargetAtTime"===r.type&&(o=this._exponentialApproach(r.time,s,r.value,r.constant,e))}return this._toType(o)},e.prototype.setRampPoint=function(t){t=this.toSeconds(t);var e=this.getValueAtTime(t);return this.cancelAndHoldAtTime(t),0===this._fromType(e)&&(e=this._toType(this._minOutput)),this.setValueAtTime(e,t),this},e.prototype.linearRampToValueAtTime=function(t,e){var n=this._fromType(t),r=this.toSeconds(e);return p(isFinite(n)&&isFinite(r),"Invalid argument(s) to linearRampToValueAtTime: "+JSON.stringify(t)+", "+JSON.stringify(e)),this._assertRange(n),this._events.add({time:r,type:"linearRampToValueAtTime",value:n}),this.log(this.units,"linearRampToValueAtTime",t,r),this._param.linearRampToValueAtTime(n,r),this},e.prototype.exponentialRampToValueAtTime=function(t,e){var n=this._fromType(t);n=Math.max(this._minOutput,n),this._assertRange(n);var r=this.toSeconds(e);return p(isFinite(n)&&isFinite(r),"Invalid argument(s) to exponentialRampToValueAtTime: "+JSON.stringify(t)+", "+JSON.stringify(e)),this._events.add({time:r,type:"exponentialRampToValueAtTime",value:n}),this.log(this.units,"exponentialRampToValueAtTime",t,r),this._param.exponentialRampToValueAtTime(n,r),this},e.prototype.exponentialRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialRampToValueAtTime(t,n+this.toSeconds(e)),this},e.prototype.linearRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.linearRampToValueAtTime(t,n+this.toSeconds(e)),this},e.prototype.targetRampTo=function(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialApproachValueAtTime(t,n,e),this},e.prototype.exponentialApproachValueAtTime=function(t,e,n){e=this.toSeconds(e),n=this.toSeconds(n);var r=Math.log(n+1)/Math.log(200);return this.setTargetAtTime(t,e,r),this.cancelAndHoldAtTime(e+.9*n),this.linearRampToValueAtTime(t,e+n),this},e.prototype.setTargetAtTime=function(t,e,n){var r=this._fromType(t);p(isFinite(n)&&n>0,"timeConstant must be a number greater than 0");var o=this.toSeconds(e);return this._assertRange(r),p(isFinite(r)&&isFinite(o),"Invalid argument(s) to setTargetAtTime: "+JSON.stringify(t)+", "+JSON.stringify(e)),this._events.add({constant:n,time:o,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",t,o,n),this._param.setTargetAtTime(r,o,n),this},e.prototype.setValueCurveAtTime=function(t,e,n,r){void 0===r&&(r=1),n=this.toSeconds(n),e=this.toSeconds(e);var o=this._fromType(t[0])*r;this.setValueAtTime(this._toType(o),e);for(var i=n/(t.length-1),a=1;a<t.length;a++){var s=this._fromType(t[a])*r;this.linearRampToValueAtTime(this._toType(s),e+a*i)}return this},e.prototype.cancelScheduledValues=function(t){var e=this.toSeconds(t);return p(isFinite(e),"Invalid argument to cancelScheduledValues: "+JSON.stringify(t)),this._events.cancel(e),this._param.cancelScheduledValues(e),this.log(this.units,"cancelScheduledValues",e),this},e.prototype.cancelAndHoldAtTime=function(t){var e=this.toSeconds(t),n=this._fromType(this.getValueAtTime(e));p(isFinite(e),"Invalid argument to cancelAndHoldAtTime: "+JSON.stringify(t)),this.log(this.units,"cancelAndHoldAtTime",e,"value="+n);var r=this._events.get(e),o=this._events.getAfter(e);return r&&H(r.time,e)?o?(this._param.cancelScheduledValues(o.time),this._events.cancel(o.time)):(this._param.cancelAndHoldAtTime(e),this._events.cancel(e+this.sampleTime)):o&&(this._param.cancelScheduledValues(o.time),this._events.cancel(o.time),"linearRampToValueAtTime"===o.type?this.linearRampToValueAtTime(this._toType(n),e):"exponentialRampToValueAtTime"===o.type&&this.exponentialRampToValueAtTime(this._toType(n),e)),this._events.add({time:e,type:"setValueAtTime",value:n}),this._param.setValueAtTime(n,e),this},e.prototype.rampTo=function(t,e,n){return void 0===e&&(e=.1),"frequency"===this.units||"bpm"===this.units||"decibels"===this.units?this.exponentialRampTo(t,e,n):this.linearRampTo(t,e,n),this},e.prototype.apply=function(t){var e=this.context.currentTime;t.setValueAtTime(this.getValueAtTime(e),e);var n=this._events.get(e);if(n&&"setTargetAtTime"===n.type)for(var r=this._events.getAfter(n.time),o=r?r.time:e+2,i=(o-e)/10,a=e;a<o;a+=i)t.linearRampToValueAtTime(this.getValueAtTime(a),a);return this._events.forEachAfter(this.context.currentTime,(function(e){"cancelScheduledValues"===e.type?t.cancelScheduledValues(e.time):"setTargetAtTime"===e.type?t.setTargetAtTime(e.value,e.time,e.constant):t[e.type](e.value,e.time)})),this},e.prototype.setParam=function(t){p(this._swappable,"The Param must be assigned as 'swappable' in the constructor");var e=this.input;return e.disconnect(this._param),this.apply(t),this._param=t,e.connect(this._param),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events.dispose(),this},Object.defineProperty(e.prototype,"defaultValue",{get:function(){return this._toType(this._param.defaultValue)},enumerable:!0,configurable:!0}),e.prototype._exponentialApproach=function(t,e,n,r,o){return n+(e-n)*Math.exp(-(o-t)/r)},e.prototype._linearInterpolate=function(t,e,n,r,o){return e+(o-t)/(n-t)*(r-e)},e.prototype._exponentialInterpolate=function(t,e,n,r,o){return e*Math.pow(r/e,(o-t)/(n-t))},e}(kt),Et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="ToneAudioNode",e._internalChannels=[],e}return i(e,t),Object.defineProperty(e.prototype,"numberOfInputs",{get:function(){return b(this.input)?D(this.input)||this.input instanceof Ct?1:this.input.numberOfInputs:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numberOfOutputs",{get:function(){return b(this.output)?this.output.numberOfOutputs:0},enumerable:!0,configurable:!0}),e.prototype._isAudioNode=function(t){return b(t)&&(t instanceof e||M(t))},e.prototype._getInternalNodes=function(){var t=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&t.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&t.push(this.output),t},e.prototype._setChannelProperties=function(t){this._getInternalNodes().forEach((function(e){e.channelCount=t.channelCount,e.channelCountMode=t.channelCountMode,e.channelInterpretation=t.channelInterpretation}))},e.prototype._getChannelProperties=function(){var t=this._getInternalNodes();p(t.length>0,"ToneAudioNode does not have any internal nodes");var e=t[0];return{channelCount:e.channelCount,channelCountMode:e.channelCountMode,channelInterpretation:e.channelInterpretation}},Object.defineProperty(e.prototype,"channelCount",{get:function(){return this._getChannelProperties().channelCount},set:function(t){var e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCount:t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"channelCountMode",{get:function(){return this._getChannelProperties().channelCountMode},set:function(t){var e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCountMode:t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"channelInterpretation",{get:function(){return this._getChannelProperties().channelInterpretation},set:function(t){var e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelInterpretation:t}))},enumerable:!0,configurable:!0}),e.prototype.connect=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),jt(this,t,e,n),this},e.prototype.toDestination=function(){return this.connect(this.context.destination),this},e.prototype.toMaster=function(){return m("toMaster() has been renamed toDestination()"),this.toDestination()},e.prototype.disconnect=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Pt(this,t,e,n),this},e.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return At.apply(void 0,f([this],t)),this},e.prototype.fan=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){return t.connect(e)})),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),b(this.input)&&(this.input instanceof e?this.input.dispose():M(this.input)&&this.input.disconnect()),b(this.output)&&(this.output instanceof e?this.output.dispose():M(this.output)&&this.output.disconnect()),this._internalChannels=[],this},e}(kt);function At(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();t.reduce((function(t,e){return t instanceof Et?t.connect(e):M(t)&&jt(t,e),e}),n)}function jt(t,e,n,r){for(void 0===n&&(n=0),void 0===r&&(r=0),p(b(t),"Cannot connect from undefined node"),p(b(e),"Cannot connect to undefined node"),(e instanceof Et||M(e))&&p(e.numberOfInputs>0,"Cannot connect to node with no inputs"),p(t.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof Et||e instanceof Ct;)b(e.input)&&(e=e.input);for(;t instanceof Et;)b(t.output)&&(t=t.output);D(e)?t.connect(e,n):t.connect(e,n,r)}function Pt(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),b(e))for(;e instanceof Et;)e=e.input;for(;!M(t);)b(t.output)&&(t=t.output);D(e)?t.disconnect(e,n):M(e)?t.disconnect(e,n,r):t.disconnect()}var Dt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["gain","units"]))||this;n.name="Gain",n._gainNode=n.context.createGain(),n.input=n._gainNode,n.output=n._gainNode;var r=V(e.getDefaults(),arguments,["gain","units"]);return n.gain=new Ct({context:n.context,convert:r.convert,param:n._gainNode.gain,units:r.units,value:r.gain,minValue:r.minValue,maxValue:r.maxValue}),rt(n,"gain"),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{convert:!0,gain:1,units:"gain"})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._gainNode.disconnect(),this.gain.dispose(),this},e}(Et),Mt=function(t){function e(e){var n=t.call(this,e)||this;return n.onended=it,n._startTime=-1,n._stopTime=-1,n._timeout=-1,n.output=new Dt({context:n.context,gain:0}),n._gainNode=n.output,n.getStateAtTime=function(t){var e=this.toSeconds(t);return-1!==this._startTime&&e>=this._startTime&&(-1===this._stopTime||e<=this._stopTime)?"started":"stopped"},n._fadeIn=e.fadeIn,n._fadeOut=e.fadeOut,n._curve=e.curve,n.onended=e.onended,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:it})},e.prototype._startGain=function(t,e){void 0===e&&(e=1),p(-1===this._startTime,"Source cannot be started more than once");var n=this.toSeconds(this._fadeIn);return this._startTime=t+n,this._startTime=Math.max(this._startTime,this.context.currentTime),n>0?(this._gainNode.gain.setValueAtTime(0,t),"linear"===this._curve?this._gainNode.gain.linearRampToValueAtTime(e,t+n):this._gainNode.gain.exponentialApproachValueAtTime(e,t,n)):this._gainNode.gain.setValueAtTime(e,t),this},e.prototype.stop=function(t){return this.log("stop",t),this._stopGain(this.toSeconds(t)),this},e.prototype._stopGain=function(t){var e=this;p(-1!==this._startTime,"'start' must be called before 'stop'"),this.cancelStop();var n=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(t)+n,this._stopTime=Math.max(this._stopTime,this.context.currentTime),n>0?"linear"===this._curve?this._gainNode.gain.linearRampTo(0,n,t):this._gainNode.gain.targetRampTo(0,n,t):(this._gainNode.gain.cancelAndHoldAtTime(t),this._gainNode.gain.setValueAtTime(0,t)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout((function(){var t="exponential"===e._curve?2*n:0;e._stopSource(e.now()+t),e._onended()}),this._stopTime-this.context.currentTime),this},e.prototype._onended=function(){var t=this;this.onended!==it&&(this.onended(this),this.onended=it,this.context.isOffline||setTimeout((function(){return t.dispose()}),1e3))},Object.defineProperty(e.prototype,"state",{get:function(){return this.getStateAtTime(this.now())},enumerable:!0,configurable:!0}),e.prototype.cancelStop=function(){return this.log("cancelStop"),p(-1!==this._startTime,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._gainNode.disconnect(),this},e}(Et),It=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["offset"]))||this;n.name="ToneConstantSource",n._source=n.context.createConstantSource();var r=V(e.getDefaults(),arguments,["offset"]);return jt(n._source,n._gainNode),n.offset=new Ct({context:n.context,convert:r.convert,param:n._source.offset,units:r.units,value:r.offset,minValue:r.minValue,maxValue:r.maxValue}),n}return i(e,t),e.getDefaults=function(){return Object.assign(Mt.getDefaults(),{convert:!0,offset:1,units:"number"})},e.prototype.start=function(t){var e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._source.start(e),this},e.prototype._stopSource=function(t){this._source.stop(t)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),"started"===this.state&&this.stop(),this._source.disconnect(),this.offset.dispose(),this},e}(Mt),Rt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["value","units"]))||this;n.name="Signal",n.override=!0;var r=V(e.getDefaults(),arguments,["value","units"]);return n.output=n._constantSource=new It({context:n.context,convert:r.convert,offset:r.value,units:r.units,minValue:r.minValue,maxValue:r.maxValue}),n._constantSource.start(0),n.input=n._param=n._constantSource.offset,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{convert:!0,units:"number",value:0})},e.prototype.connect=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Nt(this,t,e,n),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param.dispose(),this._constantSource.dispose(),this},e.prototype.setValueAtTime=function(t,e){return this._param.setValueAtTime(t,e),this},e.prototype.getValueAtTime=function(t){return this._param.getValueAtTime(t)},e.prototype.setRampPoint=function(t){return this._param.setRampPoint(t),this},e.prototype.linearRampToValueAtTime=function(t,e){return this._param.linearRampToValueAtTime(t,e),this},e.prototype.exponentialRampToValueAtTime=function(t,e){return this._param.exponentialRampToValueAtTime(t,e),this},e.prototype.exponentialRampTo=function(t,e,n){return this._param.exponentialRampTo(t,e,n),this},e.prototype.linearRampTo=function(t,e,n){return this._param.linearRampTo(t,e,n),this},e.prototype.targetRampTo=function(t,e,n){return this._param.targetRampTo(t,e,n),this},e.prototype.exponentialApproachValueAtTime=function(t,e,n){return this._param.exponentialApproachValueAtTime(t,e,n),this},e.prototype.setTargetAtTime=function(t,e,n){return this._param.setTargetAtTime(t,e,n),this},e.prototype.setValueCurveAtTime=function(t,e,n,r){return this._param.setValueCurveAtTime(t,e,n,r),this},e.prototype.cancelScheduledValues=function(t){return this._param.cancelScheduledValues(t),this},e.prototype.cancelAndHoldAtTime=function(t){return this._param.cancelAndHoldAtTime(t),this},e.prototype.rampTo=function(t,e,n){return this._param.rampTo(t,e,n),this},Object.defineProperty(e.prototype,"value",{get:function(){return this._param.value},set:function(t){this._param.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"convert",{get:function(){return this._param.convert},set:function(t){this._param.convert=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"units",{get:function(){return this._param.units},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overridden",{get:function(){return this._param.overridden},set:function(t){this._param.overridden=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxValue",{get:function(){return this._param.maxValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minValue",{get:function(){return this._param.minValue},enumerable:!0,configurable:!0}),e.prototype.apply=function(t){return this._param.apply(t),this},e}(Et);function Nt(t,e,n,r){(e instanceof Ct||D(e)||e instanceof Rt&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Rt&&(e.overridden=!0)),jt(t,e,n,r)}var Ft=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["value"]))||this;n.name="TickParam",n._events=new K(1/0),n._multiplier=1;var r=V(e.getDefaults(),arguments,["value"]);return n._multiplier=r.multiplier,n._events.cancel(0),n._events.add({ticks:0,time:0,type:"setValueAtTime",value:n._fromType(r.value)}),n.setValueAtTime(r.value,0),n}return i(e,t),e.getDefaults=function(){return Object.assign(Ct.getDefaults(),{multiplier:1,units:"hertz",value:1})},e.prototype.setTargetAtTime=function(t,e,n){e=this.toSeconds(e),this.setRampPoint(e);for(var r=this._fromType(t),o=this._events.get(e),i=Math.round(Math.max(1/n,1)),a=0;a<=i;a++){var s=n*a+e,u=this._exponentialApproach(o.time,o.value,r,n,s);this.linearRampToValueAtTime(this._toType(u),s)}return this},e.prototype.setValueAtTime=function(e,n){var r=this.toSeconds(n);t.prototype.setValueAtTime.call(this,e,n);var o=this._events.get(r),i=this._events.previousEvent(o),a=this._getTicksUntilEvent(i,r);return o.ticks=Math.max(a,0),this},e.prototype.linearRampToValueAtTime=function(e,n){var r=this.toSeconds(n);t.prototype.linearRampToValueAtTime.call(this,e,n);var o=this._events.get(r),i=this._events.previousEvent(o),a=this._getTicksUntilEvent(i,r);return o.ticks=Math.max(a,0),this},e.prototype.exponentialRampToValueAtTime=function(t,e){e=this.toSeconds(e);for(var n=this._fromType(t),r=this._events.get(e),o=Math.round(Math.max(10*(e-r.time),1)),i=(e-r.time)/o,a=0;a<=o;a++){var s=i*a+r.time,u=this._exponentialInterpolate(r.time,r.value,e,n,s);this.linearRampToValueAtTime(this._toType(u),s)}return this},e.prototype._getTicksUntilEvent=function(t,e){if(null===t)t={ticks:0,time:0,type:"setValueAtTime",value:0};else if(g(t.ticks)){var n=this._events.previousEvent(t);t.ticks=this._getTicksUntilEvent(n,t.time)}var r=this._fromType(this.getValueAtTime(t.time)),o=this._fromType(this.getValueAtTime(e)),i=this._events.get(e);return i&&i.time===e&&"setValueAtTime"===i.type&&(o=this._fromType(this.getValueAtTime(e-this.sampleTime))),.5*(e-t.time)*(r+o)+t.ticks},e.prototype.getTicksAtTime=function(t){var e=this.toSeconds(t),n=this._events.get(e);return Math.max(this._getTicksUntilEvent(n,e),0)},e.prototype.getDurationOfTicks=function(t,e){var n=this.toSeconds(e),r=this.getTicksAtTime(e);return this.getTimeOfTick(r+t)-n},e.prototype.getTimeOfTick=function(t){var e=this._events.get(t,"ticks"),n=this._events.getAfter(t,"ticks");if(e&&e.ticks===t)return e.time;if(e&&n&&"linearRampToValueAtTime"===n.type&&e.value!==n.value){var r=this._fromType(this.getValueAtTime(e.time)),o=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-e.time),i=Math.sqrt(Math.pow(r,2)-2*o*(e.ticks-t)),a=(-r+i)/o;return(a>0?a:(-r-i)/o)+e.time}return e?0===e.value?1/0:e.time+(t-e.ticks)/e.value:t/this._initialValue},e.prototype.ticksToTime=function(t,e){return this.getDurationOfTicks(t,e)},e.prototype.timeToTicks=function(t,e){var n=this.toSeconds(e),r=this.toSeconds(t),o=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-o},e.prototype._fromType=function(e){return"bpm"===this.units&&this.multiplier?1/(60/e/this.multiplier):t.prototype._fromType.call(this,e)},e.prototype._toType=function(e){return"bpm"===this.units&&this.multiplier?e/this.multiplier*60:t.prototype._toType.call(this,e)},Object.defineProperty(e.prototype,"multiplier",{get:function(){return this._multiplier},set:function(t){var e=this.value;this._multiplier=t,this.cancelScheduledValues(0),this.setValueAtTime(e,0)},enumerable:!0,configurable:!0}),e}(Ct),qt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["value"]))||this;n.name="TickSignal";var r=V(e.getDefaults(),arguments,["value"]);return n.input=n._param=new Ft({context:n.context,convert:r.convert,multiplier:r.multiplier,param:n._constantSource.offset,units:r.units,value:r.value}),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{multiplier:1,units:"hertz",value:1})},e.prototype.ticksToTime=function(t,e){return this._param.ticksToTime(t,e)},e.prototype.timeToTicks=function(t,e){return this._param.timeToTicks(t,e)},e.prototype.getTimeOfTick=function(t){return this._param.getTimeOfTick(t)},e.prototype.getDurationOfTicks=function(t,e){return this._param.getDurationOfTicks(t,e)},e.prototype.getTicksAtTime=function(t){return this._param.getTicksAtTime(t)},Object.defineProperty(e.prototype,"multiplier",{get:function(){return this._param.multiplier},set:function(t){this._param.multiplier=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._param.dispose(),this},e}(Rt),Vt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency"]))||this;n.name="TickSource",n._state=new Tt,n._tickOffset=new K;var r=V(e.getDefaults(),arguments,["frequency"]);return n.frequency=new qt({context:n.context,units:r.units,value:r.frequency}),rt(n,"frequency"),n._state.setStateAtTime("stopped",0),n.setTicksAtTime(0,0),n}return i(e,t),e.getDefaults=function(){return Object.assign({frequency:1,units:"hertz"},kt.getDefaults())},Object.defineProperty(e.prototype,"state",{get:function(){return this.getStateAtTime(this.now())},enumerable:!0,configurable:!0}),e.prototype.start=function(t,e){var n=this.toSeconds(t);return"started"!==this._state.getValueAtTime(n)&&(this._state.setStateAtTime("started",n),b(e)&&this.setTicksAtTime(e,n)),this},e.prototype.stop=function(t){var e=this.toSeconds(t);if("stopped"===this._state.getValueAtTime(e)){var n=this._state.get(e);n&&n.time>0&&(this._tickOffset.cancel(n.time),this._state.cancel(n.time))}return this._state.cancel(e),this._state.setStateAtTime("stopped",e),this.setTicksAtTime(0,e),this},e.prototype.pause=function(t){var e=this.toSeconds(t);return"started"===this._state.getValueAtTime(e)&&this._state.setStateAtTime("paused",e),this},e.prototype.cancel=function(t){return t=this.toSeconds(t),this._state.cancel(t),this._tickOffset.cancel(t),this},e.prototype.getTicksAtTime=function(t){var e=this,n=this.toSeconds(t),r=this._state.getLastState("stopped",n),o={state:"paused",time:n};this._state.add(o);var i=r,a=0;return this._state.forEachBetween(r.time,n+this.sampleTime,(function(t){var n=i.time,r=e._tickOffset.get(t.time);r&&r.time>=i.time&&(a=r.ticks,n=r.time),"started"===i.state&&"started"!==t.state&&(a+=e.frequency.getTicksAtTime(t.time)-e.frequency.getTicksAtTime(n)),i=t})),this._state.remove(o),a},Object.defineProperty(e.prototype,"ticks",{get:function(){return this.getTicksAtTime(this.now())},set:function(t){this.setTicksAtTime(t,this.now())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seconds",{get:function(){return this.getSecondsAtTime(this.now())},set:function(t){var e=this.now(),n=this.frequency.timeToTicks(t,e);this.setTicksAtTime(n,e)},enumerable:!0,configurable:!0}),e.prototype.getSecondsAtTime=function(t){var e=this;t=this.toSeconds(t);var n=this._state.getLastState("stopped",t),r={state:"paused",time:t};this._state.add(r);var o=n,i=0;return this._state.forEachBetween(n.time,t+this.sampleTime,(function(t){var n=o.time,r=e._tickOffset.get(t.time);r&&r.time>=o.time&&(i=r.seconds,n=r.time),"started"===o.state&&"started"!==t.state&&(i+=t.time-n),o=t})),this._state.remove(r),i},e.prototype.setTicksAtTime=function(t,e){return e=this.toSeconds(e),this._tickOffset.cancel(e),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(t,e),ticks:t,time:e}),this},e.prototype.getStateAtTime=function(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)},e.prototype.getTimeOfTick=function(t,e){void 0===e&&(e=this.now());var n=this._tickOffset.get(e),r=this._state.get(e),o=Math.max(n.time,r.time),i=this.frequency.getTicksAtTime(o)+t-n.ticks;return this.frequency.getTimeOfTick(i)},e.prototype.forEachTickBetween=function(t,e,n){var r=this,o=this._state.get(t);this._state.forEachBetween(t,e,(function(e){o&&"started"===o.state&&"started"!==e.state&&r.forEachTickBetween(Math.max(o.time,t),e.time-r.sampleTime,n),o=e}));var i=null;if(o&&"started"===o.state)for(var a=Math.max(o.time,t),s=this.frequency.getTicksAtTime(a),u=s-this.frequency.getTicksAtTime(o.time),c=Math.ceil(u)-u,l=this.frequency.getTimeOfTick(s+c);l<e;){try{n(l,Math.round(this.getTicksAtTime(l)))}catch(t){i=t;break}l+=this.frequency.getDurationOfTicks(1,l)}if(i)throw i;return this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._state.dispose(),this._tickOffset.dispose(),this.frequency.dispose(),this},e}(kt),Lt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","frequency"]))||this;n.name="Clock",n.callback=it,n._lastUpdate=0,n._state=new Tt("stopped"),n._boundLoop=n._loop.bind(n);var r=V(e.getDefaults(),arguments,["callback","frequency"]);return n.callback=r.callback,n._tickSource=new Vt({context:n.context,frequency:r.frequency,units:r.units}),n._lastUpdate=0,n.frequency=n._tickSource.frequency,rt(n,"frequency"),n._state.setStateAtTime("stopped",0),n.context.on("tick",n._boundLoop),n}return i(e,t),e.getDefaults=function(){return Object.assign(kt.getDefaults(),{callback:it,frequency:1,units:"hertz"})},Object.defineProperty(e.prototype,"state",{get:function(){return this._state.getValueAtTime(this.now())},enumerable:!0,configurable:!0}),e.prototype.start=function(t,e){d(this.context);var n=this.toSeconds(t);return this.log("start",n),"started"!==this._state.getValueAtTime(n)&&(this._state.setStateAtTime("started",n),this._tickSource.start(n,e),n<this._lastUpdate&&this.emit("start",n,e)),this},e.prototype.stop=function(t){var e=this.toSeconds(t);return this.log("stop",e),this._state.cancel(e),this._state.setStateAtTime("stopped",e),this._tickSource.stop(e),e<this._lastUpdate&&this.emit("stop",e),this},e.prototype.pause=function(t){var e=this.toSeconds(t);return"started"===this._state.getValueAtTime(e)&&(this._state.setStateAtTime("paused",e),this._tickSource.pause(e),e<this._lastUpdate&&this.emit("pause",e)),this},Object.defineProperty(e.prototype,"ticks",{get:function(){return Math.ceil(this.getTicksAtTime(this.now()))},set:function(t){this._tickSource.ticks=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seconds",{get:function(){return this._tickSource.seconds},set:function(t){this._tickSource.seconds=t},enumerable:!0,configurable:!0}),e.prototype.getSecondsAtTime=function(t){return this._tickSource.getSecondsAtTime(t)},e.prototype.setTicksAtTime=function(t,e){return this._tickSource.setTicksAtTime(t,e),this},e.prototype.getTimeOfTick=function(t,e){return void 0===e&&(e=this.now()),this._tickSource.getTimeOfTick(t,e)},e.prototype.getTicksAtTime=function(t){return this._tickSource.getTicksAtTime(t)},e.prototype.nextTickTime=function(t,e){var n=this.toSeconds(e),r=this.getTicksAtTime(n);return this._tickSource.getTimeOfTick(r+t,n)},e.prototype._loop=function(){var t=this,e=this._lastUpdate,n=this.now();this._lastUpdate=n,this.log("loop",e,n),e!==n&&(this._state.forEachBetween(e,n,(function(e){switch(e.state){case"started":var n=t._tickSource.getTicksAtTime(e.time);t.emit("start",e.time,n);break;case"stopped":0!==e.time&&t.emit("stop",e.time);break;case"paused":t.emit("pause",e.time)}})),this._tickSource.forEachTickBetween(e,n,(function(e,n){t.callback(e,n)})))},e.prototype.getStateAtTime=function(t){var e=this.toSeconds(t);return this._state.getValueAtTime(e)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this},e}(kt);Z.mixin(Lt);var zt=function(t){function e(e){var n=t.call(this)||this;return n.name="TimelineValue",n._timeline=new K({memory:10}),n._initialValue=e,n}return i(e,t),e.prototype.set=function(t,e){return this._timeline.add({value:t,time:e}),this},e.prototype.get=function(t){var e=this._timeline.get(t);return e?e.value:this._initialValue},e}(B),Bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Ticks",e.defaultUnits="i",e}return i(e,t),e.prototype._now=function(){return this.context.transport.ticks},e.prototype._beatsToUnits=function(t){return this._getPPQ()*t},e.prototype._secondsToUnits=function(t){return Math.floor(t/(60/this._getBpm())*this._getPPQ())},e.prototype._ticksToUnits=function(t){return t},e.prototype.toTicks=function(){return this.valueOf()},e.prototype.toSeconds=function(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())},e}(St);var Ut=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="IntervalTimeline",e._root=null,e._length=0,e}return i(e,t),e.prototype.add=function(t){p(b(t.time),"Events must have a time property"),p(b(t.duration),"Events must have a duration parameter"),t.time=t.time.valueOf();var e=new Wt(t.time,t.time+t.duration,t);for(null===this._root?this._root=e:this._root.insert(e),this._length++;null!==e;)e.updateHeight(),e.updateMax(),this._rebalance(e),e=e.parent;return this},e.prototype.remove=function(t){var e,n;if(null!==this._root){var r=[];this._root.search(t.time,r);try{for(var o=c(r),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.event===t){this._removeNode(a),this._length--;break}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}return this},Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.cancel=function(t){var e=this;return this.forEachFrom(t,(function(t){return e.remove(t)})),this},e.prototype._setRoot=function(t){this._root=t,null!==this._root&&(this._root.parent=null)},e.prototype._replaceNodeInParent=function(t,e){null!==t.parent?(t.isLeftChild()?t.parent.left=e:t.parent.right=e,this._rebalance(t.parent)):this._setRoot(e)},e.prototype._removeNode=function(t){if(null===t.left&&null===t.right)this._replaceNodeInParent(t,null);else if(null===t.right)this._replaceNodeInParent(t,t.left);else if(null===t.left)this._replaceNodeInParent(t,t.right);else{var e=void 0,n=null;if(t.getBalance()>0)if(null===t.left.right)(e=t.left).right=t.right,n=e;else{for(e=t.left.right;null!==e.right;)e=e.right;e.parent&&(e.parent.right=e.left,n=e.parent,e.left=t.left,e.right=t.right)}else if(null===t.right.left)(e=t.right).left=t.left,n=e;else{for(e=t.right.left;null!==e.left;)e=e.left;e.parent&&(e.parent.left=e.right,n=e.parent,e.left=t.left,e.right=t.right)}null!==t.parent?t.isLeftChild()?t.parent.left=e:t.parent.right=e:this._setRoot(e),n&&this._rebalance(n)}t.dispose()},e.prototype._rotateLeft=function(t){var e=t.parent,n=t.isLeftChild(),r=t.right;r&&(t.right=r.left,r.left=t),null!==e?n?e.left=r:e.right=r:this._setRoot(r)},e.prototype._rotateRight=function(t){var e=t.parent,n=t.isLeftChild(),r=t.left;r&&(t.left=r.right,r.right=t),null!==e?n?e.left=r:e.right=r:this._setRoot(r)},e.prototype._rebalance=function(t){var e=t.getBalance();e>1&&t.left?t.left.getBalance()<0?this._rotateLeft(t.left):this._rotateRight(t):e<-1&&t.right&&(t.right.getBalance()>0?this._rotateRight(t.right):this._rotateLeft(t))},e.prototype.get=function(t){if(null!==this._root){var e=[];if(this._root.search(t,e),e.length>0){for(var n=e[0],r=1;r<e.length;r++)e[r].low>n.low&&(n=e[r]);return n.event}}return null},e.prototype.forEach=function(t){if(null!==this._root){var e=[];this._root.traverse((function(t){return e.push(t)})),e.forEach((function(e){e.event&&t(e.event)}))}return this},e.prototype.forEachAtTime=function(t,e){if(null!==this._root){var n=[];this._root.search(t,n),n.forEach((function(t){t.event&&e(t.event)}))}return this},e.prototype.forEachFrom=function(t,e){if(null!==this._root){var n=[];this._root.searchAfter(t,n),n.forEach((function(t){t.event&&e(t.event)}))}return this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),null!==this._root&&this._root.traverse((function(t){return t.dispose()})),this._root=null,this},e}(B),Wt=function(){function t(t,e,n){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=n,this.low=t,this.high=e,this.max=this.high}return t.prototype.insert=function(t){t.low<=this.low?null===this.left?this.left=t:this.left.insert(t):null===this.right?this.right=t:this.right.insert(t)},t.prototype.search=function(t,e){t>this.max||(null!==this.left&&this.left.search(t,e),this.low<=t&&this.high>t&&e.push(this),this.low>t||null!==this.right&&this.right.search(t,e))},t.prototype.searchAfter=function(t,e){this.low>=t&&(e.push(this),null!==this.left&&this.left.searchAfter(t,e)),null!==this.right&&this.right.searchAfter(t,e)},t.prototype.traverse=function(t){t(this),null!==this.left&&this.left.traverse(t),null!==this.right&&this.right.traverse(t)},t.prototype.updateHeight=function(){null!==this.left&&null!==this.right?this.height=Math.max(this.left.height,this.right.height)+1:null!==this.right?this.height=this.right.height+1:null!==this.left?this.height=this.left.height+1:this.height=0},t.prototype.updateMax=function(){this.max=this.high,null!==this.left&&(this.max=Math.max(this.max,this.left.max)),null!==this.right&&(this.max=Math.max(this.max,this.right.max))},t.prototype.getBalance=function(){var t=0;return null!==this.left&&null!==this.right?t=this.left.height-this.right.height:null!==this.left?t=this.left.height+1:null!==this.right&&(t=-(this.right.height+1)),t},t.prototype.isLeftChild=function(){return null!==this.parent&&this.parent.left===this},Object.defineProperty(t.prototype,"left",{get:function(){return this._left},set:function(t){this._left=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._right},set:function(t){this._right=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.parent=null,this._left=null,this._right=null,this.event=null},t}(),$t=function(){function t(e,n){this.id=t._eventId++;var r=Object.assign(t.getDefaults(),n);this.transport=e,this.callback=r.callback,this._once=r.once,this.time=r.time}return t.getDefaults=function(){return{callback:it,once:!1,time:0}},t.prototype.invoke=function(t){this.callback&&(this.callback(t),this._once&&this.transport.clear(this.id))},t.prototype.dispose=function(){return this.callback=void 0,this},t._eventId=0,t}(),Ht=function(t){function e(n,r){var o=t.call(this,n,r)||this;o._currentId=-1,o._nextId=-1,o._nextTick=o.time,o._boundRestart=o._restart.bind(o);var i=Object.assign(e.getDefaults(),r);return o.duration=new Bt(n.context,i.duration).valueOf(),o._interval=new Bt(n.context,i.interval).valueOf(),o._nextTick=i.time,o.transport.on("start",o._boundRestart),o.transport.on("loopStart",o._boundRestart),o.context=o.transport.context,o._restart(),o}return i(e,t),e.getDefaults=function(){return Object.assign({},$t.getDefaults(),{duration:1/0,interval:1,once:!1})},e.prototype.invoke=function(e){this._createEvents(e),t.prototype.invoke.call(this,e)},e.prototype._createEvents=function(t){var e=this.transport.getTicksAtTime(t);e>=this.time&&e>=this._nextTick&&this._nextTick+this._interval<this.time+this.duration&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Bt(this.context,this._nextTick).toSeconds()))},e.prototype._restart=function(t){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.time;var e=this.transport.getTicksAtTime(t);e>this.time&&(this._nextTick=this.time+Math.ceil((e-this.time)/this._interval)*this._interval),this._currentId=this.transport.scheduleOnce(this.invoke.bind(this),new Bt(this.context,this._nextTick).toSeconds()),this._nextTick+=this._interval,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Bt(this.context,this._nextTick).toSeconds())},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this},e}($t),Gt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="Transport",n._loop=new zt(!1),n._loopStart=0,n._loopEnd=0,n._scheduledEvents={},n._timeline=new K,n._repeatedEvents=new Ut,n._syncedSignals=[],n._swingAmount=0;var r=V(e.getDefaults(),arguments);return n._ppq=r.ppq,n._clock=new Lt({callback:n._processTick.bind(n),context:n.context,frequency:0,units:"bpm"}),n._bindClockEvents(),n.bpm=n._clock.frequency,n._clock.frequency.multiplier=r.ppq,n.bpm.setValueAtTime(r.bpm,0),rt(n,"bpm"),n._timeSignature=r.timeSignature,n._swingTicks=r.ppq/2,n}return i(e,t),e.getDefaults=function(){return Object.assign(kt.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})},e.prototype._processTick=function(t,e){if(this._swingAmount>0&&e%this._ppq!=0&&e%(2*this._swingTicks)!=0){var n=e%(2*this._swingTicks)/(2*this._swingTicks),r=Math.sin(n*Math.PI)*this._swingAmount;t+=new Bt(this.context,2*this._swingTicks/3).toSeconds()*r}this._loop.get(t)&&e>=this._loopEnd&&(this.emit("loopEnd",t),this._clock.setTicksAtTime(this._loopStart,t),e=this._loopStart,this.emit("loopStart",t,this._clock.getSecondsAtTime(t)),this.emit("loop",t)),this._timeline.forEachAtTime(e,(function(e){return e.invoke(t)}))},e.prototype.schedule=function(t,e){var n=new $t(this,{callback:t,time:new St(this.context,e).toTicks()});return this._addEvent(n,this._timeline)},e.prototype.scheduleRepeat=function(t,e,n,r){void 0===r&&(r=1/0);var o=new Ht(this,{callback:t,duration:new _t(this.context,r).toTicks(),interval:new _t(this.context,e).toTicks(),time:new St(this.context,n).toTicks()});return this._addEvent(o,this._repeatedEvents)},e.prototype.scheduleOnce=function(t,e){var n=new $t(this,{callback:t,once:!0,time:new St(this.context,e).toTicks()});return this._addEvent(n,this._timeline)},e.prototype.clear=function(t){if(this._scheduledEvents.hasOwnProperty(t)){var e=this._scheduledEvents[t.toString()];e.timeline.remove(e.event),e.event.dispose(),delete this._scheduledEvents[t.toString()]}return this},e.prototype._addEvent=function(t,e){return this._scheduledEvents[t.id.toString()]={event:t,timeline:e},e.add(t),t.id},e.prototype.cancel=function(t){var e=this;void 0===t&&(t=0);var n=this.toTicks(t);return this._timeline.forEachFrom(n,(function(t){return e.clear(t.id)})),this._repeatedEvents.forEachFrom(n,(function(t){return e.clear(t.id)})),this},e.prototype._bindClockEvents=function(){var t=this;this._clock.on("start",(function(e,n){n=new Bt(t.context,n).toSeconds(),t.emit("start",e,n)})),this._clock.on("stop",(function(e){t.emit("stop",e)})),this._clock.on("pause",(function(e){t.emit("pause",e)}))},Object.defineProperty(e.prototype,"state",{get:function(){return this._clock.getStateAtTime(this.now())},enumerable:!0,configurable:!0}),e.prototype.start=function(t,e){var n;return b(e)&&(n=this.toTicks(e)),this._clock.start(t,n),this},e.prototype.stop=function(t){return this._clock.stop(t),this},e.prototype.pause=function(t){return this._clock.pause(t),this},e.prototype.toggle=function(t){return t=this.toSeconds(t),"started"!==this._clock.getStateAtTime(t)?this.start(t):this.stop(t),this},Object.defineProperty(e.prototype,"timeSignature",{get:function(){return this._timeSignature},set:function(t){S(t)&&(t=t[0]/t[1]*4),this._timeSignature=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopStart",{get:function(){return new _t(this.context,this._loopStart,"i").toSeconds()},set:function(t){this._loopStart=this.toTicks(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return new _t(this.context,this._loopEnd,"i").toSeconds()},set:function(t){this._loopEnd=this.toTicks(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop.get(this.now())},set:function(t){this._loop.set(t,this.now())},enumerable:!0,configurable:!0}),e.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(e.prototype,"swing",{get:function(){return this._swingAmount},set:function(t){this._swingAmount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"swingSubdivision",{get:function(){return new Bt(this.context,this._swingTicks).toNotation()},set:function(t){this._swingTicks=this.toTicks(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){var t=this.now(),e=this._clock.getTicksAtTime(t);return new Bt(this.context,e).toBarsBeatsSixteenths()},set:function(t){var e=this.toTicks(t);this.ticks=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"seconds",{get:function(){return this._clock.seconds},set:function(t){var e=this.now(),n=this._clock.frequency.timeToTicks(t,e);this.ticks=n},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progress",{get:function(){if(this.loop){var t=this.now();return(this._clock.getTicksAtTime(t)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ticks",{get:function(){return this._clock.ticks},set:function(t){if(this._clock.ticks!==t){var e=this.now();if("started"===this.state){var n=this._clock.getTicksAtTime(e),r=this._clock.getTimeOfTick(Math.ceil(n));this.emit("stop",r),this._clock.setTicksAtTime(t,r),this.emit("start",r,this._clock.getSecondsAtTime(r))}else this._clock.setTicksAtTime(t,e)}},enumerable:!0,configurable:!0}),e.prototype.getTicksAtTime=function(t){return Math.round(this._clock.getTicksAtTime(t))},e.prototype.getSecondsAtTime=function(t){return this._clock.getSecondsAtTime(t)},Object.defineProperty(e.prototype,"PPQ",{get:function(){return this._clock.frequency.multiplier},set:function(t){this._clock.frequency.multiplier=t},enumerable:!0,configurable:!0}),e.prototype.nextSubdivision=function(t){if(t=this.toTicks(t),"started"!==this.state)return 0;var e=this.now(),n=t-this.getTicksAtTime(e)%t;return this._clock.nextTickTime(n,e)},e.prototype.syncSignal=function(t,e){if(!e){var n=this.now();if(0!==t.getValueAtTime(n)){var r=1/(60/this.bpm.getValueAtTime(n)/this.PPQ);e=t.getValueAtTime(n)/r}else e=0}var o=new Dt(e);return this.bpm.connect(o),o.connect(t._param),this._syncedSignals.push({initial:t.value,ratio:o,signal:t}),t.value=0,this},e.prototype.unsyncSignal=function(t){for(var e=this._syncedSignals.length-1;e>=0;e--){var n=this._syncedSignals[e];n.signal===t&&(n.ratio.dispose(),n.signal.value=n.initial,this._syncedSignals.splice(e,1))}return this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._clock.dispose(),ot(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this},e}(kt);Z.mixin(Gt),Y((function(t){t.transport=new Gt({context:t})})),J((function(t){t.transport.dispose()}));var Kt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["delayTime","maxDelay"]))||this;n.name="Delay";var r=V(e.getDefaults(),arguments,["delayTime","maxDelay"]),o=n.toSeconds(r.maxDelay);return n._maxDelay=Math.max(o,n.toSeconds(r.delayTime)),n._delayNode=n.input=n.output=n.context.createDelay(o),n.delayTime=new Ct({context:n.context,param:n._delayNode.delayTime,units:"time",value:r.delayTime,minValue:0,maxValue:n.maxDelay}),rt(n,"delayTime"),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{delayTime:0,maxDelay:1})},Object.defineProperty(e.prototype,"maxDelay",{get:function(){return this._maxDelay},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._delayNode.disconnect(),this.delayTime.dispose(),this},e}(Et),Qt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["volume"]))||this;n.name="Volume";var r=V(e.getDefaults(),arguments,["volume"]);return n.input=n.output=new Dt({context:n.context,gain:r.volume,units:"decibels"}),n.volume=n.output.gain,rt(n,"volume"),n._unmutedVolume=r.volume,n.mute=r.mute,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mute:!1,volume:0})},Object.defineProperty(e.prototype,"mute",{get:function(){return this.volume.value===-1/0},set:function(t){!this.mute&&t?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!t&&(this.volume.value=this._unmutedVolume)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this.volume.dispose(),this},e}(Et),Yt=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="Destination",n.input=new Qt({context:n.context}),n.output=new Dt({context:n.context}),n.volume=n.input.volume;var r=V(e.getDefaults(),arguments);return At(n.input,n.output,n.context.rawContext.destination),n.mute=r.mute,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mute:!1,volume:0})},Object.defineProperty(e.prototype,"mute",{get:function(){return this.input.mute},set:function(t){this.input.mute=t},enumerable:!0,configurable:!0}),e.prototype.chain=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.input.disconnect(),t.unshift(this.input),t.push(this.output),At.apply(void 0,f(t)),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.volume.dispose(),this},e}(Et);Y((function(t){t.destination=new Yt({context:t})})),J((function(t){t.destination.dispose()}));var Xt=function(t){function e(){var n=t.call(this)||this;n.name="ToneAudioBuffers",n._buffers=new Map,n._loadingCount=0;var r=V(e.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");return n.baseUrl=r.baseUrl,Object.keys(r.urls).forEach((function(t){n._loadingCount++;var e=r.urls[t];n.add(t,e,n._bufferLoaded.bind(n,r.onload),r.onerror)})),n}return i(e,t),e.getDefaults=function(){return{baseUrl:"",onerror:it,onload:it,urls:{}}},e.prototype.has=function(t){return this._buffers.has(t.toString())},e.prototype.get=function(t){return p(this.has(t),"ToneAudioBuffers has no buffer named: "+t),this._buffers.get(t.toString())},e.prototype._bufferLoaded=function(t){this._loadingCount--,0===this._loadingCount&&t&&t()},Object.defineProperty(e.prototype,"loaded",{get:function(){return Array.from(this._buffers).every((function(t){var e=l(t,2);e[0];return e[1].loaded}))},enumerable:!0,configurable:!0}),e.prototype.add=function(t,e,n,r){return void 0===n&&(n=it),void 0===r&&(r=it),k(e)?this._buffers.set(t.toString(),new at(this.baseUrl+e,n,r)):this._buffers.set(t.toString(),new at(e,n,r)),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffers.forEach((function(t){return t.dispose()})),this._buffers.clear(),this},e}(B),Jt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="MidiClass",e.defaultUnits="midi",e}return i(e,t),e.prototype._frequencyToUnits=function(e){return gt(t.prototype._frequencyToUnits.call(this,e))},e.prototype._ticksToUnits=function(e){return gt(t.prototype._ticksToUnits.call(this,e))},e.prototype._beatsToUnits=function(e){return gt(t.prototype._beatsToUnits.call(this,e))},e.prototype._secondsToUnits=function(e){return gt(t.prototype._secondsToUnits.call(this,e))},e.prototype.toMidi=function(){return this.valueOf()},e.prototype.toFrequency=function(){return bt(this.toMidi())},e.prototype.transpose=function(t){return new e(this.context,this.toMidi()+t)},e}(wt);var Zt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Draw",e.expiration=.25,e.anticipation=.008,e._events=new K,e._boundDrawLoop=e._drawLoop.bind(e),e._animationFrame=-1,e}return i(e,t),e.prototype.schedule=function(t,e){return this._events.add({callback:t,time:this.toSeconds(e)}),1===this._events.length&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this},e.prototype.cancel=function(t){return this._events.cancel(this.toSeconds(t)),this},e.prototype._drawLoop=function(){for(var t=this.context.currentTime;this._events.length&&this._events.peek().time-this.anticipation<=t;){var e=this._events.shift();e&&t-e.time<=this.expiration&&e.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this},e}(kt);Y((function(t){t.draw=new Zt({context:t})})),J((function(t){t.draw.dispose()}));n(658);var te=function(t){function e(e){var n=t.call(this,e)||this;return n.input=void 0,n._state=new Tt("stopped"),n._synced=!1,n._scheduled=[],n._syncedStart=it,n._syncedStop=it,n._state.memory=100,n._state.increasing=!0,n._volume=n.output=new Qt({context:n.context,mute:e.mute,volume:e.volume}),n.volume=n._volume.volume,rt(n,"volume"),n.onstop=e.onstop,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mute:!1,onstop:it,volume:0})},Object.defineProperty(e.prototype,"state",{get:function(){return this._synced?"started"===this.context.transport.state?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t},enumerable:!0,configurable:!0}),e.prototype._clampToCurrentTime=function(t){return this._synced?t:Math.max(t,this.context.currentTime)},e.prototype.start=function(t,e,n){var r=this,o=g(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(o=this._clampToCurrentTime(o),"started"===this._state.getValueAtTime(o))p(U(o,this._state.get(o).time),"Start time must be strictly greater than previous start time"),this._state.cancel(o),this._state.setStateAtTime("started",o),this.log("restart",o),this.restart(o,e,n);else{if(this.log("start",o),this._state.setStateAtTime("started",o),this._synced){var i=this._state.get(o);i&&(i.offset=this.toSeconds(L(e,0)),i.duration=n?this.toSeconds(n):void 0);var a=this.context.transport.schedule((function(t){r._start(t,e,n)}),o);this._scheduled.push(a),"started"===this.context.transport.state&&this._syncedStart(this.now(),this.context.transport.seconds)}else this._start(o,e,n);d(this.context)}return this},e.prototype.stop=function(t){var e=g(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(e=this._clampToCurrentTime(e),"started"===this._state.getValueAtTime(e)||b(this._state.getNextState("started",e))){if(this.log("stop",e),this._synced){var n=this.context.transport.schedule(this._stop.bind(this),e);this._scheduled.push(n)}else this._stop(e);this._state.cancel(e),this._state.setStateAtTime("stopped",e)}return this},e.prototype.restart=function(t,e,n){return t=this.toSeconds(t),"started"===this._state.getValueAtTime(t)&&(this._state.cancel(t),this._restart(t,e,n)),this},e.prototype.sync=function(){var t=this;return this._synced||(this._synced=!0,this._syncedStart=function(e,n){if(n>0){var r=t._state.get(n);if(r&&"started"===r.state&&r.time!==n){var o=n-t.toSeconds(r.time),i=void 0;r.duration&&(i=t.toSeconds(r.duration)-o),t._start(e,t.toSeconds(r.offset)+o,i)}}},this._syncedStop=function(e){var n=t.context.transport.getSecondsAtTime(Math.max(e-t.sampleTime,0));"started"===t._state.getValueAtTime(n)&&t._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this},e.prototype.unsync=function(){var t=this;return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach((function(e){return t.context.transport.clear(e)})),this._scheduled=[],this._state.cancel(0),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.onstop=it,this.unsync(),this._volume.dispose(),this._state.dispose(),this},e}(Et),ee=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["url","onload"]))||this;n.name="ToneBufferSource",n._source=n.context.createBufferSource(),n._internalChannels=[n._source],n._sourceStarted=!1,n._sourceStopped=!1;var r=V(e.getDefaults(),arguments,["url","onload"]);return jt(n._source,n._gainNode),n._source.onended=function(){return n._stopSource()},n.playbackRate=new Ct({context:n.context,param:n._source.playbackRate,units:"positive",value:r.playbackRate}),n.loop=r.loop,n.loopStart=r.loopStart,n.loopEnd=r.loopEnd,n._buffer=new at(r.url,r.onload,r.onerror),n._internalChannels.push(n._source),n}return i(e,t),e.getDefaults=function(){return Object.assign(Mt.getDefaults(),{url:new at,loop:!1,loopEnd:0,loopStart:0,onload:it,onerror:it,playbackRate:1})},Object.defineProperty(e.prototype,"fadeIn",{get:function(){return this._fadeIn},set:function(t){this._fadeIn=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fadeOut",{get:function(){return this._fadeOut},set:function(t){this._fadeOut=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"curve",{get:function(){return this._curve},set:function(t){this._curve=t},enumerable:!0,configurable:!0}),e.prototype.start=function(t,e,n,r){void 0===r&&(r=1),p(this.buffer.loaded,"buffer is either not set or not loaded");var o=this.toSeconds(t);this._startGain(o,r),e=this.loop?L(e,this.loopStart):L(e,0);var i=Math.max(this.toSeconds(e),0);if(this.loop){var a=this.toSeconds(this.loopEnd)||this.buffer.duration,s=this.toSeconds(this.loopStart),u=a-s;W(i,a)&&(i=(i-s)%u+s),H(i,this.buffer.duration)&&(i=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,$(i,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(o,i)),b(n)){var c=this.toSeconds(n);c=Math.max(c,0),this.stop(o+c)}return this},e.prototype._stopSource=function(t){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(t)),this._onended())},Object.defineProperty(e.prototype,"loopStart",{get:function(){return this._source.loopStart},set:function(t){this._source.loopStart=this.toSeconds(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return this._source.loopEnd},set:function(t){this._source.loopEnd=this.toSeconds(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._source.loop},set:function(t){this._source.loop=t,this._sourceStarted&&this.cancelStop()},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this},e}(Mt),ne=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["type"]))||this;n.name="Noise",n._source=null;var r=V(e.getDefaults(),arguments,["type"]);return n._playbackRate=r.playbackRate,n.type=r.type,n._fadeIn=r.fadeIn,n._fadeOut=r.fadeOut,n}return i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){if(p(t in oe,"Noise: invalid type: "+t),this._type!==t&&(this._type=t,"started"===this.state)){var e=this.now();this._stop(e),this._start(e)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._source&&(this._source.playbackRate.value=t)},enumerable:!0,configurable:!0}),e.prototype._start=function(t){var e=this,n=oe[this._type];this._source=new ee({url:n,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:function(){return e.onstop(e)},playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(t),Math.random()*(n.duration-.001))},e.prototype._stop=function(t){this._source&&(this._source.stop(this.toSeconds(t)),this._source=null)},Object.defineProperty(e.prototype,"fadeIn",{get:function(){return this._fadeIn},set:function(t){this._fadeIn=t,this._source&&(this._source.fadeIn=this._fadeIn)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fadeOut",{get:function(){return this._fadeOut},set:function(t){this._fadeOut=t,this._source&&(this._source.fadeOut=this._fadeOut)},enumerable:!0,configurable:!0}),e.prototype._restart=function(t){this._stop(t),this._start(t)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._source&&this._source.disconnect(),this},e}(te),re={brown:null,pink:null,white:null},oe={get brown(){if(!re.brown){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var r=0,o=0;o<220500;o++){var i=2*Math.random()-1;n[o]=(r+.02*i)/1.02,r=n[o],n[o]*=3.5}}re.brown=(new at).fromArray(t)}return re.brown},get pink(){if(!re.pink){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;var r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,u=void 0,c=void 0;r=o=i=a=s=u=c=0;for(var l=0;l<220500;l++){var f=2*Math.random()-1;r=.99886*r+.0555179*f,o=.99332*o+.0750759*f,i=.969*i+.153852*f,a=.8665*a+.3104856*f,s=.55*s+.5329522*f,u=-.7616*u-.016898*f,n[l]=r+o+i+a+s+u+c+.5362*f,n[l]*=.11,c=.115926*f}}re.pink=(new at).fromArray(t)}return re.pink},get white(){if(!re.white){for(var t=[],e=0;e<2;e++){var n=new Float32Array(220500);t[e]=n;for(var r=0;r<220500;r++)n[r]=2*Math.random()-1}re.white=(new at).fromArray(t)}return re.white}};!function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["volume"]))||this;n.name="UserMedia";var r=V(e.getDefaults(),arguments,["volume"]);return n._volume=n.output=new Qt({context:n.context,volume:r.volume}),n.volume=n._volume.volume,rt(n,"volume"),n.mute=r.mute,n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mute:!1,volume:0})},e.prototype.open=function(t){return s(this,void 0,void 0,(function(){var n,r,o,i;return u(this,(function(a){switch(a.label){case 0:return p(e.supported,"UserMedia is not supported"),"started"===this.state&&this.close(),[4,e.enumerateDevices()];case 1:return n=a.sent(),w(t)?this._device=n[t]:(this._device=n.find((function(e){return e.label===t||e.deviceId===t})),!this._device&&n.length>0&&(this._device=n[0]),p(b(this._device),"No matching device "+t)),r={audio:{echoCancellation:!1,sampleRate:this.context.sampleRate,noiseSuppression:!1,mozNoiseSuppression:!1}},this._device&&(r.audio.deviceId=this._device.deviceId),[4,navigator.mediaDevices.getUserMedia(r)];case 2:return o=a.sent(),this._stream||(this._stream=o,jt(i=this.context.createMediaStreamSource(o),this.output),this._mediaStream=i),[2,this]}}))}))},e.prototype.close=function(){return this._stream&&this._mediaStream&&(this._stream.getAudioTracks().forEach((function(t){t.stop()})),this._stream=void 0,this._mediaStream.disconnect(),this._mediaStream=void 0),this._device=void 0,this},e.enumerateDevices=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,navigator.mediaDevices.enumerateDevices()];case 1:return[2,t.sent().filter((function(t){return"audioinput"===t.kind}))]}}))}))},Object.defineProperty(e.prototype,"state",{get:function(){return this._stream&&this._stream.active?"started":"stopped"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"deviceId",{get:function(){return this._device?this._device.deviceId:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._device?this._device.groupId:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._device?this._device.label:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.close(),this._volume.dispose(),this.volume.dispose(),this},Object.defineProperty(e,"supported",{get:function(){return b(navigator.mediaDevices)&&b(navigator.mediaDevices.getUserMedia)},enumerable:!0,configurable:!0})}(Et);function ie(t,e){return s(this,void 0,void 0,(function(){var n,r;return u(this,(function(o){switch(o.label){case 0:return n=e/t.context.sampleRate,r=new st(1,n,t.context.sampleRate),new t.constructor(Object.assign(t.get(),{frequency:2/n,detune:0,context:r})).toDestination().start(0),[4,r.render()];case 1:return[2,o.sent().getChannelData(0)]}}))}))}var ae=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type"]))||this;n.name="ToneOscillatorNode",n._oscillator=n.context.createOscillator(),n._internalChannels=[n._oscillator];var r=V(e.getDefaults(),arguments,["frequency","type"]);return jt(n._oscillator,n._gainNode),n.type=r.type,n.frequency=new Ct({context:n.context,param:n._oscillator.frequency,units:"frequency",value:r.frequency}),n.detune=new Ct({context:n.context,param:n._oscillator.detune,units:"cents",value:r.detune}),n}return i(e,t),e.getDefaults=function(){return Object.assign(Mt.getDefaults(),{detune:0,frequency:440,type:"sine"})},e.prototype.start=function(t){var e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._oscillator.start(e),this},e.prototype._stopSource=function(t){this._oscillator.stop(t)},e.prototype.setPeriodicWave=function(t){return this._oscillator.setPeriodicWave(t),this},Object.defineProperty(e.prototype,"type",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),"started"===this.state&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this},e}(Mt),se=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type"]))||this;n.name="Oscillator",n._oscillator=null;var r=V(e.getDefaults(),arguments,["frequency","type"]);return n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency}),rt(n,"frequency"),n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),rt(n,"detune"),n._partials=r.partials,n._partialCount=r.partialCount,n._type=r.type,r.partialCount&&"custom"!==r.type&&(n._type=n.baseType+r.partialCount.toString()),n.phase=r.phase,n}return i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:"sine"})},e.prototype._start=function(t){var e=this,n=this.toSeconds(t),r=new ae({context:this.context,onended:function(){return e.onstop(e)}});this._oscillator=r,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(n)},e.prototype._stop=function(t){var e=this.toSeconds(t);this._oscillator&&this._oscillator.stop(e)},e.prototype._restart=function(t){var e=this.toSeconds(t);return this.log("restart",e),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(e),this},e.prototype.syncFrequency=function(){return this.context.transport.syncSignal(this.frequency),this},e.prototype.unsyncFrequency=function(){return this.context.transport.unsyncSignal(this.frequency),this},e.prototype._getCachedPeriodicWave=function(){var t=this;if("custom"===this._type)return n=e._periodicWaveCache.find((function(e){return e.phase===t._phase&&(n=e.partials,r=t._partials,n.length===r.length&&n.every((function(t,e){return r[e]===t})));var n,r}));var n=e._periodicWaveCache.find((function(e){return e.type===t._type&&e.phase===t._phase}));return this._partialCount=n?n.partialCount:this._partialCount,n},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t;var n=-1!==["sine","square","sawtooth","triangle"].indexOf(t);if(0===this._phase&&n)this._wave=void 0,this._partialCount=0,null!==this._oscillator&&(this._oscillator.type=t);else{var r=this._getCachedPeriodicWave();if(b(r)){var o=r.partials,i=r.wave;this._wave=i,this._partials=o,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}else{var a=l(this._getRealImaginary(t,this._phase),2),s=a[0],u=a[1],c=this.context.createPeriodicWave(s,u);this._wave=c,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave),e._periodicWaveCache.push({imag:u,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:s,type:this._type,wave:this._wave}),e._periodicWaveCache.length>100&&e._periodicWaveCache.shift()}}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return this._type.replace(this.partialCount.toString(),"")},set:function(t){this.partialCount&&"custom"!==this._type&&"custom"!==t?this.type=t+this.partialCount:this.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return this._partialCount},set:function(t){h(t,0);var e=this._type,n=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(n&&(e=n[1]),"custom"!==this._type)this.type=0===t?e:e+t.toString();else{var r=new Float32Array(t);this._partials.forEach((function(t,e){return r[e]=t})),this._partials=Array.from(r),this.type=this._type}},enumerable:!0,configurable:!0}),e.prototype._getRealImaginary=function(t,e){var n=2048,r=new Float32Array(n),o=new Float32Array(n),i=1;if("custom"===t){if(i=this._partials.length+1,this._partialCount=this._partials.length,n=i,0===this._partials.length)return[r,o]}else{var a=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(t);a?(i=parseInt(a[2],10)+1,this._partialCount=parseInt(a[2],10),t=a[1],n=i=Math.max(i,2)):this._partialCount=0,this._partials=[]}for(var s=1;s<n;++s){var u=2/(s*Math.PI),c=void 0;switch(t){case"sine":c=s<=i?1:0,this._partials[s-1]=c;break;case"square":c=1&s?2*u:0,this._partials[s-1]=c;break;case"sawtooth":c=u*(1&s?1:-1),this._partials[s-1]=c;break;case"triangle":c=1&s?u*u*2*(s-1>>1&1?-1:1):0,this._partials[s-1]=c;break;case"custom":c=this._partials[s-1];break;default:throw new TypeError("Oscillator: invalid type: "+t)}0!==c?(r[s]=-c*Math.sin(e*s),o[s]=c*Math.cos(e*s)):(r[s]=0,o[s]=0)}return[r,o]},e.prototype._inverseFFT=function(t,e,n){for(var r=0,o=t.length,i=0;i<o;i++)r+=t[i]*Math.cos(i*n)+e[i]*Math.sin(i*n);return r},e.prototype.getInitialValue=function(){for(var t=l(this._getRealImaginary(this._type,0),2),e=t[0],n=t[1],r=0,o=2*Math.PI,i=0;i<32;i++)r=Math.max(this._inverseFFT(e,n,i/32*o),r);return G(-this._inverseFFT(e,n,this._phase)/r,-1,1)},Object.defineProperty(e.prototype,"partials",{get:function(){return this._partials.slice(0,this.partialCount)},set:function(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this.type="custom")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._phase*(180/Math.PI)},set:function(t){this._phase=t*Math.PI/180,this.type=this._type},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),null!==this._oscillator&&this._oscillator.dispose(),this._wave=void 0,this.frequency.dispose(),this.detune.dispose(),this},e._periodicWaveCache=[],e}(te),ue=function(t){function e(){return t.call(this,Object.assign(V(e.getDefaults(),arguments,["context"])))||this}return i(e,t),e.prototype.connect=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Nt(this,t,e,n),this},e}(Et),ce=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["mapping","length"])))||this;n.name="WaveShaper",n._shaper=n.context.createWaveShaper(),n.input=n._shaper,n.output=n._shaper;var r=V(e.getDefaults(),arguments,["mapping","length"]);return S(r.mapping)||r.mapping instanceof Float32Array?n.curve=Float32Array.from(r.mapping):_(r.mapping)&&n.setMap(r.mapping,r.length),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{length:1024})},e.prototype.setMap=function(t,e){void 0===e&&(e=1024);for(var n=new Float32Array(e),r=0,o=e;r<o;r++){var i=r/(o-1)*2-1;n[r]=t(i,r)}return this.curve=n,this},Object.defineProperty(e.prototype,"curve",{get:function(){return this._shaper.curve},set:function(t){this._shaper.curve=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){p(["none","2x","4x"].some((function(e){return e.includes(t)})),"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.disconnect(),this},e}(ue),le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="AudioToGain",e._norm=new ce({context:e.context,mapping:function(t){return(t+1)/2}}),e.input=e._norm,e.output=e._norm,e}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._norm.dispose(),this},e}(ue),fe=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["value"])))||this;n.name="Multiply",n.override=!1;var r=V(e.getDefaults(),arguments,["value"]);return n._mult=n.input=n.output=new Dt({context:n.context,minValue:r.minValue,maxValue:r.maxValue}),n.factor=n._param=n._mult.gain,n.factor.setValueAtTime(r.value,0),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{value:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._mult.dispose(),this},e}(Rt),pe=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type","modulationType"]))||this;n.name="AMOscillator",n._modulationScale=new le({context:n.context}),n._modulationNode=new Dt({context:n.context});var r=V(e.getDefaults(),arguments,["frequency","type","modulationType"]);return n._carrier=new se({context:n.context,detune:r.detune,frequency:r.frequency,onstop:function(){return n.onstop(n)},phase:r.phase,type:r.type}),n.frequency=n._carrier.frequency,n.detune=n._carrier.detune,n._modulator=new se({context:n.context,phase:r.phase,type:r.modulationType}),n.harmonicity=new fe({context:n.context,units:"positive",value:r.harmonicity}),n.frequency.chain(n.harmonicity,n._modulator.frequency),n._modulator.chain(n._modulationScale,n._modulationNode.gain),n._carrier.chain(n._modulationNode,n.output),rt(n,["frequency","detune","harmonicity"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(se.getDefaults(),{harmonicity:1,modulationType:"square"})},e.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},e.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},e.prototype._restart=function(t){this._modulator.restart(t),this._carrier.restart(t)},Object.defineProperty(e.prototype,"type",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return this._carrier.baseType},set:function(t){this._carrier.baseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return this._carrier.partialCount},set:function(t){this._carrier.partialCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modulationType",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this},e}(te),he=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type","modulationType"]))||this;n.name="FMOscillator",n._modulationNode=new Dt({context:n.context,gain:0});var r=V(e.getDefaults(),arguments,["frequency","type","modulationType"]);return n._carrier=new se({context:n.context,detune:r.detune,frequency:0,onstop:function(){return n.onstop(n)},phase:r.phase,type:r.type}),n.detune=n._carrier.detune,n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency}),n._modulator=new se({context:n.context,phase:r.phase,type:r.modulationType}),n.harmonicity=new fe({context:n.context,units:"positive",value:r.harmonicity}),n.modulationIndex=new fe({context:n.context,units:"positive",value:r.modulationIndex}),n.frequency.connect(n._carrier.frequency),n.frequency.chain(n.harmonicity,n._modulator.frequency),n.frequency.chain(n.modulationIndex,n._modulationNode),n._modulator.connect(n._modulationNode.gain),n._modulationNode.connect(n._carrier.frequency),n._carrier.connect(n.output),n.detune.connect(n._modulator.detune),rt(n,["modulationIndex","frequency","detune","harmonicity"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(se.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})},e.prototype._start=function(t){this._modulator.start(t),this._carrier.start(t)},e.prototype._stop=function(t){this._modulator.stop(t),this._carrier.stop(t)},e.prototype._restart=function(t){return this._modulator.restart(t),this._carrier.restart(t),this},Object.defineProperty(e.prototype,"type",{get:function(){return this._carrier.type},set:function(t){this._carrier.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return this._carrier.baseType},set:function(t){this._carrier.baseType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return this._carrier.partialCount},set:function(t){this._carrier.partialCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modulationType",{get:function(){return this._modulator.type},set:function(t){this._modulator.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._carrier.phase},set:function(t){this._carrier.phase=t,this._modulator.phase=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return this._carrier.partials},set:function(t){this._carrier.partials=t},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this},e}(te),de=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","width"]))||this;n.name="PulseOscillator",n._widthGate=new Dt({context:n.context,gain:0}),n._thresh=new ce({context:n.context,mapping:function(t){return t<=0?-1:1}});var r=V(e.getDefaults(),arguments,["frequency","width"]);return n.width=new Rt({context:n.context,units:"audioRange",value:r.width}),n._sawtooth=new se({context:n.context,detune:r.detune,frequency:r.frequency,onstop:function(){return n.onstop(n)},phase:r.phase,type:"sawtooth"}),n.frequency=n._sawtooth.frequency,n.detune=n._sawtooth.detune,n._sawtooth.chain(n._thresh,n.output),n.width.chain(n._widthGate,n._thresh),rt(n,["width","frequency","detune"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})},e.prototype._start=function(t){t=this.toSeconds(t),this._sawtooth.start(t),this._widthGate.gain.setValueAtTime(1,t)},e.prototype._stop=function(t){t=this.toSeconds(t),this._sawtooth.stop(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(0,t)},e.prototype._restart=function(t){this._sawtooth.restart(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(1,t)},Object.defineProperty(e.prototype,"phase",{get:function(){return this._sawtooth.phase},set:function(t){this._sawtooth.phase=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return"pulse"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return"pulse"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return 0},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sawtooth.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this},e}(te),ye=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type","spread"]))||this;n.name="FatOscillator",n._oscillators=[];var r=V(e.getDefaults(),arguments,["frequency","type","spread"]);return n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency}),n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),n._spread=r.spread,n._type=r.type,n._phase=r.phase,n._partials=r.partials,n._partialCount=r.partialCount,n.count=r.count,rt(n,["frequency","detune"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(se.getDefaults(),{count:3,spread:20,type:"sawtooth"})},e.prototype._start=function(t){t=this.toSeconds(t),this._forEach((function(e){return e.start(t)}))},e.prototype._stop=function(t){t=this.toSeconds(t),this._forEach((function(e){return e.stop(t)}))},e.prototype._restart=function(t){this._forEach((function(e){return e.restart(t)}))},e.prototype._forEach=function(t){for(var e=0;e<this._oscillators.length;e++)t(this._oscillators[e],e)},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t,this._forEach((function(e){return e.type=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spread",{get:function(){return this._spread},set:function(t){if(this._spread=t,this._oscillators.length>1){var e=-t/2,n=t/(this._oscillators.length-1);this._forEach((function(t,r){return t.detune.value=e+n*r}))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._oscillators.length},set:function(t){var e=this;if(h(t,1),this._oscillators.length!==t){this._forEach((function(t){return t.dispose()})),this._oscillators=[];for(var n=0;n<t;n++){var r=new se({context:this.context,volume:-6-1.1*t,type:this._type,phase:this._phase+n/t*360,partialCount:this._partialCount,onstop:0===n?function(){return e.onstop(e)}:it});"custom"===this.type&&(r.partials=this._partials),this.frequency.connect(r.frequency),this.detune.connect(r.detune),r.detune.overridden=!1,r.connect(this.output),this._oscillators[n]=r}this.spread=this._spread,"started"===this.state&&this._forEach((function(t){return t.start()}))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._phase},set:function(t){this._phase=t,this._forEach((function(e){return e.phase=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return this._oscillators[0].baseType},set:function(t){this._forEach((function(e){return e.baseType=t})),this._type=this._oscillators[0].type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return this._oscillators[0].partials},set:function(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this._type="custom",this._forEach((function(e){return e.partials=t})))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return this._oscillators[0].partialCount},set:function(t){this._partialCount=t,this._forEach((function(e){return e.partialCount=t})),this._type=this._oscillators[0].type},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.frequency.dispose(),this.detune.dispose(),this._forEach((function(t){return t.dispose()})),this},e}(te),ve=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","modulationFrequency"]))||this;n.name="PWMOscillator",n.sourceType="pwm",n._scale=new fe({context:n.context,value:2});var r=V(e.getDefaults(),arguments,["frequency","modulationFrequency"]);return n._pulse=new de({context:n.context,frequency:r.modulationFrequency}),n._pulse._sawtooth.type="sine",n.modulationFrequency=n._pulse.frequency,n._modulator=new se({context:n.context,detune:r.detune,frequency:r.frequency,onstop:function(){return n.onstop(n)},phase:r.phase}),n.frequency=n._modulator.frequency,n.detune=n._modulator.detune,n._modulator.chain(n._scale,n._pulse.width),n._pulse.connect(n.output),rt(n,["modulationFrequency","frequency","detune"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})},e.prototype._start=function(t){t=this.toSeconds(t),this._modulator.start(t),this._pulse.start(t)},e.prototype._stop=function(t){t=this.toSeconds(t),this._modulator.stop(t),this._pulse.stop(t)},e.prototype._restart=function(t){this._modulator.restart(t),this._pulse.restart(t)},Object.defineProperty(e.prototype,"type",{get:function(){return"pwm"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseType",{get:function(){return"pwm"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._modulator.phase},set:function(t){this._modulator.phase=t},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this},e}(te),me={am:pe,fat:ye,fm:he,oscillator:se,pulse:de,pwm:ve},ge=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type"]))||this;n.name="OmniOscillator";var r=V(e.getDefaults(),arguments,["frequency","type"]);return n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency}),n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),rt(n,["frequency","detune"]),n.set(r),n}return i(e,t),e.getDefaults=function(){return Object.assign(se.getDefaults(),he.getDefaults(),pe.getDefaults(),ye.getDefaults(),de.getDefaults(),ve.getDefaults())},e.prototype._start=function(t){this._oscillator.start(t)},e.prototype._stop=function(t){this._oscillator.stop(t)},e.prototype._restart=function(t){return this._oscillator.restart(t),this},Object.defineProperty(e.prototype,"type",{get:function(){var t=this,e="";return["am","fm","fat"].some((function(e){return t._sourceType===e}))&&(e=this._sourceType),e+this._oscillator.type},set:function(t){"fm"===t.substr(0,2)?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(2)):"am"===t.substr(0,2)?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(2)):"fat"===t.substr(0,3)?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=t.substr(3)):"pwm"===t?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):"pulse"===t?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partials",{get:function(){return this._oscillator.partials},set:function(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partials=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"partialCount",{get:function(){return this._oscillator.partialCount},set:function(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partialCount=t)},enumerable:!0,configurable:!0}),e.prototype.set=function(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),t.prototype.set.call(this,e),this},e.prototype._createNewOscillator=function(t){var e=this;if(t!==this._sourceType){this._sourceType=t;var n=me[t],r=this.now();if(this._oscillator){var o=this._oscillator;o.stop(r),this.context.setTimeout((function(){return o.dispose()}),this.blockTime)}this._oscillator=new n({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=function(){return e.onstop(e)},"started"===this.state&&this._oscillator.start(r)}},Object.defineProperty(e.prototype,"phase",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sourceType",{get:function(){return this._sourceType},set:function(t){var e="sine";"pwm"!==this._oscillator.type&&"pulse"!==this._oscillator.type&&(e=this._oscillator.type),"fm"===t?this.type="fm"+e:"am"===t?this.type="am"+e:"fat"===t?this.type="fat"+e:"oscillator"===t?this.type=e:"pulse"===t?this.type="pulse":"pwm"===t&&(this.type="pwm")},enumerable:!0,configurable:!0}),e.prototype._getOscType=function(t,e){return t instanceof me[e]},Object.defineProperty(e.prototype,"baseType",{get:function(){return this._oscillator.baseType},set:function(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||"pulse"===t||"pwm"===t||(this._oscillator.baseType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this._getOscType(this._oscillator,"pulse")?this._oscillator.width:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._getOscType(this._oscillator,"fat")?this._oscillator.count:void 0},set:function(t){this._getOscType(this._oscillator,"fat")&&w(t)&&(this._oscillator.count=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spread",{get:function(){return this._getOscType(this._oscillator,"fat")?this._oscillator.spread:void 0},set:function(t){this._getOscType(this._oscillator,"fat")&&w(t)&&(this._oscillator.spread=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modulationType",{get:function(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.modulationType:void 0},set:function(t){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&k(t)&&(this._oscillator.modulationType=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modulationIndex",{get:function(){return this._getOscType(this._oscillator,"fm")?this._oscillator.modulationIndex:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"harmonicity",{get:function(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.harmonicity:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"modulationFrequency",{get:function(){return this._getOscType(this._oscillator,"pwm")?this._oscillator.modulationFrequency:void 0},enumerable:!0,configurable:!0}),e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,ie(this,t)]}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this},e}(te),be=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["value"])))||this;return n.override=!1,n.name="Add",n._sum=new Dt({context:n.context}),n.input=n._sum,n.output=n._sum,n.addend=n._param,At(n._constantSource,n._sum),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{value:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sum.dispose(),this},e}(Rt),_e=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["min","max"])))||this;n.name="Scale";var r=V(e.getDefaults(),arguments,["min","max"]);return n._mult=n.input=new fe({context:n.context,value:r.max-r.min}),n._add=n.output=new be({context:n.context,value:r.min}),n._min=r.min,n._max=r.max,n.input.connect(n.output),n}return i(e,t),e.getDefaults=function(){return Object.assign(ue.getDefaults(),{max:1,min:0})},Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(t){this._min=t,this._setRange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(t){this._max=t,this._setRange()},enumerable:!0,configurable:!0}),e.prototype._setRange=function(){this._add.value=this._min,this._mult.value=this._max-this._min},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._add.dispose(),this._mult.dispose(),this},e}(ue),we=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments)))||this;return n.name="Zero",n._gain=new Dt({context:n.context}),n.output=n._gain,n.input=void 0,jt(n.context.getConstant(0),n._gain),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),Pt(this.context.getConstant(0),this._gain),this},e}(ue),xe=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","min","max"]))||this;n.name="LFO",n._stoppedValue=0,n._units="number",n.convert=!0,n._fromType=Ct.prototype._fromType,n._toType=Ct.prototype._toType,n._is=Ct.prototype._is,n._clampValue=Ct.prototype._clampValue;var r=V(e.getDefaults(),arguments,["frequency","min","max"]);return n._oscillator=new se({context:n.context,frequency:r.frequency,type:r.type}),n.frequency=n._oscillator.frequency,n._amplitudeGain=new Dt({context:n.context,gain:r.amplitude,units:"normalRange"}),n.amplitude=n._amplitudeGain.gain,n._stoppedSignal=new Rt({context:n.context,units:"audioRange",value:0}),n._zeros=new we({context:n.context}),n._a2g=new le({context:n.context}),n._scaler=n.output=new _e({context:n.context,max:r.max,min:r.min}),n.min=r.min,n.max=r.max,n.units=r.units,n._oscillator.chain(n._a2g,n._amplitudeGain,n._scaler),n._zeros.connect(n._a2g),n._stoppedSignal.connect(n._a2g),rt(n,["amplitude","frequency"]),n.phase=r.phase,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{amplitude:1,frequency:"4n",max:1,min:0,phase:0,type:"sine",units:"number"})},e.prototype.start=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(0,t),this._oscillator.start(t),this},e.prototype.stop=function(t){return t=this.toSeconds(t),this._stoppedSignal.setValueAtTime(this._stoppedValue,t),this._oscillator.stop(t),this},e.prototype.sync=function(){return this._oscillator.sync(),this._oscillator.syncFrequency(),this},e.prototype.unsync=function(){return this._oscillator.unsync(),this._oscillator.unsyncFrequency(),this},Object.defineProperty(e.prototype,"min",{get:function(){return this._toType(this._scaler.min)},set:function(t){t=this._fromType(t),this._scaler.min=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._toType(this._scaler.max)},set:function(t){t=this._fromType(t),this._scaler.max=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._oscillator.type},set:function(t){this._oscillator.type=t,this._stoppedValue=this._oscillator.getInitialValue(),this._stoppedSignal.value=this._stoppedValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phase",{get:function(){return this._oscillator.phase},set:function(t){this._oscillator.phase=t,this._stoppedValue=this._oscillator.getInitialValue(),this._stoppedSignal.value=this._stoppedValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"units",{get:function(){return this._units},set:function(t){var e=this.min,n=this.max;this._units=t,this.min=e,this.max=n},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._oscillator.state},enumerable:!0,configurable:!0}),e.prototype.connect=function(t,e,n){return(t instanceof Ct||t instanceof Rt)&&(this.convert=t.convert,this.units=t.units),Nt(this,t,e,n),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._oscillator.dispose(),this._stoppedSignal.dispose(),this._zeros.dispose(),this._scaler.dispose(),this._a2g.dispose(),this._amplitudeGain.dispose(),this.amplitude.dispose(),this},e}(Et);function Oe(t,e){void 0===e&&(e=1/0);var n=new WeakMap;return function(r,o){Reflect.defineProperty(r,o,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){h(r,t,e),n.set(this,r)}})}}function Se(t,e){void 0===e&&(e=1/0);var n=new WeakMap;return function(r,o){Reflect.defineProperty(r,o,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){h(this.toSeconds(r),t,e),n.set(this,r)}})}}var ke=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["url","onload"]))||this;n.name="Player",n._activeSources=new Set;var r=V(e.getDefaults(),arguments,["url","onload"]);return n._buffer=new at({onload:n._onload.bind(n,r.onload),onerror:r.onerror,reverse:r.reverse,url:r.url}),n.autostart=r.autostart,n._loop=r.loop,n._loopStart=r.loopStart,n._loopEnd=r.loopEnd,n._playbackRate=r.playbackRate,n.fadeIn=r.fadeIn,n.fadeOut=r.fadeOut,n}return i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:it,onerror:it,playbackRate:1,reverse:!1})},e.prototype.load=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this._buffer.load(t)];case 1:return e.sent(),this._onload(),[2,this]}}))}))},e.prototype._onload=function(t){void 0===t&&(t=it),t(),this.autostart&&this.start()},e.prototype._onSourceEnd=function(t){this.onstop(this),this._activeSources.delete(t),0!==this._activeSources.size||this._synced||"started"!==this._state.getValueAtTime(this.now())||this._state.setStateAtTime("stopped",this.now())},e.prototype.start=function(e,n,r){return t.prototype.start.call(this,e,n,r),this},e.prototype._start=function(t,e,n){e=this._loop?L(e,this._loopStart):L(e,0);var r=this.toSeconds(e);this._synced&&(r*=this._playbackRate);var o=n;n=L(n,Math.max(this._buffer.duration-r,0));var i=this.toSeconds(n);i/=this._playbackRate,t=this.toSeconds(t);var a=new ee({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);this._loop||this._synced||(this._state.cancel(t+i),this._state.setStateAtTime("stopped",t+i,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&g(o)?a.start(t,r):a.start(t,r,i-this.toSeconds(this.fadeOut))},e.prototype._stop=function(t){var e=this.toSeconds(t);this._activeSources.forEach((function(t){return t.stop(e)}))},e.prototype.restart=function(e,n,r){return t.prototype.restart.call(this,e,n,r),this},e.prototype._restart=function(t,e,n){this._stop(t),this._start(t,e,n)},e.prototype.seek=function(t,e){var n=this.toSeconds(e);if("started"===this._state.getValueAtTime(n)){var r=this.toSeconds(t);this._stop(n),this._start(n,r)}return this},e.prototype.setLoopPoints=function(t,e){return this.loopStart=t,this.loopEnd=e,this},Object.defineProperty(e.prototype,"loopStart",{get:function(){return this._loopStart},set:function(t){this._loopStart=t,this.buffer.loaded&&h(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((function(e){e.loopStart=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=t,this.buffer.loaded&&h(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((function(e){e.loopEnd=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._buffer},set:function(t){this._buffer.set(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(t){if(this._loop!==t&&(this._loop=t,this._activeSources.forEach((function(e){e.loop=t})),t)){var e=this._state.getNextState("stopped",this.now());e&&this._state.cancel(e.time)}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t;var e=this.now(),n=this._state.getNextState("stopped",e);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach((function(t){return t.cancelStop()}))),this._activeSources.forEach((function(n){n.playbackRate.setValueAtTime(t,e)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverse",{get:function(){return this._buffer.reverse},set:function(t){this._buffer.reverse=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._buffer.loaded},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._activeSources.forEach((function(t){return t.dispose()})),this._activeSources.clear(),this._buffer.dispose(),this},a([Se(0)],e.prototype,"fadeIn",void 0),a([Se(0)],e.prototype,"fadeOut",void 0),e}(te),Te=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["urls","onload"],"urls"))||this;n.name="Players",n.input=void 0,n._players=new Map;var r=V(e.getDefaults(),arguments,["urls","onload"],"urls");return n._volume=n.output=new Qt({context:n.context,volume:r.volume}),n.volume=n._volume.volume,rt(n,"volume"),n._buffers=new Xt({urls:r.urls,onload:r.onload,baseUrl:r.baseUrl,onerror:r.onerror}),n.mute=r.mute,n._fadeIn=r.fadeIn,n._fadeOut=r.fadeOut,n}i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{baseUrl:"",fadeIn:0,fadeOut:0,mute:!1,onload:it,onerror:it,urls:{},volume:0})},Object.defineProperty(e.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fadeIn",{get:function(){return this._fadeIn},set:function(t){this._fadeIn=t,this._players.forEach((function(e){e.fadeIn=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fadeOut",{get:function(){return this._fadeOut},set:function(t){this._fadeOut=t,this._players.forEach((function(e){e.fadeOut=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Array.from(this._players).some((function(t){var e=l(t,2);e[0];return"started"===e[1].state}))?"started":"stopped"},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._buffers.has(t)},e.prototype.player=function(t){if(p(this.has(t),"No Player with the name "+t+" exists on this object"),!this._players.has(t)){var e=new ke({context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,url:this._buffers.get(t)}).connect(this.output);this._players.set(t,e)}return this._players.get(t)},Object.defineProperty(e.prototype,"loaded",{get:function(){return this._buffers.loaded},enumerable:!0,configurable:!0}),e.prototype.add=function(t,e,n){return p(!this._buffers.has(t),"A buffer with that name already exists on this object"),this._buffers.add(t,e,n),this},e.prototype.stopAll=function(t){return this._players.forEach((function(e){return e.stop(t)})),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._volume.dispose(),this.volume.dispose(),this._players.forEach((function(t){return t.dispose()})),this._buffers.dispose(),this}}(Et),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["url","onload"]))||this;n.name="GrainPlayer",n._loopStart=0,n._loopEnd=0,n._activeSources=[];var r=V(e.getDefaults(),arguments,["url","onload"]);return n.buffer=new at({onload:r.onload,onerror:r.onerror,reverse:r.reverse,url:r.url}),n._clock=new Lt({context:n.context,callback:n._tick.bind(n),frequency:1/r.grainSize}),n._playbackRate=r.playbackRate,n._grainSize=r.grainSize,n._overlap=r.overlap,n.detune=r.detune,n.overlap=r.overlap,n.loop=r.loop,n.playbackRate=r.playbackRate,n.grainSize=r.grainSize,n.loopStart=r.loopStart,n.loopEnd=r.loopEnd,n.reverse=r.reverse,n._clock.on("stop",n._onstop.bind(n)),n}i(e,t),e.getDefaults=function(){return Object.assign(te.getDefaults(),{onload:it,onerror:it,overlap:.1,grainSize:.2,playbackRate:1,detune:0,loop:!1,loopStart:0,loopEnd:0,reverse:!1})},e.prototype._start=function(t,e,n){e=L(e,0),e=this.toSeconds(e),t=this.toSeconds(t);var r=1/this._clock.frequency.getValueAtTime(t);this._clock.start(t,e/r),n&&this.stop(t+this.toSeconds(n))},e.prototype.restart=function(e,n,r){return t.prototype.restart.call(this,e,n,r),this},e.prototype._restart=function(t,e,n){this._stop(t),this._start(t,e,n)},e.prototype._stop=function(t){this._clock.stop(t)},e.prototype._onstop=function(t){this._activeSources.forEach((function(e){e.fadeOut=0,e.stop(t)})),this.onstop(this)},e.prototype._tick=function(t){var e=this,n=this._clock.getTicksAtTime(t),r=n*(1/this._clock.frequency.getValueAtTime(t));if(this.log("offset",r),!this.loop&&r>this.buffer.duration)this.stop(t);else{var o=r<this._overlap?0:this._overlap,i=new ee({context:this.context,url:this.buffer,fadeIn:o,fadeOut:this._overlap,loop:this.loop,loopStart:this._loopStart,loopEnd:this._loopEnd,playbackRate:vt(this.detune/100)}).connect(this.output);i.start(t,this._grainSize*n),i.stop(t+this._grainSize/this.playbackRate),this._activeSources.push(i),i.onended=function(){var t=e._activeSources.indexOf(i);-1!==t&&e._activeSources.splice(t,1)}}},Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){h(t,.001),this._playbackRate=t,this.grainSize=this._grainSize},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopStart",{get:function(){return this._loopStart},set:function(t){this.buffer.loaded&&h(this.toSeconds(t),0,this.buffer.duration),this._loopStart=this.toSeconds(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return this._loopEnd},set:function(t){this.buffer.loaded&&h(this.toSeconds(t),0,this.buffer.duration),this._loopEnd=this.toSeconds(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverse",{get:function(){return this.buffer.reverse},set:function(t){this.buffer.reverse=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"grainSize",{get:function(){return this._grainSize},set:function(t){this._grainSize=this.toSeconds(t),this._clock.frequency.setValueAtTime(this._playbackRate/this._grainSize,this.now())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._overlap},set:function(t){this._overlap=this.toSeconds(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this.buffer.loaded},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.buffer.dispose(),this._clock.dispose(),this._activeSources.forEach((function(t){return t.dispose()})),this}}(te),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Abs",e._abs=new ce({context:e.context,mapping:function(t){return Math.abs(t)<.001?0:Math.abs(t)}}),e.input=e._abs,e.output=e._abs,e}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._abs.dispose(),this},e}(ue)),Ce=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="GainToAudio",e._norm=new ce({context:e.context,mapping:function(t){return 2*Math.abs(t)-1}}),e.input=e._norm,e.output=e._norm,e}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._norm.dispose(),this},e}(ue),Ee=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Negate",e._multiply=new fe({context:e.context,value:-1}),e.input=e._multiply,e.output=e._multiply,e}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._multiply.dispose(),this},e}(ue),Ae=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["value"])))||this;return n.override=!1,n.name="Subtract",n._sum=new Dt({context:n.context}),n.input=n._sum,n.output=n._sum,n._neg=new Ee({context:n.context}),n.subtrahend=n._param,At(n._constantSource,n._neg,n._sum),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{value:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._neg.dispose(),this._sum.dispose(),this},e}(Rt),je=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments)))||this;return n.name="GreaterThanZero",n._thresh=n.output=new ce({context:n.context,length:127,mapping:function(t){return t<=0?0:1}}),n._scale=n.input=new fe({context:n.context,value:1e4}),n._scale.connect(n._thresh),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._scale.dispose(),this._thresh.dispose(),this},e}(ue),Pe=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["value"])))||this;n.name="GreaterThan",n.override=!1;var r=V(e.getDefaults(),arguments,["value"]);return n._subtract=n.input=new Ae({context:n.context,value:r.value}),n._gtz=n.output=new je({context:n.context}),n.comparator=n._param=n._subtract.subtrahend,rt(n,"comparator"),n._subtract.connect(n._gtz),n}return i(e,t),e.getDefaults=function(){return Object.assign(Rt.getDefaults(),{value:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._gtz.dispose(),this._subtract.dispose(),this.comparator.dispose(),this},e}(Rt),De=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["value"])))||this;n.name="Pow";var r=V(e.getDefaults(),arguments,["value"]);return n._exponentScaler=n.input=n.output=new ce({context:n.context,mapping:n._expFunc(r.value),length:8192}),n._exponent=r.value,n}return i(e,t),e.getDefaults=function(){return Object.assign(ue.getDefaults(),{value:1})},e.prototype._expFunc=function(t){return function(e){return Math.pow(Math.abs(e),t)}},Object.defineProperty(e.prototype,"value",{get:function(){return this._exponent},set:function(t){this._exponent=t,this._exponentScaler.setMap(this._expFunc(this._exponent))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._exponentScaler.dispose(),this},e}(ue),Me=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["min","max","exponent"])))||this;n.name="ScaleExp";var r=V(e.getDefaults(),arguments,["min","max","exponent"]);return n.input=n._exp=new De({context:n.context,value:r.exponent}),n._exp.connect(n._mult),n}return i(e,t),e.getDefaults=function(){return Object.assign(_e.getDefaults(),{exponent:1})},Object.defineProperty(e.prototype,"exponent",{get:function(){return this._exp.value},set:function(t){this._exp.value=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._exp.dispose(),this},e}(_e),Ie=(function(t){function e(){var e=t.call(this,V(Rt.getDefaults(),arguments,["value","units"]))||this;e.name="SyncedSignal",e.override=!1;var n=V(Rt.getDefaults(),arguments,["value","units"]);return e._lastVal=n.value,e._synced=e.context.transport.scheduleRepeat(e._onTick.bind(e),"1i"),e._syncedCallback=e._anchorValue.bind(e),e.context.transport.on("start",e._syncedCallback),e.context.transport.on("pause",e._syncedCallback),e.context.transport.on("stop",e._syncedCallback),e._constantSource.disconnect(),e._constantSource.stop(0),e._constantSource=e.output=new It({context:e.context,offset:n.value,units:n.units}).start(0),e.setValueAtTime(n.value,0),e}i(e,t),e.prototype._onTick=function(e){var n=t.prototype.getValueAtTime.call(this,this.context.transport.seconds);this._lastVal!==n&&(this._lastVal=n,this._constantSource.offset.setValueAtTime(n,e))},e.prototype._anchorValue=function(e){var n=t.prototype.getValueAtTime.call(this,this.context.transport.seconds);this._lastVal=n,this._constantSource.offset.cancelAndHoldAtTime(e),this._constantSource.offset.setValueAtTime(n,e)},e.prototype.getValueAtTime=function(e){var n=new St(this.context,e).toSeconds();return t.prototype.getValueAtTime.call(this,n)},e.prototype.setValueAtTime=function(e,n){var r=new St(this.context,n).toSeconds();return t.prototype.setValueAtTime.call(this,e,r),this},e.prototype.linearRampToValueAtTime=function(e,n){var r=new St(this.context,n).toSeconds();return t.prototype.linearRampToValueAtTime.call(this,e,r),this},e.prototype.exponentialRampToValueAtTime=function(e,n){var r=new St(this.context,n).toSeconds();return t.prototype.exponentialRampToValueAtTime.call(this,e,r),this},e.prototype.setTargetAtTime=function(e,n,r){var o=new St(this.context,n).toSeconds();return t.prototype.setTargetAtTime.call(this,e,o,r),this},e.prototype.cancelScheduledValues=function(e){var n=new St(this.context,e).toSeconds();return t.prototype.cancelScheduledValues.call(this,n),this},e.prototype.setValueCurveAtTime=function(e,n,r,o){var i=new St(this.context,n).toSeconds();return r=this.toSeconds(r),t.prototype.setValueCurveAtTime.call(this,e,i,r,o),this},e.prototype.cancelAndHoldAtTime=function(e){var n=new St(this.context,e).toSeconds();return t.prototype.cancelAndHoldAtTime.call(this,n),this},e.prototype.setRampPoint=function(e){var n=new St(this.context,e).toSeconds();return t.prototype.setRampPoint.call(this,n),this},e.prototype.exponentialRampTo=function(e,n,r){var o=new St(this.context,r).toSeconds();return t.prototype.exponentialRampTo.call(this,e,n,o),this},e.prototype.linearRampTo=function(e,n,r){var o=new St(this.context,r).toSeconds();return t.prototype.linearRampTo.call(this,e,n,o),this},e.prototype.targetRampTo=function(e,n,r){var o=new St(this.context,r).toSeconds();return t.prototype.targetRampTo.call(this,e,n,o),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.context.transport.clear(this._synced),this.context.transport.off("start",this._syncedCallback),this.context.transport.off("pause",this._syncedCallback),this.context.transport.off("stop",this._syncedCallback),this._constantSource.dispose(),this}}(Rt),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["attack","decay","sustain","release"]))||this;n.name="Envelope",n._sig=new Rt({context:n.context,value:0}),n.output=n._sig,n.input=void 0;var r=V(e.getDefaults(),arguments,["attack","decay","sustain","release"]);return n.attack=r.attack,n.decay=r.decay,n.sustain=r.sustain,n.release=r.release,n.attackCurve=r.attackCurve,n.releaseCurve=r.releaseCurve,n.decayCurve=r.decayCurve,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})},Object.defineProperty(e.prototype,"value",{get:function(){return this.getValueAtTime(this.now())},enumerable:!0,configurable:!0}),e.prototype._getCurve=function(t,e){if(k(t))return t;var n=void 0;for(n in Re)if(Re[n][e]===t)return n;return t},e.prototype._setCurve=function(t,e,n){if(k(n)&&Reflect.has(Re,n)){var r=Re[n];x(r)?"_decayCurve"!==t&&(this[t]=r[e]):this[t]=r}else{if(!S(n)||"_decayCurve"===t)throw new Error("Envelope: invalid curve: "+n);this[t]=n}},Object.defineProperty(e.prototype,"attackCurve",{get:function(){return this._getCurve(this._attackCurve,"In")},set:function(t){this._setCurve("_attackCurve","In",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"releaseCurve",{get:function(){return this._getCurve(this._releaseCurve,"Out")},set:function(t){this._setCurve("_releaseCurve","Out",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"decayCurve",{get:function(){return this._decayCurve},set:function(t){p(["linear","exponential"].some((function(e){return e===t})),"Invalid envelope curve: "+t),this._decayCurve=t},enumerable:!0,configurable:!0}),e.prototype.triggerAttack=function(t,e){void 0===e&&(e=1),this.log("triggerAttack",t,e),t=this.toSeconds(t);var n=this.toSeconds(this.attack),r=this.toSeconds(this.decay),o=this.getValueAtTime(t);o>0&&(n=(1-o)/(1/n));if(n<this.sampleTime)this._sig.cancelScheduledValues(t),this._sig.setValueAtTime(e,t);else if("linear"===this._attackCurve)this._sig.linearRampTo(e,n,t);else if("exponential"===this._attackCurve)this._sig.targetRampTo(e,n,t);else{this._sig.cancelAndHoldAtTime(t);for(var i=this._attackCurve,a=1;a<i.length;a++)if(i[a-1]<=o&&o<=i[a]){(i=this._attackCurve.slice(a))[0]=o;break}this._sig.setValueCurveAtTime(i,t,n,e)}if(r&&this.sustain<1){var s=e*this.sustain,u=t+n;this.log("decay",u),"linear"===this._decayCurve?this._sig.linearRampToValueAtTime(s,r+u):this._sig.exponentialApproachValueAtTime(s,u,r)}return this},e.prototype.triggerRelease=function(t){this.log("triggerRelease",t),t=this.toSeconds(t);var e=this.getValueAtTime(t);if(e>0){var n=this.toSeconds(this.release);n<this.sampleTime?this._sig.setValueAtTime(0,t):"linear"===this._releaseCurve?this._sig.linearRampTo(0,n,t):"exponential"===this._releaseCurve?this._sig.targetRampTo(0,n,t):(p(S(this._releaseCurve),"releaseCurve must be either 'linear', 'exponential' or an array"),this._sig.cancelAndHoldAtTime(t),this._sig.setValueCurveAtTime(this._releaseCurve,t,n,e))}return this},e.prototype.getValueAtTime=function(t){return this._sig.getValueAtTime(t)},e.prototype.triggerAttackRelease=function(t,e,n){return void 0===n&&(n=1),e=this.toSeconds(e),this.triggerAttack(e,n),this.triggerRelease(e+this.toSeconds(t)),this},e.prototype.cancel=function(t){return this._sig.cancelScheduledValues(this.toSeconds(t)),this},e.prototype.connect=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Nt(this,t,e,n),this},e.prototype.asArray=function(t){return void 0===t&&(t=1024),s(this,void 0,void 0,(function(){var e,n,r,o,i,a,s;return u(this,(function(u){switch(u.label){case 0:return e=t/this.context.sampleRate,n=new st(1,e,this.context.sampleRate),r=this.toSeconds(this.attack)+this.toSeconds(this.decay),o=r+this.toSeconds(this.release),a=o+(i=.1*o),(s=new this.constructor(Object.assign(this.get(),{attack:e*this.toSeconds(this.attack)/a,decay:e*this.toSeconds(this.decay)/a,release:e*this.toSeconds(this.release)/a,context:n})))._sig.toDestination(),s.triggerAttackRelease(e*(r+i)/a,0),[4,n.render()];case 1:return[2,u.sent().getChannelData(0)]}}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._sig.dispose(),this},a([Se(0)],e.prototype,"attack",void 0),a([Se(0)],e.prototype,"decay",void 0),a([Oe(0,1)],e.prototype,"sustain",void 0),a([Se(0)],e.prototype,"release",void 0),e}(Et)),Re=function(){var t,e,n=[];for(t=0;t<128;t++)n[t]=Math.sin(t/127*(Math.PI/2));var r=[];for(t=0;t<127;t++){e=t/127;var o=Math.sin(e*(2*Math.PI)*6.4-Math.PI/2)+1;r[t]=o/10+.83*e}r[127]=1;var i=[];for(t=0;t<128;t++)i[t]=Math.ceil(t/127*5)/5;var a=[];for(t=0;t<128;t++)e=t/127,a[t]=.5*(1-Math.cos(Math.PI*e));var s,u=[];for(t=0;t<128;t++){e=t/127;var c=4*Math.pow(e,3)+.2,l=Math.cos(c*Math.PI*2*e);u[t]=Math.abs(l*(1-e))}function f(t){for(var e=new Array(t.length),n=0;n<t.length;n++)e[n]=1-t[n];return e}return{bounce:{In:f(u),Out:u},cosine:{In:n,Out:(s=n,s.slice(0).reverse())},exponential:"exponential",linear:"linear",ripple:{In:r,Out:f(r)},sine:{In:a,Out:f(a)},step:{In:i,Out:f(i)}}}(),Ne=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n._scheduledEvents=[],n._synced=!1,n._original_triggerAttack=n.triggerAttack,n._original_triggerRelease=n.triggerRelease;var r=V(e.getDefaults(),arguments);return n._volume=n.output=new Qt({context:n.context,volume:r.volume}),n.volume=n._volume.volume,rt(n,"volume"),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{volume:0})},e.prototype.sync=function(){return this._synced||(this._synced=!0,this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0)),this},e.prototype._syncMethod=function(t,e){var n=this,r=this["_original_"+t]=this[t];this[t]=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];var i=t[e],a=n.context.transport.schedule((function(o){t[e]=o,r.apply(n,t)}),i);n._scheduledEvents.push(a)}},e.prototype.unsync=function(){var t=this;return this._scheduledEvents.forEach((function(e){return t.context.transport.clear(e)})),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this},e.prototype.triggerAttackRelease=function(t,e,n,r){var o=this.toSeconds(n),i=this.toSeconds(e);return this.triggerAttack(t,o,r),this.triggerRelease(o+i),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this},e}(Et),Fe=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this,r=V(e.getDefaults(),arguments);return n.portamento=r.portamento,n.onsilence=r.onsilence,n}return i(e,t),e.getDefaults=function(){return Object.assign(Ne.getDefaults(),{detune:0,onsilence:it,portamento:0})},e.prototype.triggerAttack=function(t,e,n){void 0===n&&(n=1),this.log("triggerAttack",t,e,n);var r=this.toSeconds(e);return this._triggerEnvelopeAttack(r,n),this.setNote(t,r),this},e.prototype.triggerRelease=function(t){this.log("triggerRelease",t);var e=this.toSeconds(t);return this._triggerEnvelopeRelease(e),this},e.prototype.setNote=function(t,e){var n=this.toSeconds(e),r=t instanceof wt?t.toFrequency():t;if(this.portamento>0&&this.getLevelAtTime(n)>.05){var o=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,o,n)}else this.frequency.setValueAtTime(r,n);return this},a([Se(0)],e.prototype,"portamento",void 0),e}(Ne),qe=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["attack","decay","sustain","release"]))||this;return n.name="AmplitudeEnvelope",n._gainNode=new Dt({context:n.context,gain:0}),n.output=n._gainNode,n.input=n._gainNode,n._sig.connect(n._gainNode.gain),n.output=n._gainNode,n.input=n._gainNode,n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._gainNode.dispose(),this},e}(Ie),Ve=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="Synth";var r=V(e.getDefaults(),arguments);return n.oscillator=new ge(Object.assign({context:n.context,detune:r.detune,onstop:function(){return n.onsilence(n)}},r.oscillator)),n.frequency=n.oscillator.frequency,n.detune=n.oscillator.detune,n.envelope=new qe(Object.assign({context:n.context},r.envelope)),n.oscillator.chain(n.envelope,n.output),rt(n,["oscillator","frequency","detune","envelope"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Fe.getDefaults(),{envelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(z(ge.getDefaults(),f(Object.keys(te.getDefaults()),["frequency","detune"])),{type:"triangle"})})},e.prototype._triggerEnvelopeAttack=function(t,e){if(this.envelope.triggerAttack(t,e),this.oscillator.start(t),0===this.envelope.sustain){var n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(t+n+r)}},e.prototype._triggerEnvelopeRelease=function(t){this.envelope.triggerRelease(t),this.oscillator.stop(t+this.toSeconds(this.envelope.release))},e.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.oscillator.dispose(),this.envelope.dispose(),this},e}(Fe),Le=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="ModulationSynth";var r=V(e.getDefaults(),arguments);return n._carrier=new Ve({context:n.context,oscillator:r.oscillator,envelope:r.envelope,onsilence:function(){return n.onsilence(n)},volume:-10}),n._modulator=new Ve({context:n.context,oscillator:r.modulation,envelope:r.modulationEnvelope,volume:-10}),n.oscillator=n._carrier.oscillator,n.envelope=n._carrier.envelope,n.modulation=n._modulator.oscillator,n.modulationEnvelope=n._modulator.envelope,n.frequency=new Rt({context:n.context,units:"frequency"}),n.detune=new Rt({context:n.context,value:r.detune,units:"cents"}),n.harmonicity=new fe({context:n.context,value:r.harmonicity,minValue:0}),n._modulationNode=new Dt({context:n.context,gain:0}),rt(n,["frequency","harmonicity","oscillator","envelope","modulation","modulationEnvelope","detune"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Fe.getDefaults(),{harmonicity:3,oscillator:Object.assign(z(ge.getDefaults(),f(Object.keys(te.getDefaults()),["frequency","detune"])),{type:"sine"}),envelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{attack:.01,decay:.01,sustain:1,release:.5}),modulation:Object.assign(z(ge.getDefaults(),f(Object.keys(te.getDefaults()),["frequency","detune"])),{type:"square"}),modulationEnvelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{attack:.5,decay:0,sustain:1,release:.5})})},e.prototype._triggerEnvelopeAttack=function(t,e){this._carrier._triggerEnvelopeAttack(t,e),this._modulator._triggerEnvelopeAttack(t,e)},e.prototype._triggerEnvelopeRelease=function(t){return this._carrier._triggerEnvelopeRelease(t),this._modulator._triggerEnvelopeRelease(t),this},e.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._carrier.dispose(),this._modulator.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._modulationNode.dispose(),this},e}(Fe),ze=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;return n.name="AMSynth",n._modulationScale=new le({context:n.context}),n.frequency.connect(n._carrier.frequency),n.frequency.chain(n.harmonicity,n._modulator.frequency),n.detune.fan(n._carrier.detune,n._modulator.detune),n._modulator.chain(n._modulationScale,n._modulationNode.gain),n._carrier.chain(n._modulationNode,n.output),n}i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._modulationScale.dispose(),this}}(Le),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type","rolloff"]))||this;n.name="Filter",n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context}),n._filters=[];var r=V(e.getDefaults(),arguments,["frequency","type","rolloff"]);return n._filters=[],n.Q=new Rt({context:n.context,units:"positive",value:r.Q}),n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency}),n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),n.gain=new Rt({context:n.context,units:"decibels",value:r.gain}),n._type=r.type,n.rolloff=r.rolloff,rt(n,["detune","frequency","gain","Q"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{Q:1,detune:0,frequency:350,gain:0,rolloff:-12,type:"lowpass"})},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){p(-1!==["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(t),"Invalid filter type: "+t),this._type=t,this._filters.forEach((function(e){return e.type=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rolloff",{get:function(){return this._rolloff},set:function(t){var e=w(t)?t:parseInt(t,10),n=[-12,-24,-48,-96],r=n.indexOf(e);p(-1!==r,"rolloff can only be "+n.join(", ")),r+=1,this._rolloff=e,this.input.disconnect(),this._filters.forEach((function(t){return t.disconnect()})),this._filters=new Array(r);for(var o=0;o<r;o++){var i=this.context.createBiquadFilter();i.type=this._type,this.frequency.connect(i.frequency),this.detune.connect(i.detune),this.Q.connect(i.Q),this.gain.connect(i.gain),this._filters[o]=i}this._internalChannels=this._filters,At.apply(void 0,f([this.input],this._internalChannels,[this.output]))},enumerable:!0,configurable:!0}),e.prototype.getFrequencyResponse=function(t){var e=this;void 0===t&&(t=128);for(var n=new Float32Array(t).map((function(){return 1})),r=new Float32Array(t),o=0;o<t;o++){var i=19980*Math.pow(o/t,2)+20;r[o]=i}var a=new Float32Array(t),s=new Float32Array(t);return this._filters.forEach((function(){var t=e.context.createBiquadFilter();t.type=e._type,t.Q.value=e.Q.value,t.frequency.value=e.frequency.value,t.gain.value=e.gain.value,t.getFrequencyResponse(r,a,s),a.forEach((function(t,e){n[e]*=t}))})),n},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._filters.forEach((function(t){t.disconnect()})),ot(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this},e}(Et)),Be=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["attack","decay","sustain","release"]))||this;n.name="FrequencyEnvelope";var r=V(e.getDefaults(),arguments,["attack","decay","sustain","release"]);return n._octaves=r.octaves,n._baseFrequency=n.toFrequency(r.baseFrequency),n._exponent=n.input=new De({context:n.context,value:r.exponent}),n._scale=n.output=new _e({context:n.context,min:n._baseFrequency,max:n._baseFrequency*Math.pow(2,n._octaves)}),n._sig.chain(n._exponent,n._scale),n}return i(e,t),e.getDefaults=function(){return Object.assign(Ie.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})},Object.defineProperty(e.prototype,"baseFrequency",{get:function(){return this._baseFrequency},set:function(t){var e=this.toFrequency(t);h(e,0),this._baseFrequency=e,this._scale.min=this._baseFrequency,this.octaves=this._octaves},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"octaves",{get:function(){return this._octaves},set:function(t){h(t,0),this._octaves=t,this._scale.max=this._baseFrequency*Math.pow(2,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exponent",{get:function(){return this._exponent.value},set:function(t){this._exponent.value=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._exponent.dispose(),this._scale.dispose(),this},e}(Ie),Ue=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="MonoSynth";var r=V(e.getDefaults(),arguments);return n.oscillator=new ge(Object.assign(r.oscillator,{context:n.context,detune:r.detune,onstop:function(){return n.onsilence(n)}})),n.frequency=n.oscillator.frequency,n.detune=n.oscillator.detune,n.filter=new ze(Object.assign(r.filter,{context:n.context})),n.filterEnvelope=new Be(Object.assign(r.filterEnvelope,{context:n.context})),n.envelope=new qe(Object.assign(r.envelope,{context:n.context})),n.oscillator.chain(n.filter,n.envelope,n.output),n.filterEnvelope.connect(n.filter.frequency),rt(n,["oscillator","frequency","detune","filter","filterEnvelope","envelope"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Fe.getDefaults(),{envelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(z(ze.getDefaults(),Object.keys(Et.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(z(Be.getDefaults(),Object.keys(Et.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(z(ge.getDefaults(),Object.keys(te.getDefaults())),{type:"sawtooth"})})},e.prototype._triggerEnvelopeAttack=function(t,e){if(void 0===e&&(e=1),this.envelope.triggerAttack(t,e),this.filterEnvelope.triggerAttack(t),this.oscillator.start(t),0===this.envelope.sustain){var n=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(t+n+r)}},e.prototype._triggerEnvelopeRelease=function(t){this.envelope.triggerRelease(t),this.filterEnvelope.triggerRelease(t),this.oscillator.stop(t+this.toSeconds(this.envelope.release))},e.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this},e}(Fe),We=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="DuoSynth";var r=V(e.getDefaults(),arguments);return n.voice0=new Ue(Object.assign(r.voice0,{context:n.context,onsilence:function(){return n.onsilence(n)}})),n.voice1=new Ue(Object.assign(r.voice1,{context:n.context})),n.harmonicity=new fe({context:n.context,units:"positive",value:r.harmonicity}),n._vibrato=new xe({frequency:r.vibratoRate,context:n.context,min:-50,max:50}),n._vibrato.start(),n.vibratoRate=n._vibrato.frequency,n._vibratoGain=new Dt({context:n.context,units:"normalRange",gain:r.vibratoAmount}),n.vibratoAmount=n._vibratoGain.gain,n.frequency=new Rt({context:n.context,units:"frequency",value:440}),n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),n.frequency.connect(n.voice0.frequency),n.frequency.chain(n.harmonicity,n.voice1.frequency),n._vibrato.connect(n._vibratoGain),n._vibratoGain.fan(n.voice0.detune,n.voice1.detune),n.detune.fan(n.voice0.detune,n.voice1.detune),n.voice0.connect(n.output),n.voice1.connect(n.output),rt(n,["voice0","voice1","frequency","vibratoAmount","vibratoRate"]),n}i(e,t),e.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.voice0.envelope.getValueAtTime(t)+this.voice1.envelope.getValueAtTime(t)},e.getDefaults=function(){return q(Fe.getDefaults(),{vibratoAmount:.5,vibratoRate:5,harmonicity:1.5,voice0:q(z(Ue.getDefaults(),Object.keys(Fe.getDefaults())),{filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}}),voice1:q(z(Ue.getDefaults(),Object.keys(Fe.getDefaults())),{filterEnvelope:{attack:.01,decay:0,sustain:1,release:.5},envelope:{attack:.01,decay:0,sustain:1,release:.5}})})},e.prototype._triggerEnvelopeAttack=function(t,e){this.voice0._triggerEnvelopeAttack(t,e),this.voice1._triggerEnvelopeAttack(t,e)},e.prototype._triggerEnvelopeRelease=function(t){return this.voice0._triggerEnvelopeRelease(t),this.voice1._triggerEnvelopeRelease(t),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.voice0.dispose(),this.voice1.dispose(),this.frequency.dispose(),this.detune.dispose(),this._vibrato.dispose(),this.vibratoRate.dispose(),this._vibratoGain.dispose(),this.harmonicity.dispose(),this}}(Fe),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="FMSynth";var r=V(e.getDefaults(),arguments);return n.modulationIndex=new fe({context:n.context,value:r.modulationIndex}),n.frequency.connect(n._carrier.frequency),n.frequency.chain(n.harmonicity,n._modulator.frequency),n.frequency.chain(n.modulationIndex,n._modulationNode),n.detune.fan(n._carrier.detune,n._modulator.detune),n._modulator.connect(n._modulationNode.gain),n._modulationNode.connect(n._carrier.frequency),n._carrier.connect(n.output),n}i(e,t),e.getDefaults=function(){return Object.assign(Le.getDefaults(),{modulationIndex:10})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.modulationIndex.dispose(),this}}(Le),[1,1.483,1.932,2.546,2.63,3.897]),$e=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="MetalSynth",n._oscillators=[],n._freqMultipliers=[];var r=V(e.getDefaults(),arguments);n.detune=new Rt({context:n.context,units:"cents",value:r.detune}),n.frequency=new Rt({context:n.context,units:"frequency"}),n._amplitude=new Dt({context:n.context,gain:0}).connect(n.output),n._highpass=new ze({Q:0,context:n.context,type:"highpass"}).connect(n._amplitude);for(var o=0;o<We.length;o++){var i=new he({context:n.context,harmonicity:r.harmonicity,modulationIndex:r.modulationIndex,modulationType:"square",onstop:0===o?function(){return n.onsilence(n)}:it,type:"square"});i.connect(n._highpass),n._oscillators[o]=i;var a=new fe({context:n.context,value:We[o]});n._freqMultipliers[o]=a,n.frequency.chain(a,i.frequency),n.detune.connect(i.detune)}return n._filterFreqScaler=new _e({context:n.context,max:7e3,min:n.toFrequency(r.resonance)}),n.envelope=new Ie({attack:r.envelope.attack,attackCurve:"linear",context:n.context,decay:r.envelope.decay,release:r.envelope.release,sustain:0}),n.envelope.chain(n._filterFreqScaler,n._highpass.frequency),n.envelope.connect(n._amplitude.gain),n._octaves=r.octaves,n.octaves=r.octaves,n}i(e,t),e.getDefaults=function(){return q(Fe.getDefaults(),{envelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{attack:.001,decay:1.4,release:.2}),harmonicity:5.1,modulationIndex:32,octaves:1.5,resonance:4e3})},e.prototype._triggerEnvelopeAttack=function(t,e){var n=this;return void 0===e&&(e=1),this.envelope.triggerAttack(t,e),this._oscillators.forEach((function(e){return e.start(t)})),0===this.envelope.sustain&&this._oscillators.forEach((function(e){e.stop(t+n.toSeconds(n.envelope.attack)+n.toSeconds(n.envelope.decay))})),this},e.prototype._triggerEnvelopeRelease=function(t){var e=this;return this.envelope.triggerRelease(t),this._oscillators.forEach((function(n){return n.stop(t+e.toSeconds(e.envelope.release))})),this},e.prototype.getLevelAtTime=function(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)},Object.defineProperty(e.prototype,"modulationIndex",{get:function(){return this._oscillators[0].modulationIndex.value},set:function(t){this._oscillators.forEach((function(e){return e.modulationIndex.value=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"harmonicity",{get:function(){return this._oscillators[0].harmonicity.value},set:function(t){this._oscillators.forEach((function(e){return e.harmonicity.value=t}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"resonance",{get:function(){return this._filterFreqScaler.min},set:function(t){this._filterFreqScaler.min=this.toFrequency(t),this.octaves=this._octaves},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._filterFreqScaler.max=this._filterFreqScaler.min*Math.pow(2,t)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._oscillators.forEach((function(t){return t.dispose()})),this._freqMultipliers.forEach((function(t){return t.dispose()})),this.frequency.dispose(),this.detune.dispose(),this._filterFreqScaler.dispose(),this._amplitude.dispose(),this.envelope.dispose(),this._highpass.dispose(),this}}(Fe),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="MembraneSynth",n.portamento=0;var r=V(e.getDefaults(),arguments);return n.pitchDecay=r.pitchDecay,n.octaves=r.octaves,rt(n,["oscillator","envelope"]),n}i(e,t),e.getDefaults=function(){return q(Fe.getDefaults(),Ve.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})},e.prototype.setNote=function(t,e){var n=this.toSeconds(e),r=this.toFrequency(t instanceof wt?t.toFrequency():t),o=r*this.octaves;return this.oscillator.frequency.setValueAtTime(o,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this},a([Oe(0)],e.prototype,"octaves",void 0),a([Se(0)],e.prototype,"pitchDecay",void 0)}(Ve),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="NoiseSynth";var r=V(e.getDefaults(),arguments);return n.noise=new ne(Object.assign({context:n.context},r.noise)),n.envelope=new qe(Object.assign({context:n.context},r.envelope)),n.noise.chain(n.envelope,n.output),n}i(e,t),e.getDefaults=function(){return Object.assign(Ne.getDefaults(),{envelope:Object.assign(z(Ie.getDefaults(),Object.keys(Et.getDefaults())),{decay:.1,sustain:0}),noise:Object.assign(z(ne.getDefaults(),Object.keys(te.getDefaults())),{type:"white"})})},e.prototype.triggerAttack=function(t,e){return void 0===e&&(e=1),t=this.toSeconds(t),this.envelope.triggerAttack(t,e),this.noise.start(t),0===this.envelope.sustain&&this.noise.stop(t+this.toSeconds(this.envelope.attack)+this.toSeconds(this.envelope.decay)),this},e.prototype.triggerRelease=function(t){return t=this.toSeconds(t),this.envelope.triggerRelease(t),this.noise.stop(t+this.toSeconds(this.envelope.release)),this},e.prototype.sync=function(){return this._syncMethod("triggerAttack",0),this._syncMethod("triggerRelease",0),this},e.prototype.triggerAttackRelease=function(t,e,n){return void 0===n&&(n=1),e=this.toSeconds(e),t=this.toSeconds(t),this.triggerAttack(e,n),this.triggerRelease(e+t),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.noise.dispose(),this.envelope.dispose(),this}}(Ne),function(t){function e(e){var n=t.call(this,e)||this;n.name="ToneAudioWorklet",n.workletOptions={},n.onprocessorerror=it;var r=URL.createObjectURL(new Blob([n._audioWorklet()],{type:"text/javascript"})),o=n._audioWorkletName();return n.context.addAudioWorkletModule(r,o).then((function(){n.disposed||(n._worklet=n.context.createAudioWorkletNode(o,n.workletOptions),n._worklet.onprocessorerror=n.onprocessorerror.bind(n),n.onReady(n._worklet))})),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._worklet&&this._worklet.disconnect(),this},e}(Et)),He=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["delayTime","resonance"]))||this;n.name="FeedbackCombFilter",n.workletOptions={numberOfInputs:1,numberOfOutputs:1,channelCount:1};var r=V(e.getDefaults(),arguments,["delayTime","resonance"]);n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context});var o=n.context.createGain();return n.delayTime=new Ct({context:n.context,value:r.delayTime,units:"time",minValue:0,maxValue:1,param:o.gain,swappable:!0}),n.resonance=new Ct({context:n.context,value:r.resonance,units:"normalRange",param:o.gain,swappable:!0}),rt(n,["resonance","delayTime"]),n}return i(e,t),e.prototype._audioWorkletName=function(){return"feedback-comb-filter"},e.prototype._audioWorklet=function(){return' \n\t\t\tregisterProcessor("'+this._audioWorkletName()+'", class extends AudioWorkletProcessor {\n\t\t\t\tstatic get parameterDescriptors() {\n\t\t\t\t\treturn [{\n\t\t\t\t\t\tname: "delayTime",\n\t\t\t\t\t\tdefaultValue: 0.1,\n\t\t\t\t\t\tminValue: 0,\n\t\t\t\t\t\tmaxValue: 1,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: "feedback",\n\t\t\t\t\t\tdefaultValue: 0.5,\n\t\t\t\t\t\tminValue: 0,\n\t\t\t\t\t\tmaxValue: 0.9999,\n\t\t\t\t\t}];\n\t\t\t\t}\n\t\t\t\n\t\t\t\tconstructor(options) {\n\t\t\t\t\tsuper(options);\n\t\t\t\t\tthis.delayBuffer = new Float32Array(sampleRate);\n\t\t\t\t}\n\t\t\t\n\t\t\t\tgetParameter(parameter, index) {\n\t\t\t\t\tif (parameter.length > 1) {\n\t\t\t\t\t\treturn parameter[index];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn parameter[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tprocess(inputs, outputs, parameters) {\n\t\t\t\t\tconst input = inputs[0];\n\t\t\t\t\tconst output = outputs[0];\n\t\t\t\t\tconst delayLength = this.delayBuffer.length;\n\t\t\t\t\tconst inputChannel = input[0];\n\t\t\t\t\tconst outputChannel = output[0];\n\t\t\t\t\tconst delayTimeParam = parameters.delayTime;\n\t\t\t\t\tconst feedbackParam = parameters.feedback;\n\t\t\t\t\tinputChannel.forEach((value, index) => {\n\t\t\t\t\t\tconst delayTime = this.getParameter(delayTimeParam, index);\n\t\t\t\t\t\tconst feedback = this.getParameter(feedbackParam, index);\n\t\t\t\t\t\tconst delaySamples = Math.floor(delayTime * sampleRate);\n\t\t\t\t\t\tconst currentIndex = (currentFrame + index) % delayLength;\n\t\t\t\t\t\tconst delayedIndex = (currentFrame + index + delaySamples) % delayLength;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// the current value to output\n\t\t\t\t\t\tconst currentValue = this.delayBuffer[currentIndex];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// write the current value to the delayBuffer in the future\n\t\t\t\t\t\tthis.delayBuffer[delayedIndex] = value + currentValue * feedback;\n\n\t\t\t\t\t\t// set all of the output channels to the same value\n\t\t\t\t\t\toutputChannel[index] = delaySamples > 0 ? currentValue : value;\n\t\t\t\t\t});\n\t\t\t\t\t// keep the processing alive\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t'},e.getDefaults=function(){return Object.assign(Et.getDefaults(),{delayTime:.1,resonance:.5})},e.prototype.onReady=function(t){At(this.input,t,this.output);var e=t.parameters.get("delayTime");this.delayTime.setParam(e);var n=t.parameters.get("feedback");this.resonance.setParam(n)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this.output.dispose(),this.delayTime.dispose(),this.resonance.dispose(),this},e}($e),Ge=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","type"]))||this;n.name="OnePoleFilter";var r=V(e.getDefaults(),arguments,["frequency","type"]);return n._frequency=r.frequency,n._type=r.type,n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context}),n._createFilter(),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{frequency:880,type:"lowpass"})},e.prototype._createFilter=function(){var t=this,e=this._filter,n=this.toFrequency(this._frequency),r=1/(2*Math.PI*n);if("lowpass"===this._type){var o=1/(r*this.context.sampleRate),i=o-1;this._filter=this.context.createIIRFilter([o,0],[1,i])}else{i=1/(r*this.context.sampleRate)-1;this._filter=this.context.createIIRFilter([1,-1],[1,i])}this.input.chain(this._filter,this.output),e&&this.context.setTimeout((function(){t.disposed||(t.input.disconnect(e),e.disconnect())}),this.blockTime)},Object.defineProperty(e.prototype,"frequency",{get:function(){return this._frequency},set:function(t){this._frequency=t,this._createFilter()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t,this._createFilter()},enumerable:!0,configurable:!0}),e.prototype.getFrequencyResponse=function(t){void 0===t&&(t=128);for(var e=new Float32Array(t),n=0;n<t;n++){var r=19980*Math.pow(n/t,2)+20;e[n]=r}var o=new Float32Array(t),i=new Float32Array(t);return this._filter.getFrequencyResponse(e,o,i),o},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this.output.dispose(),this._filter.disconnect(),this},e}(Et),Ke=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["delayTime","resonance","dampening"]))||this;n.name="LowpassCombFilter";var r=V(e.getDefaults(),arguments,["delayTime","resonance","dampening"]);return n._combFilter=n.output=new He({context:n.context,delayTime:r.delayTime,resonance:r.resonance}),n.delayTime=n._combFilter.delayTime,n.resonance=n._combFilter.resonance,n._lowpass=n.input=new Ge({context:n.context,frequency:r.dampening,type:"lowpass"}),n._lowpass.connect(n._combFilter),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{dampening:3e3,delayTime:.1,resonance:.5})},Object.defineProperty(e.prototype,"dampening",{get:function(){return this._lowpass.frequency},set:function(t){this._lowpass.frequency=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._combFilter.dispose(),this._lowpass.dispose(),this},e}(Et),Qe=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="PluckSynth";var r=V(e.getDefaults(),arguments);return n._noise=new ne({context:n.context,type:"pink"}),n.attackNoise=r.attackNoise,n._lfcf=new Ke({context:n.context,dampening:r.dampening,resonance:r.resonance}),n.resonance=r.resonance,n.release=r.release,n._noise.connect(n._lfcf),n._lfcf.connect(n.output),n}i(e,t),e.getDefaults=function(){return q(Ne.getDefaults(),{attackNoise:1,dampening:4e3,resonance:.7,release:1})},Object.defineProperty(e.prototype,"dampening",{get:function(){return this._lfcf.dampening},set:function(t){this._lfcf.dampening=t},enumerable:!0,configurable:!0}),e.prototype.triggerAttack=function(t,e){var n=this.toFrequency(t);e=this.toSeconds(e);var r=1/n;return this._lfcf.delayTime.setValueAtTime(r,e),this._noise.start(e),this._noise.stop(e+r*this.attackNoise),this._lfcf.resonance.cancelScheduledValues(e),this._lfcf.resonance.setValueAtTime(this.resonance,e),this},e.prototype.triggerRelease=function(t){return this._lfcf.resonance.linearRampTo(0,this.release,t),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._noise.dispose(),this._lfcf.dispose(),this}}(Ne),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["voice","options"]))||this;n.name="PolySynth",n._availableVoices=[],n._activeVoices=[],n._voices=[],n._gcTimeout=-1,n._averageActiveVoices=0;var r=V(e.getDefaults(),arguments,["voice","options"]);p(!w(r.voice),"DEPRECATED: The polyphony count is no longer the first argument.");var o=r.voice.getDefaults();n.options=Object.assign(o,r.options),n.voice=r.voice,n.maxPolyphony=r.maxPolyphony,n._dummyVoice=n._getNextAvailableVoice();var i=n._voices.indexOf(n._dummyVoice);return n._voices.splice(i,1),n._gcTimeout=n.context.setInterval(n._collectGarbage.bind(n),1),n}i(e,t),e.getDefaults=function(){return Object.assign(Ne.getDefaults(),{maxPolyphony:32,options:{},voice:Ve})},Object.defineProperty(e.prototype,"activeVoices",{get:function(){return this._activeVoices.length},enumerable:!0,configurable:!0}),e.prototype._makeVoiceAvailable=function(t){this._availableVoices.push(t);var e=this._activeVoices.findIndex((function(e){return e.voice===t}));this._activeVoices.splice(e,1)},e.prototype._getNextAvailableVoice=function(){if(this._availableVoices.length)return this._availableVoices.shift();if(this._voices.length<this.maxPolyphony){var t=new this.voice(Object.assign(this.options,{context:this.context,onsilence:this._makeVoiceAvailable.bind(this)}));return t.connect(this.output),this._voices.push(t),t}m("Max polyphony exceeded. Note dropped.")},e.prototype._collectGarbage=function(){if(this._averageActiveVoices=Math.max(.95*this._averageActiveVoices,this.activeVoices),this._availableVoices.length&&this._voices.length>Math.ceil(this._averageActiveVoices+1)){var t=this._availableVoices.shift(),e=this._voices.indexOf(t);this._voices.splice(e,1),this.context.isOffline||t.dispose()}},e.prototype._triggerAttack=function(t,e,n){var r=this;t.forEach((function(t){var o=new Jt(r.context,t).toMidi(),i=r._getNextAvailableVoice();i&&(i.triggerAttack(t,e,n),r._activeVoices.push({midi:o,voice:i,released:!1}),r.log("triggerAttack",t,e))}))},e.prototype._triggerRelease=function(t,e){var n=this;t.forEach((function(t){var r=new Jt(n.context,t).toMidi(),o=n._activeVoices.find((function(t){var e=t.midi,n=t.released;return e===r&&!n}));o&&(o.voice.triggerRelease(e),o.released=!0,n.log("triggerRelease",t,e))}))},e.prototype._scheduleEvent=function(t,e,n,r){var o=this;p(!this.disposed,"Synth was already disposed"),n<=this.now()?"attack"===t?this._triggerAttack(e,n,r):this._triggerRelease(e,n):this.context.setTimeout((function(){o._scheduleEvent(t,e,n,r)}),n-this.now())},e.prototype.triggerAttack=function(t,e,n){Array.isArray(t)||(t=[t]);var r=this.toSeconds(e);return this._scheduleEvent("attack",t,r,n),this},e.prototype.triggerRelease=function(t,e){Array.isArray(t)||(t=[t]);var n=this.toSeconds(e);return this._scheduleEvent("release",t,n),this},e.prototype.triggerAttackRelease=function(t,e,n,r){var o=this.toSeconds(n);if(this.triggerAttack(t,o,r),S(e)){p(S(t),"If the duration is an array, the notes must also be an array"),t=t;for(var i=0;i<t.length;i++){var a=e[Math.min(i,e.length-1)];p((s=this.toSeconds(a))>0,"The duration must be greater than 0"),this.triggerRelease(t[i],o+s)}}else{var s;p((s=this.toSeconds(e))>0,"The duration must be greater than 0"),this.triggerRelease(t,o+s)}return this},e.prototype.sync=function(){return this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1),this},e.prototype.set=function(t){var e=z(t,["onsilence","context"]);return this.options=q(this.options,e),this._voices.forEach((function(t){return t.set(e)})),this._dummyVoice.set(e),this},e.prototype.get=function(){return this._dummyVoice.get()},e.prototype.releaseAll=function(){var t=this.now();return this._activeVoices.forEach((function(e){e.voice.triggerRelease(t)})),this._activeVoices=[],this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._dummyVoice.dispose(),this._voices.forEach((function(t){return t.dispose()})),this._activeVoices=[],this._availableVoices=[],this.context.clearInterval(this._gcTimeout),this}}(Ne),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"))||this;n.name="Sampler",n._activeSources=new Map;var r=V(e.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),o={};return Object.keys(r.urls).forEach((function(t){var e=parseInt(t,10);if(p(T(t)||w(e)&&isFinite(e),"url key is neither a note or midi pitch: "+t),T(t)){var i=new wt(n.context,t).toMidi();o[i]=r.urls[t]}else w(e)&&isFinite(e)&&(o[e]=r.urls[e])})),n._buffers=new Xt({urls:o,onload:r.onload,baseUrl:r.baseUrl,onerror:r.onerror}),n.attack=r.attack,n.release=r.release,n.curve=r.curve,n._buffers.loaded&&Promise.resolve().then(r.onload),n}i(e,t),e.getDefaults=function(){return Object.assign(Ne.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:it,onerror:it,release:.1,urls:{}})},e.prototype._findClosest=function(t){for(var e=0;e<96;){if(this._buffers.has(t+e))return-e;if(this._buffers.has(t-e))return e;e++}throw new Error("No available buffers for note: "+t)},e.prototype.triggerAttack=function(t,e,n){var r=this;return void 0===n&&(n=1),this.log("triggerAttack",t,e,n),Array.isArray(t)||(t=[t]),t.forEach((function(t){var o=new wt(r.context,t).toMidi(),i=r._findClosest(o),a=o-i,s=r._buffers.get(a),u=vt(i),c=new ee({url:s,context:r.context,curve:r.curve,fadeIn:r.attack,fadeOut:r.release,playbackRate:u}).connect(r.output);c.start(e,0,s.duration/u,n),S(r._activeSources.get(o))||r._activeSources.set(o,[]),r._activeSources.get(o).push(c),c.onended=function(){if(r._activeSources&&r._activeSources.has(o)){var t=r._activeSources.get(o),e=t.indexOf(c);-1!==e&&t.splice(e,1)}}})),this},e.prototype.triggerRelease=function(t,e){var n=this;return this.log("triggerRelease",t,e),Array.isArray(t)||(t=[t]),t.forEach((function(t){var r=new wt(n.context,t).toMidi();if(n._activeSources.has(r)&&n._activeSources.get(r).length){var o=n._activeSources.get(r);e=n.toSeconds(e),o.forEach((function(t){t.stop(e)})),n._activeSources.set(r,[])}})),this},e.prototype.releaseAll=function(t){var e=this.toSeconds(t);return this._activeSources.forEach((function(t){for(;t.length;){t.shift().stop(e)}})),this},e.prototype.sync=function(){return this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1),this},e.prototype.triggerAttackRelease=function(t,e,n,r){var o=this;void 0===r&&(r=1);var i=this.toSeconds(n);return this.triggerAttack(t,i,r),S(e)?(p(S(t),"notes must be an array when duration is array"),t.forEach((function(t,n){var r=e[Math.min(n,e.length-1)];o.triggerRelease(t,i+o.toSeconds(r))}))):this.triggerRelease(t,i+this.toSeconds(e)),this},e.prototype.add=function(t,e,n){if(p(T(t)||isFinite(t),"note must be a pitch or midi: "+t),T(t)){var r=new wt(this.context,t).toMidi();this._buffers.add(r,e,n)}else this._buffers.add(t,e,n);return this},Object.defineProperty(e.prototype,"loaded",{get:function(){return this._buffers.loaded},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffers.dispose(),this._activeSources.forEach((function(t){t.forEach((function(t){return t.dispose()}))})),this._activeSources.clear(),this},a([Se(0)],e.prototype,"attack",void 0),a([Se(0)],e.prototype,"release",void 0)}(Ne),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","value"]))||this;n.name="ToneEvent",n._state=new Tt("stopped"),n._startOffset=0;var r=V(e.getDefaults(),arguments,["callback","value"]);return n._loop=r.loop,n.callback=r.callback,n.value=r.value,n._loopStart=n.toTicks(r.loopStart),n._loopEnd=n.toTicks(r.loopEnd),n._playbackRate=r.playbackRate,n._probability=r.probability,n._humanize=r.humanize,n.mute=r.mute,n._playbackRate=r.playbackRate,n._state.increasing=!0,n._rescheduleEvents(),n}return i(e,t),e.getDefaults=function(){return Object.assign(kt.getDefaults(),{callback:it,humanize:!1,loop:!1,loopEnd:"1m",loopStart:0,mute:!1,playbackRate:1,probability:1,value:null})},e.prototype._rescheduleEvents=function(t){var e=this;void 0===t&&(t=-1),this._state.forEachFrom(t,(function(t){var n;if("started"===t.state){-1!==t.id&&e.context.transport.clear(t.id);var r=t.time+Math.round(e.startOffset/e._playbackRate);if(!0===e._loop||w(e._loop)&&e._loop>1){n=1/0,w(e._loop)&&(n=e._loop*e._getLoopDuration());var o=e._state.getAfter(r);null!==o&&(n=Math.min(n,o.time-r)),n!==1/0&&(e._state.setStateAtTime("stopped",r+n+1,{id:-1}),n=new Bt(e.context,n));var i=new Bt(e.context,e._getLoopDuration());t.id=e.context.transport.scheduleRepeat(e._tick.bind(e),i,new Bt(e.context,r),n)}else t.id=e.context.transport.schedule(e._tick.bind(e),new Bt(e.context,r))}}))},Object.defineProperty(e.prototype,"state",{get:function(){return this._state.getValueAtTime(this.context.transport.ticks)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._startOffset},set:function(t){this._startOffset=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"probability",{get:function(){return this._probability},set:function(t){this._probability=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"humanize",{get:function(){return this._humanize},set:function(t){this._humanize=t},enumerable:!0,configurable:!0}),e.prototype.start=function(t){var e=this.toTicks(t);return"stopped"===this._state.getValueAtTime(e)&&(this._state.add({id:-1,state:"started",time:e}),this._rescheduleEvents(e)),this},e.prototype.stop=function(t){this.cancel(t);var e=this.toTicks(t);if("started"===this._state.getValueAtTime(e)){this._state.setStateAtTime("stopped",e,{id:-1});var n=this._state.getBefore(e),r=e;null!==n&&(r=n.time),this._rescheduleEvents(r)}return this},e.prototype.cancel=function(t){var e=this;t=L(t,-1/0);var n=this.toTicks(t);return this._state.forEachFrom(n,(function(t){e.context.transport.clear(t.id)})),this._state.cancel(n),this},e.prototype._tick=function(t){var e=this.context.transport.getTicksAtTime(t);if(!this.mute&&"started"===this._state.getValueAtTime(e)){if(this.probability<1&&Math.random()>this.probability)return;if(this.humanize){var n=.02;O(this.humanize)||(n=this.toSeconds(this.humanize)),t+=(2*Math.random()-1)*n}this.callback(t,this.value)}},e.prototype._getLoopDuration=function(){return Math.round((this._loopEnd-this._loopStart)/this._playbackRate)},Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(t){this._loop=t,this._rescheduleEvents()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._rescheduleEvents()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return new Bt(this.context,this._loopEnd).toSeconds()},set:function(t){this._loopEnd=this.toTicks(t),this._loop&&this._rescheduleEvents()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopStart",{get:function(){return new Bt(this.context,this._loopStart).toSeconds()},set:function(t){this._loopStart=this.toTicks(t),this._loop&&this._rescheduleEvents()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progress",{get:function(){if(this._loop){var t=this.context.transport.ticks,e=this._state.get(t);if(null!==e&&"started"===e.state){var n=this._getLoopDuration();return(t-e.time)%n/n}return 0}return 0},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.cancel(),this._state.dispose(),this},e}(kt)),Ye=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","interval"]))||this;n.name="Loop";var r=V(e.getDefaults(),arguments,["callback","interval"]);return n._event=new Qe({context:n.context,callback:n._tick.bind(n),loop:!0,loopEnd:r.interval,playbackRate:r.playbackRate,probability:r.probability}),n.callback=r.callback,n.iterations=r.iterations,n}return i(e,t),e.getDefaults=function(){return Object.assign(kt.getDefaults(),{interval:"4n",callback:it,playbackRate:1,iterations:1/0,probability:1,mute:!1,humanize:!1})},e.prototype.start=function(t){return this._event.start(t),this},e.prototype.stop=function(t){return this._event.stop(t),this},e.prototype.cancel=function(t){return this._event.cancel(t),this},e.prototype._tick=function(t){this.callback(t)},Object.defineProperty(e.prototype,"state",{get:function(){return this._event.state},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progress",{get:function(){return this._event.progress},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interval",{get:function(){return this._event.loopEnd},set:function(t){this._event.loopEnd=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._event.playbackRate},set:function(t){this._event.playbackRate=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"humanize",{get:function(){return this._event.humanize},set:function(t){this._event.humanize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"probability",{get:function(){return this._event.probability},set:function(t){this._event.probability=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mute",{get:function(){return this._event.mute},set:function(t){this._event.mute=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"iterations",{get:function(){return!0===this._event.loop?1/0:this._event.loop},set:function(t){this._event.loop=t===1/0||t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._event.dispose(),this},e}(kt),Xe=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","events"]))||this;n.name="Part",n._state=new Tt("stopped"),n._events=new Set;var r=V(e.getDefaults(),arguments,["callback","events"]);return n._state.increasing=!0,r.events.forEach((function(t){S(t)?n.add(t[0],t[1]):n.add(t)})),n}return i(e,t),e.getDefaults=function(){return Object.assign(Qe.getDefaults(),{events:[]})},e.prototype.start=function(t,e){var n=this,r=this.toTicks(t);if("started"!==this._state.getValueAtTime(r)){e=L(e,this._loop?this._loopStart:0),e=this._loop?L(e,this._loopStart):L(e,0);var o=this.toTicks(e);this._state.add({id:-1,offset:o,state:"started",time:r}),this._forEach((function(t){n._startNote(t,r,o)}))}return this},e.prototype._startNote=function(t,e,n){e-=n,this._loop?t.startOffset>=this._loopStart&&t.startOffset<this._loopEnd?(t.startOffset<n&&(e+=this._getLoopDuration()),t.start(new Bt(this.context,e))):t.startOffset<this._loopStart&&t.startOffset>=n&&(t.loop=!1,t.start(new Bt(this.context,e))):t.startOffset>=n&&t.start(new Bt(this.context,e))},Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._startOffset},set:function(t){var e=this;this._startOffset=t,this._forEach((function(t){t.startOffset+=e._startOffset}))},enumerable:!0,configurable:!0}),e.prototype.stop=function(t){var e=this.toTicks(t);return this._state.cancel(e),this._state.setStateAtTime("stopped",e),this._forEach((function(e){e.stop(t)})),this},e.prototype.at=function(t,e){for(var n=new St(this.context,t).toTicks(),r=new Bt(this.context,1).toSeconds(),o=this._events.values(),i=o.next();!i.done;){var a=i.value;if(Math.abs(n-a.startOffset)<r)return b(e)&&(a.value=e),a;i=o.next()}return b(e)?(this.add(t,e),this.at(t)):null},e.prototype.add=function(t,e){t instanceof Object&&Reflect.has(t,"time")&&(t=(e=t).time);var n,r=this.toTicks(t);return e instanceof Qe?(n=e).callback=this._tick.bind(this):n=new Qe({callback:this._tick.bind(this),context:this.context,value:e}),n.startOffset=r,n.set({humanize:this.humanize,loop:this.loop,loopEnd:this.loopEnd,loopStart:this.loopStart,playbackRate:this.playbackRate,probability:this.probability}),this._events.add(n),this._restartEvent(n),this},e.prototype._restartEvent=function(t){var e=this;this._state.forEach((function(n){"started"===n.state?e._startNote(t,n.time,n.offset):t.stop(new Bt(e.context,n.time))}))},e.prototype.remove=function(t,e){var n=this;return x(t)&&t.hasOwnProperty("time")&&(t=(e=t).time),t=this.toTicks(t),this._events.forEach((function(r){r.startOffset===t&&(g(e)||b(e)&&r.value===e)&&(n._events.delete(r),r.dispose())})),this},e.prototype.clear=function(){return this._forEach((function(t){return t.dispose()})),this._events.clear(),this},e.prototype.cancel=function(t){return this._forEach((function(e){return e.cancel(t)})),this._state.cancel(this.toTicks(t)),this},e.prototype._forEach=function(t){return this._events&&this._events.forEach((function(n){n instanceof e?n._forEach(t):t(n)})),this},e.prototype._setAll=function(t,e){this._forEach((function(n){n[t]=e}))},e.prototype._tick=function(t,e){this.mute||this.callback(t,e)},e.prototype._testLoopBoundries=function(t){this._loop&&(t.startOffset<this._loopStart||t.startOffset>=this._loopEnd)?t.cancel(0):"stopped"===t.state&&this._restartEvent(t)},Object.defineProperty(e.prototype,"probability",{get:function(){return this._probability},set:function(t){this._probability=t,this._setAll("probability",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"humanize",{get:function(){return this._humanize},set:function(t){this._humanize=t,this._setAll("humanize",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loop",{get:function(){return this._loop},set:function(t){var e=this;this._loop=t,this._forEach((function(n){n.loopStart=e.loopStart,n.loopEnd=e.loopEnd,n.loop=t,e._testLoopBoundries(n)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return new Bt(this.context,this._loopEnd).toSeconds()},set:function(t){var e=this;this._loopEnd=this.toTicks(t),this._loop&&this._forEach((function(n){n.loopEnd=t,e._testLoopBoundries(n)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopStart",{get:function(){return new Bt(this.context,this._loopStart).toSeconds()},set:function(t){var e=this;this._loopStart=this.toTicks(t),this._loop&&this._forEach((function(t){t.loopStart=e.loopStart,e._testLoopBoundries(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){this._playbackRate=t,this._setAll("playbackRate",t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._events.size},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.clear(),this},e}(Qe);function Je(t){var e;return u(this,(function(n){switch(n.label){case 0:e=0,n.label=1;case 1:return e<t.length?(e=en(e,t),[4,t[e]]):[3,3];case 2:return n.sent(),e++,[3,1];case 3:return[2]}}))}function Ze(t){var e;return u(this,(function(n){switch(n.label){case 0:e=t.length-1,n.label=1;case 1:return e>=0?(e=en(e,t),[4,t[e]]):[3,3];case 2:return n.sent(),e--,[3,1];case 3:return[2]}}))}function tn(t,e){return u(this,(function(n){switch(n.label){case 0:return[5,c(e(t))];case 1:return n.sent(),[3,0];case 2:return[2]}}))}function en(t,e){return G(t,0,e.length-1)}function nn(t,e){var n;return u(this,(function(r){switch(r.label){case 0:n=e?0:t.length-1,r.label=1;case 1:return n=en(n,t),[4,t[n]];case 2:return r.sent(),e?++n>=t.length-1&&(e=!1):--n<=0&&(e=!0),[3,1];case 3:return[2]}}))}function rn(t){var e,n;return u(this,(function(r){switch(r.label){case 0:e=0,n=0,r.label=1;case 1:return e<t.length?(e=en(e,t),[4,t[e]]):[3,3];case 2:return r.sent(),n++,e+=n%2?2:-1,[3,1];case 3:return[2]}}))}function on(t){var e,n;return u(this,(function(r){switch(r.label){case 0:e=t.length-1,n=0,r.label=1;case 1:return e>=0?(e=en(e,t),[4,t[e]]):[3,3];case 2:return r.sent(),n++,e+=n%2?-2:1,[3,1];case 3:return[2]}}))}function an(t){var e;return u(this,(function(n){switch(n.label){case 0:return e=Math.floor(Math.random()*t.length),[4,t[e]];case 1:return n.sent(),[3,0];case 2:return[2]}}))}function sn(t){var e,n,r,o;return u(this,(function(i){switch(i.label){case 0:for(e=[],n=0;n<t.length;n++)e.push(n);i.label=1;case 1:return e.length>0?(r=e.splice(Math.floor(e.length*Math.random()),1),o=en(r[0],t),[4,t[o]]):[3,3];case 2:return i.sent(),[3,1];case 3:return[2]}}))}function un(t,e,n){return void 0===e&&(e="up"),void 0===n&&(n=0),u(this,(function(n){switch(n.label){case 0:switch(p(t.length>0,"The array must have more than one value in it"),e){case"up":return[3,1];case"down":return[3,3];case"upDown":return[3,5];case"downUp":return[3,7];case"alternateUp":return[3,9];case"alternateDown":return[3,11];case"random":return[3,13];case"randomOnce":return[3,15]}return[3,17];case 1:return[5,c(tn(t,Je))];case 2:n.sent(),n.label=3;case 3:return[5,c(tn(t,Ze))];case 4:n.sent(),n.label=5;case 5:return[5,c(nn(t,!0))];case 6:n.sent(),n.label=7;case 7:return[5,c(nn(t,!1))];case 8:n.sent(),n.label=9;case 9:return[5,c(tn(t,rn))];case 10:n.sent(),n.label=11;case 11:return[5,c(tn(t,on))];case 12:n.sent(),n.label=13;case 13:return[5,c(an(t))];case 14:n.sent(),n.label=15;case 15:return[5,c(tn(t,sn))];case 16:n.sent(),n.label=17;case 17:return[2]}}))}(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","values","pattern"]))||this;n.name="Pattern";var r=V(e.getDefaults(),arguments,["callback","values","pattern"]);return n.callback=r.callback,n._values=r.values,n._pattern=un(r.values,r.pattern),n._type=r.pattern,n}i(e,t),e.getDefaults=function(){return Object.assign(Ye.getDefaults(),{pattern:"up",values:[],callback:it})},e.prototype._tick=function(t){var e=this._pattern.next();this._value=e.value,this.callback(t,this._value)},Object.defineProperty(e.prototype,"values",{get:function(){return this._values},set:function(t){this._values=t,this.pattern=this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pattern",{get:function(){return this._type},set:function(t){this._type=t,this._pattern=un(this._values,this._type)},enumerable:!0,configurable:!0})})(Ye),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["callback","events","subdivision"]))||this;n.name="Sequence",n._part=new Xe({callback:n._seqCallback.bind(n),context:n.context}),n._events=[],n._eventsArray=[];var r=V(e.getDefaults(),arguments,["callback","events","subdivision"]);return n._subdivision=n.toTicks(r.subdivision),n.events=r.events,n.loop=r.loop,n.loopStart=r.loopStart,n.loopEnd=r.loopEnd,n.playbackRate=r.playbackRate,n.probability=r.probability,n.humanize=r.humanize,n.mute=r.mute,n.playbackRate=r.playbackRate,n}i(e,t),e.getDefaults=function(){return Object.assign(z(Qe.getDefaults(),["value"]),{events:[],loop:!0,loopEnd:0,loopStart:0,subdivision:"8n"})},e.prototype._seqCallback=function(t,e){null!==e&&this.callback(t,e)},Object.defineProperty(e.prototype,"events",{get:function(){return this._events},set:function(t){this.clear(),this._eventsArray=t,this._events=this._createSequence(this._eventsArray),this._eventsUpdated()},enumerable:!0,configurable:!0}),e.prototype.start=function(t,e){return this._part.start(t,e?this._indexTime(e):e),this},e.prototype.stop=function(t){return this._part.stop(t),this},Object.defineProperty(e.prototype,"subdivision",{get:function(){return new Bt(this.context,this._subdivision).toSeconds()},enumerable:!0,configurable:!0}),e.prototype._createSequence=function(t){var e=this;return new Proxy(t,{get:function(t,e){return t[e]},set:function(t,n,r){return k(n)&&isFinite(parseInt(n,10))&&S(r)?t[n]=e._createSequence(r):t[n]=r,e._eventsUpdated(),!0}})},e.prototype._eventsUpdated=function(){this._part.clear(),this._rescheduleSequence(this._eventsArray,this._subdivision,this.startOffset),this.loopEnd=this.loopEnd},e.prototype._rescheduleSequence=function(t,e,n){var r=this;t.forEach((function(t,o){var i=o*e+n;if(S(t))r._rescheduleSequence(t,e/t.length,i);else{var a=new Bt(r.context,i,"i").toSeconds();r._part.add(a,t)}}))},e.prototype._indexTime=function(t){return new Bt(this.context,t*this._subdivision+this.startOffset).toSeconds()},e.prototype.clear=function(){return this._part.clear(),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._part.dispose(),this},Object.defineProperty(e.prototype,"loop",{get:function(){return this._part.loop},set:function(t){this._part.loop=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopStart",{get:function(){return this._loopStart},set:function(t){this._loopStart=t,this._part.loopStart=this._indexTime(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loopEnd",{get:function(){return this._loopEnd},set:function(t){this._loopEnd=t,this._part.loopEnd=0===t?this._indexTime(this._eventsArray.length):this._indexTime(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._part.startOffset},set:function(t){this._part.startOffset=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{get:function(){return this._part.playbackRate},set:function(t){this._part.playbackRate=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"probability",{get:function(){return this._part.probability},set:function(t){this._part.probability=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"progress",{get:function(){return this._part.progress},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"humanize",{get:function(){return this._part.humanize},set:function(t){this._part.humanize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._part.length},enumerable:!0,configurable:!0})}(Qe);var cn=function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["fade"])))||this;n.name="CrossFade",n._panner=n.context.createStereoPanner(),n._split=n.context.createChannelSplitter(2),n._g2a=new Ce({context:n.context}),n.a=new Dt({context:n.context,gain:0}),n.b=new Dt({context:n.context,gain:0}),n.output=new Dt({context:n.context}),n._internalChannels=[n.a,n.b];var r=V(e.getDefaults(),arguments,["fade"]);return n.fade=new Rt({context:n.context,units:"normalRange",value:r.fade}),rt(n,"fade"),n.context.getConstant(1).connect(n._panner),n._panner.connect(n._split),n._panner.channelCount=1,n._panner.channelCountMode="explicit",jt(n._split,n.a.gain,0),jt(n._split,n.b.gain,1),n.fade.chain(n._g2a,n._panner.pan),n.a.connect(n.output),n.b.connect(n.output),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{fade:.5})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this},e}(Et),ln=function(t){function e(e){var n=t.call(this,e)||this;return n.name="Effect",n._dryWet=new cn({context:n.context}),n.wet=n._dryWet.fade,n.effectSend=new Dt({context:n.context}),n.effectReturn=new Dt({context:n.context}),n.input=new Dt({context:n.context}),n.output=n._dryWet,n.input.fan(n._dryWet.a,n.effectSend),n.effectReturn.connect(n._dryWet.b),n.wet.setValueAtTime(e.wet,0),n._internalChannels=[n.effectReturn,n.effectSend],rt(n,"wet"),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{wet:1})},e.prototype.connectEffect=function(t){return this._internalChannels.push(t),this.effectSend.chain(t,this.effectReturn),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this},e}(Et),fn=function(t){function e(e){var n=t.call(this,e)||this;return n.name="LFOEffect",n._lfo=new xe({context:n.context,frequency:e.frequency,amplitude:e.depth}),n.depth=n._lfo.amplitude,n.frequency=n._lfo.frequency,n.type=e.type,rt(n,["frequency","depth"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{frequency:1,type:"sine",depth:1})},e.prototype.start=function(t){return this._lfo.start(t),this},e.prototype.stop=function(t){return this._lfo.stop(t),this},e.prototype.sync=function(){return this._lfo.sync(),this},e.prototype.unsync=function(){return this._lfo.unsync(),this},Object.defineProperty(e.prototype,"type",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._lfo.dispose(),this.frequency.dispose(),this.depth.dispose(),this},e}(ln),pn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","baseFrequency","octaves"]))||this;n.name="AutoFilter";var r=V(e.getDefaults(),arguments,["frequency","baseFrequency","octaves"]);return n.filter=new ze(Object.assign(r.filter,{context:n.context})),n.connectEffect(n.filter),n._lfo.connect(n.filter.frequency),n.octaves=r.octaves,n.baseFrequency=r.baseFrequency,n}i(e,t),e.getDefaults=function(){return Object.assign(fn.getDefaults(),{baseFrequency:200,octaves:2.6,filter:{type:"lowpass",rolloff:-12,Q:1}})},Object.defineProperty(e.prototype,"baseFrequency",{get:function(){return this._lfo.min},set:function(t){this._lfo.min=this.toFrequency(t),this.octaves=this._octaves},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._lfo.max=this._lfo.min*Math.pow(2,t)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.filter.dispose(),this}}(fn),function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["pan"])))||this;n.name="Panner",n._panner=n.context.createStereoPanner(),n.input=n._panner,n.output=n._panner;var r=V(e.getDefaults(),arguments,["pan"]);return n.pan=new Ct({context:n.context,param:n._panner.pan,value:r.pan,minValue:-1,maxValue:1}),n._panner.channelCount=r.channelCount,n._panner.channelCountMode="explicit",rt(n,"pan"),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{pan:0,channelCount:1})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._panner.disconnect(),this.pan.dispose(),this},e}(Et)),hn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency"]))||this;return n.name="AutoPanner",n._panner=new pn({context:n.context}),n.connectEffect(n._panner),n._lfo.connect(n._panner.pan),n._lfo.min=-1,n._lfo.max=1,n}i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._panner.dispose(),this}}(fn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["smoothing"]))||this;n.name="Follower";var r=V(e.getDefaults(),arguments,["smoothing"]);return n._abs=n.input=new Te({context:n.context}),n._lowpass=n.output=new Ge({context:n.context,frequency:1/n.toSeconds(r.smoothing),type:"lowpass"}),n._abs.connect(n._lowpass),n._smoothing=r.smoothing,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{smoothing:.05})},Object.defineProperty(e.prototype,"smoothing",{get:function(){return this._smoothing},set:function(t){this._smoothing=t,this._lowpass.frequency=1/this.toSeconds(this.smoothing)},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._abs.dispose(),this._lowpass.dispose(),this},e}(Et)),dn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["baseFrequency","octaves","sensitivity"]))||this;n.name="AutoWah";var r=V(e.getDefaults(),arguments,["baseFrequency","octaves","sensitivity"]);return n._follower=new hn({context:n.context,smoothing:r.follower}),n._sweepRange=new Me({context:n.context,min:0,max:1,exponent:.5}),n._baseFrequency=n.toFrequency(r.baseFrequency),n._octaves=r.octaves,n._inputBoost=new Dt({context:n.context}),n._bandpass=new ze({context:n.context,rolloff:-48,frequency:0,Q:r.Q}),n._peaking=new ze({context:n.context,type:"peaking"}),n._peaking.gain.value=r.gain,n.gain=n._peaking.gain,n.Q=n._bandpass.Q,n.effectSend.chain(n._inputBoost,n._follower,n._sweepRange),n._sweepRange.connect(n._bandpass.frequency),n._sweepRange.connect(n._peaking.frequency),n.effectSend.chain(n._bandpass,n._peaking,n.effectReturn),n._setSweepRange(),n.sensitivity=r.sensitivity,rt(n,["gain","Q"]),n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{baseFrequency:100,octaves:6,sensitivity:0,Q:2,gain:2,follower:.2})},Object.defineProperty(e.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t,this._setSweepRange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"follower",{get:function(){return this._follower.smoothing},set:function(t){this._follower.smoothing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseFrequency",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=this.toFrequency(t),this._setSweepRange()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sensitivity",{get:function(){return yt(1/this._inputBoost.gain.value)},set:function(t){this._inputBoost.gain.value=1/dt(t)},enumerable:!0,configurable:!0}),e.prototype._setSweepRange=function(){this._sweepRange.min=this._baseFrequency,this._sweepRange.max=Math.min(this._baseFrequency*Math.pow(2,this._octaves),this.context.sampleRate/2)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._follower.dispose(),this._sweepRange.dispose(),this._bandpass.dispose(),this._peaking.dispose(),this._inputBoost.dispose(),this}}(ln),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["bits"]))||this;n.name="BitCrusher";var r=V(e.getDefaults(),arguments,["bits"]);return n._bitCrusherWorklet=new dn({context:n.context,bits:r.bits}),n.connectEffect(n._bitCrusherWorklet),n.bits=n._bitCrusherWorklet.bits,n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{bits:4,frequencyReduction:.5})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._bitCrusherWorklet.dispose(),this}}(ln),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;n.name="BitCrusherWorklet",n.workletOptions={numberOfInputs:1,numberOfOutputs:1};var r=V(e.getDefaults(),arguments);n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context});var o=n.context.createGain();return n.bits=new Ct({context:n.context,value:r.bits,units:"positive",minValue:1,maxValue:16,param:o.gain,swappable:!0}),n}return i(e,t),e.getDefaults=function(){return Object.assign($e.getDefaults(),{bits:12})},e.prototype._audioWorkletName=function(){return"bit-crusher"},e.prototype._audioWorklet=function(){return' \n\t\tregisterProcessor("'+this._audioWorkletName()+"\", class extends AudioWorkletProcessor {\n\t\t\tstatic get parameterDescriptors () {\n\t\t\t\treturn [{\n\t\t\t\t\tname: 'bits',\n\t\t\t\t\tdefaultValue: 12,\n\t\t\t\t\tminValue: 1,\n\t\t\t\t\tmaxValue: 16\n\t\t\t\t}];\n\t\t\t}\n\t\t\t\n\t\t\tprocess (inputs, outputs, parameters) {\n\t\t\t\tconst input = inputs[0];\n\t\t\t\tconst output = outputs[0];\n\t\t\t\tif (input && output && input.length === output.length) {\n\t\t\t\t\tconst bits = parameters.bits;\n\t\t\t\t\tfor (let channelNum = 0; channelNum < input.length; channelNum++) {\n\t\t\t\t\t\tconst inputChannel = input[channelNum];\n\t\t\t\t\t\tfor (let index = 0; index < inputChannel.length; index++) {\n\t\t\t\t\t\t\tconst value = inputChannel[index];\n\t\t\t\t\t\t\tconst step = bits.length > 1 ? Math.pow(0.5, bits[index]) : Math.pow(0.5, bits[0]);\n\t\t\t\t\t\t\tconst val = step * Math.floor(value / step + 0.5);\n\t\t\t\t\t\t\toutput[channelNum][index] = val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\t\t"},e.prototype.onReady=function(t){At(this.input,t,this.output);var e=t.parameters.get("bits");this.bits.setParam(e)},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this.output.dispose(),this.bits.dispose(),this},e}($e)),yn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["order"]))||this;n.name="Chebyshev";var r=V(e.getDefaults(),arguments,["order"]);return n._shaper=new ce({context:n.context,length:4096}),n._order=r.order,n.connectEffect(n._shaper),n.order=r.order,n.oversample=r.oversample,n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{order:1,oversample:"none"})},e.prototype._getCoefficient=function(t,e,n){return n.has(e)||(0===e?n.set(e,0):1===e?n.set(e,t):n.set(e,2*t*this._getCoefficient(t,e-1,n)-this._getCoefficient(t,e-2,n))),n.get(e)},Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(t){var e=this;this._order=t,this._shaper.setMap((function(n){return e._getCoefficient(n,t,new Map)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.dispose(),this}}(ln),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["channels"]))||this;n.name="Split";var r=V(e.getDefaults(),arguments,["channels"]);return n._splitter=n.input=n.output=n.context.createChannelSplitter(r.channels),n._internalChannels=[n._splitter],n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{channels:2})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._splitter.disconnect(),this},e}(Et)),vn=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["channels"]))||this;n.name="Merge";var r=V(e.getDefaults(),arguments,["channels"]);return n._merger=n.output=n.input=n.context.createChannelMerger(r.channels),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{channels:2})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._merger.disconnect(),this},e}(Et),mn=function(t){function e(e){var n=t.call(this,e)||this;return n.name="StereoEffect",n.input=new Dt({context:n.context}),n.input.channelCount=2,n.input.channelCountMode="explicit",n._dryWet=n.output=new cn({context:n.context,fade:e.wet}),n.wet=n._dryWet.fade,n._split=new yn({context:n.context,channels:2}),n._merge=new vn({context:n.context,channels:2}),n.input.connect(n._split),n.input.connect(n._dryWet.a),n._merge.connect(n._dryWet.b),rt(n,["wet"]),n}return i(e,t),e.prototype.connectEffectLeft=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._split.connect(t[0],0,0),At.apply(void 0,f(t)),jt(t[t.length-1],this._merge,0,0)},e.prototype.connectEffectRight=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._split.connect(t[0],1,0),At.apply(void 0,f(t)),jt(t[t.length-1],this._merge,0,1)},e.getDefaults=function(){return Object.assign(Et.getDefaults(),{wet:1})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._dryWet.dispose(),this._split.dispose(),this._merge.dispose(),this},e}(Et),gn=function(t){function e(e){var n=t.call(this,e)||this;return n.feedback=new Rt({context:n.context,value:e.feedback,units:"normalRange"}),n._feedbackL=new Dt({context:n.context}),n._feedbackR=new Dt({context:n.context}),n._feedbackSplit=new yn({context:n.context,channels:2}),n._feedbackMerge=new vn({context:n.context,channels:2}),n._merge.connect(n._feedbackSplit),n._feedbackMerge.connect(n._split),n._feedbackSplit.connect(n._feedbackL,0,0),n._feedbackL.connect(n._feedbackMerge,0,0),n._feedbackSplit.connect(n._feedbackR,1,0),n._feedbackR.connect(n._feedbackMerge,0,1),n.feedback.fan(n._feedbackL.gain,n._feedbackR.gain),rt(n,["feedback"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(mn.getDefaults(),{feedback:.5})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.feedback.dispose(),this._feedbackL.dispose(),this._feedbackR.dispose(),this._feedbackSplit.dispose(),this._feedbackMerge.dispose(),this},e}(mn),bn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","delayTime","depth"]))||this;n.name="Chorus";var r=V(e.getDefaults(),arguments,["frequency","delayTime","depth"]);return n._depth=r.depth,n._delayTime=r.delayTime/1e3,n._lfoL=new xe({context:n.context,frequency:r.frequency,min:0,max:1}),n._lfoR=new xe({context:n.context,frequency:r.frequency,min:0,max:1,phase:180}),n._delayNodeL=new Kt({context:n.context}),n._delayNodeR=new Kt({context:n.context}),n.frequency=n._lfoL.frequency,rt(n,["frequency"]),n._lfoL.frequency.connect(n._lfoR.frequency),n.connectEffectLeft(n._delayNodeL),n.connectEffectRight(n._delayNodeR),n._lfoL.connect(n._delayNodeL.delayTime),n._lfoR.connect(n._delayNodeR.delayTime),n.depth=n._depth,n.type=r.type,n.spread=r.spread,n}i(e,t),e.getDefaults=function(){return Object.assign(gn.getDefaults(),{frequency:1.5,delayTime:3.5,depth:.7,type:"sine",spread:180,feedback:0,wet:.5})},Object.defineProperty(e.prototype,"depth",{get:function(){return this._depth},set:function(t){this._depth=t;var e=this._delayTime*t;this._lfoL.min=Math.max(this._delayTime-e,0),this._lfoL.max=this._delayTime+e,this._lfoR.min=Math.max(this._delayTime-e,0),this._lfoR.max=this._delayTime+e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delayTime",{get:function(){return 1e3*this._delayTime},set:function(t){this._delayTime=t/1e3,this.depth=this._depth},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spread",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90},enumerable:!0,configurable:!0}),e.prototype.start=function(t){return this._lfoL.start(t),this._lfoR.start(t),this},e.prototype.stop=function(t){return this._lfoL.stop(t),this._lfoR.stop(t),this},e.prototype.sync=function(){return this._lfoL.sync(),this._lfoR.sync(),this},e.prototype.unsync=function(){return this._lfoL.unsync(),this._lfoR.unsync(),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._lfoL.dispose(),this._lfoR.dispose(),this._delayNodeL.dispose(),this._delayNodeR.dispose(),this.frequency.dispose(),this}}(gn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["distortion"]))||this;n.name="Distortion";var r=V(e.getDefaults(),arguments,["distortion"]);return n._shaper=new ce({context:n.context,length:4096}),n._distortion=r.distortion,n.connectEffect(n._shaper),n.distortion=r.distortion,n.oversample=r.oversample,n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{distortion:.4,oversample:"none"})},Object.defineProperty(e.prototype,"distortion",{get:function(){return this._distortion},set:function(t){this._distortion=t;var e=100*t,n=Math.PI/180;this._shaper.setMap((function(t){return Math.abs(t)<.001?0:(3+e)*t*20*n/(Math.PI+e*Math.abs(t))}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oversample",{get:function(){return this._shaper.oversample},set:function(t){this._shaper.oversample=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._shaper.dispose(),this}}(ln),function(t){function e(e){var n=t.call(this,e)||this;return n.name="FeedbackEffect",n._feedbackGain=new Dt({context:n.context,gain:e.feedback,units:"normalRange"}),n.feedback=n._feedbackGain.gain,rt(n,"feedback"),n.effectReturn.chain(n._feedbackGain,n.effectSend),n}return i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{feedback:.125})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._feedbackGain.dispose(),this.feedback.dispose(),this},e}(ln)),_n=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["delayTime","feedback"]))||this;n.name="FeedbackDelay";var r=V(e.getDefaults(),arguments,["delayTime","feedback"]);return n._delayNode=new Kt({context:n.context,delayTime:r.delayTime,maxDelay:r.maxDelay}),n.delayTime=n._delayNode.delayTime,n.connectEffect(n._delayNode),rt(n,"delayTime"),n}i(e,t),e.getDefaults=function(){return Object.assign(bn.getDefaults(),{delayTime:.25,maxDelay:1})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._delayNode.dispose(),this.delayTime.dispose(),this}}(bn),function(t){function e(e){var n=t.call(this,e)||this;n.name="PhaseShiftAllpass",n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context}),n.offset90=new Dt({context:n.context});return n._bank0=n._createAllPassFilterBank([.6923878,.9360654322959,.988229522686,.9987488452737]),n._bank1=n._createAllPassFilterBank([.4021921162426,.856171088242,.9722909545651,.9952884791278]),n._oneSampleDelay=n.context.createIIRFilter([0,1],[1,0]),At.apply(void 0,f([n.input],n._bank0,[n._oneSampleDelay,n.output])),At.apply(void 0,f([n.input],n._bank1,[n.offset90])),n}return i(e,t),e.prototype._createAllPassFilterBank=function(t){var e=this;return t.map((function(t){var n=[[t*t,0,-1],[1,0,-t*t]];return e.context.createIIRFilter(n[0],n[1])}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this.output.dispose(),this.offset90.dispose(),this._bank0.forEach((function(t){return t.disconnect()})),this._bank1.forEach((function(t){return t.disconnect()})),this._oneSampleDelay.disconnect(),this},e}(Et)),wn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency"]))||this;n.name="FrequencyShifter";var r=V(e.getDefaults(),arguments,["frequency"]);n.frequency=new Rt({context:n.context,units:"frequency",value:r.frequency,minValue:-n.context.sampleRate/2,maxValue:n.context.sampleRate/2}),n._sine=new ae({context:n.context,type:"sine"}),n._cosine=new se({context:n.context,phase:-90,type:"sine"}),n._sineMultiply=new fe({context:n.context}),n._cosineMultiply=new fe({context:n.context}),n._negate=new Ee({context:n.context}),n._add=new be({context:n.context}),n._phaseShifter=new _n({context:n.context}),n.effectSend.connect(n._phaseShifter),n.frequency.fan(n._sine.frequency,n._cosine.frequency),n._phaseShifter.offset90.connect(n._cosineMultiply),n._cosine.connect(n._cosineMultiply.factor),n._phaseShifter.connect(n._sineMultiply),n._sine.connect(n._sineMultiply.factor),n._sineMultiply.connect(n._negate),n._cosineMultiply.connect(n._add),n._negate.connect(n._add.addend),n._add.connect(n.effectReturn);var o=n.immediate();return n._sine.start(o),n._cosine.start(o),n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{frequency:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.frequency.dispose(),this._add.dispose(),this._cosine.dispose(),this._cosineMultiply.dispose(),this._negate.dispose(),this._phaseShifter.dispose(),this._sine.dispose(),this._sineMultiply.dispose(),this}}(ln),[1557/44100,1617/44100,1491/44100,1422/44100,1277/44100,1356/44100,1188/44100,1116/44100]),xn=[225,556,441,341],On=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["roomSize","dampening"]))||this;n.name="Freeverb",n._combFilters=[],n._allpassFiltersL=[],n._allpassFiltersR=[];var r=V(e.getDefaults(),arguments,["roomSize","dampening"]);return n.roomSize=new Rt({context:n.context,value:r.roomSize,units:"normalRange"}),n._allpassFiltersL=xn.map((function(t){var e=n.context.createBiquadFilter();return e.type="allpass",e.frequency.value=t,e})),n._allpassFiltersR=xn.map((function(t){var e=n.context.createBiquadFilter();return e.type="allpass",e.frequency.value=t,e})),n._combFilters=wn.map((function(t,e){var o=new Ke({context:n.context,dampening:r.dampening,delayTime:t});return e<wn.length/2?n.connectEffectLeft.apply(n,f([o],n._allpassFiltersL)):n.connectEffectRight.apply(n,f([o],n._allpassFiltersR)),n.roomSize.connect(o.resonance),o})),rt(n,["roomSize"]),n}i(e,t),e.getDefaults=function(){return Object.assign(mn.getDefaults(),{roomSize:.7,dampening:3e3})},Object.defineProperty(e.prototype,"dampening",{get:function(){return this._combFilters[0].dampening},set:function(t){this._combFilters.forEach((function(e){return e.dampening=t}))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._allpassFiltersL.forEach((function(t){return t.disconnect()})),this._allpassFiltersR.forEach((function(t){return t.disconnect()})),this._combFilters.forEach((function(t){return t.dispose()})),this.roomSize.dispose(),this}}(mn),[.06748,.06404,.08212,.09004]),Sn=[.773,.802,.753,.733],kn=[347,113,37],Tn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["roomSize"]))||this;n.name="JCReverb",n._allpassFilters=[],n._feedbackCombFilters=[];var r=V(e.getDefaults(),arguments,["roomSize"]);return n.roomSize=new Rt({context:n.context,value:r.roomSize,units:"normalRange"}),n._scaleRoomSize=new _e({context:n.context,min:-.733,max:.197}),n._allpassFilters=kn.map((function(t){var e=n.context.createBiquadFilter();return e.type="allpass",e.frequency.value=t,e})),n._feedbackCombFilters=On.map((function(t,e){var r=new He({context:n.context,delayTime:t});return n._scaleRoomSize.connect(r.resonance),r.resonance.value=Sn[e],e<On.length/2?n.connectEffectLeft.apply(n,f(n._allpassFilters,[r])):n.connectEffectRight.apply(n,f(n._allpassFilters,[r])),r})),n.roomSize.connect(n._scaleRoomSize),rt(n,["roomSize"]),n}i(e,t),e.getDefaults=function(){return Object.assign(mn.getDefaults(),{roomSize:.5})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._allpassFilters.forEach((function(t){return t.disconnect()})),this._feedbackCombFilters.forEach((function(t){return t.dispose()})),this.roomSize.dispose(),this._scaleRoomSize.dispose(),this}}(mn),function(t){function e(e){var n=t.call(this,e)||this;return n._feedbackL.disconnect(),n._feedbackL.connect(n._feedbackMerge,0,1),n._feedbackR.disconnect(),n._feedbackR.connect(n._feedbackMerge,0,0),rt(n,["feedback"]),n}return i(e,t),e}(gn)),Cn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["delayTime","feedback"]))||this;n.name="PingPongDelay";var r=V(e.getDefaults(),arguments,["delayTime","feedback"]);return n._leftDelay=new Kt({context:n.context,maxDelay:r.maxDelay}),n._rightDelay=new Kt({context:n.context,maxDelay:r.maxDelay}),n._rightPreDelay=new Kt({context:n.context,maxDelay:r.maxDelay}),n.delayTime=new Rt({context:n.context,units:"time",value:r.delayTime}),n.connectEffectLeft(n._leftDelay),n.connectEffectRight(n._rightPreDelay,n._rightDelay),n.delayTime.fan(n._leftDelay.delayTime,n._rightDelay.delayTime,n._rightPreDelay.delayTime),n._feedbackL.disconnect(),n._feedbackL.connect(n._rightDelay),rt(n,["delayTime"]),n}i(e,t),e.getDefaults=function(){return Object.assign(Tn.getDefaults(),{delayTime:.25,maxDelay:1})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._leftDelay.dispose(),this._rightDelay.dispose(),this._rightPreDelay.dispose(),this.delayTime.dispose(),this}}(Tn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["pitch"]))||this;n.name="PitchShift";var r=V(e.getDefaults(),arguments,["pitch"]);n._frequency=new Rt({context:n.context}),n._delayA=new Kt({maxDelay:1,context:n.context}),n._lfoA=new xe({context:n.context,min:0,max:.1,type:"sawtooth"}).connect(n._delayA.delayTime),n._delayB=new Kt({maxDelay:1,context:n.context}),n._lfoB=new xe({context:n.context,min:0,max:.1,type:"sawtooth",phase:180}).connect(n._delayB.delayTime),n._crossFade=new cn({context:n.context}),n._crossFadeLFO=new xe({context:n.context,min:0,max:1,type:"triangle",phase:90}).connect(n._crossFade.fade),n._feedbackDelay=new Kt({delayTime:r.delayTime,context:n.context}),n.delayTime=n._feedbackDelay.delayTime,rt(n,"delayTime"),n._pitch=r.pitch,n._windowSize=r.windowSize,n._delayA.connect(n._crossFade.a),n._delayB.connect(n._crossFade.b),n._frequency.fan(n._lfoA.frequency,n._lfoB.frequency,n._crossFadeLFO.frequency),n.effectSend.fan(n._delayA,n._delayB),n._crossFade.chain(n._feedbackDelay,n.effectReturn);var o=n.now();return n._lfoA.start(o),n._lfoB.start(o),n._crossFadeLFO.start(o),n.windowSize=n._windowSize,n}i(e,t),e.getDefaults=function(){return Object.assign(bn.getDefaults(),{pitch:0,windowSize:.1,delayTime:0,feedback:0})},Object.defineProperty(e.prototype,"pitch",{get:function(){return this._pitch},set:function(t){this._pitch=t;var e=0;t<0?(this._lfoA.min=0,this._lfoA.max=this._windowSize,this._lfoB.min=0,this._lfoB.max=this._windowSize,e=vt(t-1)+1):(this._lfoA.min=this._windowSize,this._lfoA.max=0,this._lfoB.min=this._windowSize,this._lfoB.max=0,e=vt(t)-1),this._frequency.value=e*(1.2/this._windowSize)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"windowSize",{get:function(){return this._windowSize},set:function(t){this._windowSize=this.toSeconds(t),this.pitch=this._pitch},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._frequency.dispose(),this._delayA.dispose(),this._delayB.dispose(),this._lfoA.dispose(),this._lfoB.dispose(),this._crossFade.dispose(),this._crossFadeLFO.dispose(),this._feedbackDelay.dispose(),this}}(bn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","octaves","baseFrequency"]))||this;n.name="Phaser";var r=V(e.getDefaults(),arguments,["frequency","octaves","baseFrequency"]);return n._lfoL=new xe({context:n.context,frequency:r.frequency,min:0,max:1}),n._lfoR=new xe({context:n.context,frequency:r.frequency,min:0,max:1,phase:180}),n._baseFrequency=n.toFrequency(r.baseFrequency),n._octaves=r.octaves,n.Q=new Rt({context:n.context,value:r.Q,units:"positive"}),n._filtersL=n._makeFilters(r.stages,n._lfoL),n._filtersR=n._makeFilters(r.stages,n._lfoR),n.frequency=n._lfoL.frequency,n.frequency.value=r.frequency,n.connectEffectLeft.apply(n,f(n._filtersL)),n.connectEffectRight.apply(n,f(n._filtersR)),n._lfoL.frequency.connect(n._lfoR.frequency),n.baseFrequency=r.baseFrequency,n.octaves=r.octaves,n._lfoL.start(),n._lfoR.start(),rt(n,["frequency","Q"]),n}i(e,t),e.getDefaults=function(){return Object.assign(mn.getDefaults(),{frequency:.5,octaves:3,stages:10,Q:10,baseFrequency:350})},e.prototype._makeFilters=function(t,e){for(var n=[],r=0;r<t;r++){var o=this.context.createBiquadFilter();o.type="allpass",this.Q.connect(o.Q),e.connect(o.frequency),n.push(o)}return n},Object.defineProperty(e.prototype,"octaves",{get:function(){return this._octaves},set:function(t){this._octaves=t;var e=this._baseFrequency*Math.pow(2,t);this._lfoL.max=e,this._lfoR.max=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"baseFrequency",{get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=this.toFrequency(t),this._lfoL.min=this._baseFrequency,this._lfoR.min=this._baseFrequency,this.octaves=this._octaves},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.Q.dispose(),this._lfoL.dispose(),this._lfoR.dispose(),this._filtersL.forEach((function(t){return t.disconnect()})),this._filtersR.forEach((function(t){return t.disconnect()})),this.frequency.dispose(),this}}(mn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["decay"]))||this;n.name="Reverb",n._convolver=n.context.createConvolver(),n.ready=Promise.resolve();var r=V(e.getDefaults(),arguments,["decay"]);return n._decay=r.decay,n._preDelay=r.preDelay,n.generate(),n.connectEffect(n._convolver),n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{decay:1.5,preDelay:.01})},Object.defineProperty(e.prototype,"decay",{get:function(){return this._decay},set:function(t){h(t=this.toSeconds(t),.001),this._decay=t,this.generate()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"preDelay",{get:function(){return this._preDelay},set:function(t){h(t=this.toSeconds(t),0),this._preDelay=t,this.generate()},enumerable:!0,configurable:!0}),e.prototype.generate=function(){return s(this,void 0,void 0,(function(){var t,e,n,r,o,i,a,s;return u(this,(function(u){switch(u.label){case 0:return t=this.ready,e=new st(2,this._decay+this._preDelay,this.context.sampleRate),n=new ne({context:e}),r=new ne({context:e}),o=new vn({context:e}),n.connect(o,0,0),r.connect(o,0,1),i=new Dt({context:e}).toDestination(),o.connect(i),n.start(0),r.start(0),i.gain.setValueAtTime(0,0),i.gain.setValueAtTime(1,this._preDelay),i.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay),a=e.render(),this.ready=a.then(it),[4,t];case 1:return u.sent(),s=this._convolver,[4,a];case 2:return s.buffer=u.sent().get(),[2,this]}}))}))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._convolver.disconnect(),this}}(ln),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;return n.name="MidSideSplit",n._split=n.input=new yn({channels:2,context:n.context}),n._midAdd=new be({context:n.context}),n.mid=new fe({context:n.context,value:Math.SQRT1_2}),n._sideSubtract=new Ae({context:n.context}),n.side=new fe({context:n.context,value:Math.SQRT1_2}),n._split.connect(n._midAdd,0),n._split.connect(n._midAdd.addend,1),n._split.connect(n._sideSubtract,0),n._split.connect(n._sideSubtract.subtrahend,1),n._midAdd.connect(n.mid),n._sideSubtract.connect(n.side),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.mid.dispose(),this.side.dispose(),this._midAdd.dispose(),this._sideSubtract.dispose(),this._split.dispose(),this},e}(Et)),En=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;return n.name="MidSideMerge",n.mid=new Dt({context:n.context}),n.side=new Dt({context:n.context}),n._left=new be({context:n.context}),n._leftMult=new fe({context:n.context,value:Math.SQRT1_2}),n._right=new Ae({context:n.context}),n._rightMult=new fe({context:n.context,value:Math.SQRT1_2}),n._merge=n.output=new vn({context:n.context}),n.mid.fan(n._left),n.side.connect(n._left.addend),n.mid.connect(n._right),n.side.connect(n._right.subtrahend),n._left.connect(n._leftMult),n._right.connect(n._rightMult),n._leftMult.connect(n._merge,0,0),n._rightMult.connect(n._merge,0,1),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.mid.dispose(),this.side.dispose(),this._leftMult.dispose(),this._rightMult.dispose(),this._left.dispose(),this._right.dispose(),this},e}(Et),An=function(t){function e(e){var n=t.call(this,e)||this;return n.name="MidSideEffect",n._midSideMerge=new En({context:n.context}),n._midSideSplit=new Cn({context:n.context}),n._midSend=n._midSideSplit.mid,n._sideSend=n._midSideSplit.side,n._midReturn=n._midSideMerge.mid,n._sideReturn=n._midSideMerge.side,n.effectSend.connect(n._midSideSplit),n._midSideMerge.connect(n.effectReturn),n}return i(e,t),e.prototype.connectEffectMid=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this._midSend).chain.apply(t,f(e,[this._midReturn]))},e.prototype.connectEffectSide=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(t=this._sideSend).chain.apply(t,f(e,[this._sideReturn]))},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._midSideSplit.dispose(),this._midSideMerge.dispose(),this._midSend.dispose(),this._sideSend.dispose(),this._midReturn.dispose(),this._sideReturn.dispose(),this},e}(ln),jn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["width"]))||this;n.name="StereoWidener";var r=V(e.getDefaults(),arguments,["width"]);return n.width=new Rt({context:n.context,value:r.width,units:"normalRange"}),rt(n,["width"]),n._twoTimesWidthMid=new fe({context:n.context,value:2}),n._twoTimesWidthSide=new fe({context:n.context,value:2}),n._midMult=new fe({context:n.context}),n._twoTimesWidthMid.connect(n._midMult.factor),n.connectEffectMid(n._midMult),n._oneMinusWidth=new Ae({context:n.context}),n._oneMinusWidth.connect(n._twoTimesWidthMid),jt(n.context.getConstant(1),n._oneMinusWidth),n.width.connect(n._oneMinusWidth.subtrahend),n._sideMult=new fe({context:n.context}),n.width.connect(n._twoTimesWidthSide),n._twoTimesWidthSide.connect(n._sideMult.factor),n.connectEffectSide(n._sideMult),n}i(e,t),e.getDefaults=function(){return Object.assign(An.getDefaults(),{width:.5})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.width.dispose(),this._midMult.dispose(),this._sideMult.dispose(),this._twoTimesWidthMid.dispose(),this._twoTimesWidthSide.dispose(),this._oneMinusWidth.dispose(),this}}(An),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","depth"]))||this;n.name="Tremolo";var r=V(e.getDefaults(),arguments,["frequency","depth"]);return n._lfoL=new xe({context:n.context,type:r.type,min:1,max:0}),n._lfoR=new xe({context:n.context,type:r.type,min:1,max:0}),n._amplitudeL=new Dt({context:n.context}),n._amplitudeR=new Dt({context:n.context}),n.frequency=new Rt({context:n.context,value:r.frequency,units:"frequency"}),n.depth=new Rt({context:n.context,value:r.depth,units:"normalRange"}),rt(n,["frequency","depth"]),n.connectEffectLeft(n._amplitudeL),n.connectEffectRight(n._amplitudeR),n._lfoL.connect(n._amplitudeL.gain),n._lfoR.connect(n._amplitudeR.gain),n.frequency.fan(n._lfoL.frequency,n._lfoR.frequency),n.depth.fan(n._lfoR.amplitude,n._lfoL.amplitude),n.spread=r.spread,n}i(e,t),e.getDefaults=function(){return Object.assign(mn.getDefaults(),{frequency:10,type:"sine",depth:.5,spread:180})},e.prototype.start=function(t){return this._lfoL.start(t),this._lfoR.start(t),this},e.prototype.stop=function(t){return this._lfoL.stop(t),this._lfoR.stop(t),this},e.prototype.sync=function(){return this._lfoL.sync(),this._lfoR.sync(),this.context.transport.syncSignal(this.frequency),this},e.prototype.unsync=function(){return this._lfoL.unsync(),this._lfoR.unsync(),this.context.transport.unsyncSignal(this.frequency),this},Object.defineProperty(e.prototype,"type",{get:function(){return this._lfoL.type},set:function(t){this._lfoL.type=t,this._lfoR.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spread",{get:function(){return this._lfoR.phase-this._lfoL.phase},set:function(t){this._lfoL.phase=90-t/2,this._lfoR.phase=t/2+90},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._lfoL.dispose(),this._lfoR.dispose(),this._amplitudeL.dispose(),this._amplitudeR.dispose(),this.frequency.dispose(),this.depth.dispose(),this}}(mn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["frequency","depth"]))||this;n.name="Vibrato";var r=V(e.getDefaults(),arguments,["frequency","depth"]);return n._delayNode=new Kt({context:n.context,delayTime:0,maxDelay:r.maxDelay}),n._lfo=new xe({context:n.context,type:r.type,min:0,max:r.maxDelay,frequency:r.frequency,phase:-90}).start().connect(n._delayNode.delayTime),n.frequency=n._lfo.frequency,n.depth=n._lfo.amplitude,n.depth.value=r.depth,rt(n,["frequency","depth"]),n.effectSend.chain(n._delayNode,n.effectReturn),n}i(e,t),e.getDefaults=function(){return Object.assign(ln.getDefaults(),{maxDelay:.005,frequency:5,depth:.1,type:"sine"})},Object.defineProperty(e.prototype,"type",{get:function(){return this._lfo.type},set:function(t){this._lfo.type=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._delayNode.dispose(),this._lfo.dispose(),this.frequency.dispose(),this.depth.dispose(),this}}(ln),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["type","size"]))||this;n.name="Analyser",n._analysers=[],n._buffers=[];var r=V(e.getDefaults(),arguments,["type","size"]);n.input=n.output=n._gain=new Dt({context:n.context}),n._split=new yn({context:n.context,channels:r.channels}),n.input.connect(n._split),h(r.channels,1);for(var o=0;o<r.channels;o++)n._analysers[o]=n.context.createAnalyser(),n._split.connect(n._analysers[o],o,0);return n.size=r.size,n.type=r.type,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{size:1024,smoothing:.8,type:"fft",channels:1})},e.prototype.getValue=function(){var t=this;return this._analysers.forEach((function(e,n){var r=t._buffers[n];"fft"===t._type?e.getFloatFrequencyData(r):"waveform"===t._type&&e.getFloatTimeDomainData(r)})),1===this.channels?this._buffers[0]:this._buffers},Object.defineProperty(e.prototype,"size",{get:function(){return this._analysers[0].frequencyBinCount},set:function(t){var e=this;this._analysers.forEach((function(n,r){n.fftSize=2*t,e._buffers[r]=new Float32Array(t)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"channels",{get:function(){return this._analysers.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){p("waveform"===t||"fft"===t,"Analyser: invalid type: "+t),this._type=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothing",{get:function(){return this._analysers[0].smoothingTimeConstant},set:function(t){this._analysers.forEach((function(e){return e.smoothingTimeConstant=t}))},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._analysers.forEach((function(t){return t.disconnect()})),this._split.dispose(),this._gain.dispose(),this},e}(Et)),Pn=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;return n.name="MeterBase",n.input=n.output=n._analyser=new jn({context:n.context,size:256,type:"waveform"}),n}return i(e,t),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._analyser.dispose(),this},e}(Et),Dn=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["smoothing"]))||this;n.name="Meter",n._rms=0;var r=V(e.getDefaults(),arguments,["smoothing"]);return n.input=n.output=n._analyser=new jn({context:n.context,size:256,type:"waveform",channels:r.channels}),n.smoothing=r.smoothing,n.normalRange=r.normalRange,n}i(e,t),e.getDefaults=function(){return Object.assign(Pn.getDefaults(),{smoothing:.8,normalRange:!1,channels:1})},e.prototype.getLevel=function(){return m("'getLevel' has been changed to 'getValue'"),this.getValue()},e.prototype.getValue=function(){var t=this,e=this._analyser.getValue(),n=(1===this.channels?[e]:e).map((function(e){var n=e.reduce((function(t,e){return t+e*e}),0),r=Math.sqrt(n/e.length);return t._rms=Math.max(r,t._rms*t.smoothing),t.normalRange?t._rms:yt(t._rms)}));return 1===this.channels?n[0]:n},Object.defineProperty(e.prototype,"channels",{get:function(){return this._analyser.channels},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._analyser.dispose(),this}}(Pn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["size"]))||this;n.name="FFT";var r=V(e.getDefaults(),arguments,["size"]);return n.normalRange=r.normalRange,n._analyser.type="fft",n.size=r.size,n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{normalRange:!1,size:1024,smoothing:.8})},e.prototype.getValue=function(){var t=this;return this._analyser.getValue().map((function(e){return t.normalRange?dt(e):e}))},Object.defineProperty(e.prototype,"size",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothing",{get:function(){return this._analyser.smoothing},set:function(t){this._analyser.smoothing=t},enumerable:!0,configurable:!0})}(Pn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments))||this;return n.name="DCMeter",n._analyser.type="waveform",n._analyser.size=256,n}i(e,t),e.prototype.getValue=function(){return this._analyser.getValue()[0]}}(Pn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["size"]))||this;n.name="Waveform";var r=V(e.getDefaults(),arguments,["size"]);return n._analyser.type="waveform",n.size=r.size,n}i(e,t),e.getDefaults=function(){return Object.assign(Pn.getDefaults(),{size:1024})},e.prototype.getValue=function(){return this._analyser.getValue()},Object.defineProperty(e.prototype,"size",{get:function(){return this._analyser.size},set:function(t){this._analyser.size=t},enumerable:!0,configurable:!0})}(Pn),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["solo"]))||this;n.name="Solo";var r=V(e.getDefaults(),arguments,["solo"]);return n.input=n.output=new Dt({context:n.context}),e._allSolos.has(n.context)||e._allSolos.set(n.context,new Set),e._allSolos.get(n.context).add(n),n.solo=r.solo,n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{solo:!1})},Object.defineProperty(e.prototype,"solo",{get:function(){return this._isSoloed()},set:function(t){t?this._addSolo():this._removeSolo(),e._allSolos.get(this.context).forEach((function(t){return t._updateSolo()}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return 0===this.input.gain.value},enumerable:!0,configurable:!0}),e.prototype._addSolo=function(){e._soloed.has(this.context)||e._soloed.set(this.context,new Set),e._soloed.get(this.context).add(this)},e.prototype._removeSolo=function(){e._soloed.has(this.context)&&e._soloed.get(this.context).delete(this)},e.prototype._isSoloed=function(){return e._soloed.has(this.context)&&e._soloed.get(this.context).has(this)},e.prototype._noSolos=function(){return!e._soloed.has(this.context)||e._soloed.has(this.context)&&0===e._soloed.get(this.context).size},e.prototype._updateSolo=function(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0},e.prototype.dispose=function(){return t.prototype.dispose.call(this),e._allSolos.get(this.context).delete(this),this._removeSolo(),this},e._allSolos=new Map,e._soloed=new Map,e}(Et)),Mn=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["pan","volume"]))||this;n.name="PanVol";var r=V(e.getDefaults(),arguments,["pan","volume"]);return n._panner=n.input=new pn({context:n.context,pan:r.pan}),n.pan=n._panner.pan,n._volume=n.output=new Qt({context:n.context,volume:r.volume}),n.volume=n._volume.volume,n._panner.connect(n._volume),n.mute=r.mute,rt(n,["pan","volume"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mute:!1,pan:0,volume:0})},Object.defineProperty(e.prototype,"mute",{get:function(){return this._volume.mute},set:function(t){this._volume.mute=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this},e}(Et),In=(function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["volume","pan"]))||this;n.name="Channel";var r=V(e.getDefaults(),arguments,["volume","pan"]);return n._solo=n.input=new Dn({solo:r.solo,context:n.context}),n._panVol=n.output=new Mn({context:n.context,pan:r.pan,volume:r.volume,mute:r.mute}),n.pan=n._panVol.pan,n.volume=n._panVol.volume,n._solo.connect(n._panVol),rt(n,["pan","volume"]),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1})},Object.defineProperty(e.prototype,"solo",{get:function(){return this._solo.solo},set:function(t){this._solo.solo=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._solo.muted||this.mute},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mute",{get:function(){return this._panVol.mute},set:function(t){this._panVol.mute=t},enumerable:!0,configurable:!0}),e.prototype._getBus=function(t){return e.buses.has(t)||e.buses.set(t,new Dt({context:this.context})),e.buses.get(t)},e.prototype.send=function(t,e){void 0===e&&(e=0);var n=this._getBus(t),r=new Dt({context:this.context,units:"decibels",gain:e});return this.connect(r),r.connect(n),r},e.prototype.receive=function(t){return this._getBus(t).connect(this),this},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this},e.buses=new Map}(Et),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["lowFrequency","highFrequency"]))||this;n.name="MultibandSplit",n.input=new Dt({context:n.context}),n.output=void 0,n.low=new ze({context:n.context,frequency:0,type:"lowpass"}),n._lowMidFilter=new ze({context:n.context,frequency:0,type:"highpass"}),n.mid=new ze({context:n.context,frequency:0,type:"lowpass"}),n.high=new ze({context:n.context,frequency:0,type:"highpass"}),n._internalChannels=[n.low,n.mid,n.high];var r=V(e.getDefaults(),arguments,["lowFrequency","highFrequency"]);return n.lowFrequency=new Rt({context:n.context,units:"frequency",value:r.lowFrequency}),n.highFrequency=new Rt({context:n.context,units:"frequency",value:r.highFrequency}),n.Q=new Rt({context:n.context,units:"positive",value:r.Q}),n.input.fan(n.low,n.high),n.input.chain(n._lowMidFilter,n.mid),n.lowFrequency.fan(n.low.frequency,n._lowMidFilter.frequency),n.highFrequency.fan(n.mid.frequency,n.high.frequency),n.Q.connect(n.low.Q),n.Q.connect(n._lowMidFilter.Q),n.Q.connect(n.mid.Q),n.Q.connect(n.high.Q),rt(n,["high","mid","low","highFrequency","lowFrequency"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{Q:1,highFrequency:2500,lowFrequency:400})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),ot(this,["high","mid","low","highFrequency","lowFrequency"]),this.low.dispose(),this._lowMidFilter.dispose(),this.mid.dispose(),this.high.dispose(),this.lowFrequency.dispose(),this.highFrequency.dispose(),this.Q.dispose(),this},e}(Et)),Rn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="Listener",e.positionX=new Ct({context:e.context,param:e.context.rawContext.listener.positionX}),e.positionY=new Ct({context:e.context,param:e.context.rawContext.listener.positionY}),e.positionZ=new Ct({context:e.context,param:e.context.rawContext.listener.positionZ}),e.forwardX=new Ct({context:e.context,param:e.context.rawContext.listener.forwardX}),e.forwardY=new Ct({context:e.context,param:e.context.rawContext.listener.forwardY}),e.forwardZ=new Ct({context:e.context,param:e.context.rawContext.listener.forwardZ}),e.upX=new Ct({context:e.context,param:e.context.rawContext.listener.upX}),e.upY=new Ct({context:e.context,param:e.context.rawContext.listener.upY}),e.upZ=new Ct({context:e.context,param:e.context.rawContext.listener.upZ}),e}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this},e}(Et);Y((function(t){t.listener=new Rn({context:t})})),J((function(t){t.listener.dispose()}));!function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["positionX","positionY","positionZ"]))||this;n.name="Panner3D";var r=V(e.getDefaults(),arguments,["positionX","positionY","positionZ"]);return n._panner=n.input=n.output=n.context.createPanner(),n.panningModel=r.panningModel,n.maxDistance=r.maxDistance,n.distanceModel=r.distanceModel,n.coneOuterGain=r.coneOuterGain,n.coneOuterAngle=r.coneOuterAngle,n.coneInnerAngle=r.coneInnerAngle,n.refDistance=r.refDistance,n.rolloffFactor=r.rolloffFactor,n.positionX=new Ct({context:n.context,param:n._panner.positionX,value:r.positionX}),n.positionY=new Ct({context:n.context,param:n._panner.positionY,value:r.positionY}),n.positionZ=new Ct({context:n.context,param:n._panner.positionZ,value:r.positionZ}),n.orientationX=new Ct({context:n.context,param:n._panner.orientationX,value:r.orientationX}),n.orientationY=new Ct({context:n.context,param:n._panner.orientationY,value:r.orientationY}),n.orientationZ=new Ct({context:n.context,param:n._panner.orientationZ,value:r.orientationZ}),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:0,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1})},e.prototype.setPosition=function(t,e,n){return this.positionX.value=t,this.positionY.value=e,this.positionZ.value=n,this},e.prototype.setOrientation=function(t,e,n){return this.orientationX.value=t,this.orientationY.value=e,this.orientationZ.value=n,this},Object.defineProperty(e.prototype,"panningModel",{get:function(){return this._panner.panningModel},set:function(t){this._panner.panningModel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"refDistance",{get:function(){return this._panner.refDistance},set:function(t){this._panner.refDistance=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rolloffFactor",{get:function(){return this._panner.rolloffFactor},set:function(t){this._panner.rolloffFactor=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"distanceModel",{get:function(){return this._panner.distanceModel},set:function(t){this._panner.distanceModel=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coneInnerAngle",{get:function(){return this._panner.coneInnerAngle},set:function(t){this._panner.coneInnerAngle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coneOuterAngle",{get:function(){return this._panner.coneOuterAngle},set:function(t){this._panner.coneOuterAngle=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"coneOuterGain",{get:function(){return this._panner.coneOuterGain},set:function(t){this._panner.coneOuterGain=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxDistance",{get:function(){return this._panner.maxDistance},set:function(t){this._panner.maxDistance=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._panner.disconnect(),this.orientationX.dispose(),this.orientationY.dispose(),this.orientationZ.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this}}(Et);var Nn=function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["threshold","ratio"]))||this;n.name="Compressor",n._compressor=n.context.createDynamicsCompressor(),n.input=n._compressor,n.output=n._compressor;var r=V(e.getDefaults(),arguments,["threshold","ratio"]);return n.threshold=new Ct({minValue:n._compressor.threshold.minValue,maxValue:n._compressor.threshold.maxValue,context:n.context,convert:!1,param:n._compressor.threshold,units:"decibels",value:r.threshold}),n.attack=new Ct({minValue:n._compressor.attack.minValue,maxValue:n._compressor.attack.maxValue,context:n.context,param:n._compressor.attack,units:"time",value:r.attack}),n.release=new Ct({minValue:n._compressor.release.minValue,maxValue:n._compressor.release.maxValue,context:n.context,param:n._compressor.release,units:"time",value:r.release}),n.knee=new Ct({minValue:n._compressor.knee.minValue,maxValue:n._compressor.knee.maxValue,context:n.context,convert:!1,param:n._compressor.knee,units:"decibels",value:r.knee}),n.ratio=new Ct({minValue:n._compressor.ratio.minValue,maxValue:n._compressor.ratio.maxValue,context:n.context,convert:!1,param:n._compressor.ratio,units:"positive",value:r.ratio}),rt(n,["knee","release","attack","ratio","threshold"]),n}return i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{attack:.003,knee:30,ratio:12,release:.25,threshold:-24})},Object.defineProperty(e.prototype,"reduction",{get:function(){return this._compressor.reduction},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._compressor.disconnect(),this.attack.dispose(),this.release.dispose(),this.threshold.dispose(),this.ratio.dispose(),this.knee.dispose(),this},e}(Et);(function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["threshold","smoothing"])))||this;n.name="Gate";var r=V(e.getDefaults(),arguments,["threshold","smoothing"]);return n._follower=new hn({context:n.context,smoothing:r.smoothing}),n._gt=new Pe({context:n.context,value:dt(r.threshold)}),n.input=new Dt({context:n.context}),n._gate=n.output=new Dt({context:n.context}),n.input.connect(n._gate),n.input.chain(n._follower,n._gt,n._gate.gain),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{smoothing:.1,threshold:-40})},Object.defineProperty(e.prototype,"threshold",{get:function(){return yt(this._gt.value)},set:function(t){this._gt.value=dt(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"smoothing",{get:function(){return this._follower.smoothing},set:function(t){this._follower.smoothing=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.input.dispose(),this._follower.dispose(),this._gt.dispose(),this._gate.dispose(),this}})(Et),function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments,["threshold"])))||this;n.name="Limiter";var r=V(e.getDefaults(),arguments,["threshold"]);return n._compressor=n.input=n.output=new Nn({context:n.context,ratio:20,attack:0,release:0,threshold:r.threshold}),n.threshold=n._compressor.threshold,rt(n,"threshold"),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{threshold:-12})},Object.defineProperty(e.prototype,"reduction",{get:function(){return this._compressor.reduction},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._compressor.dispose(),this.threshold.dispose(),this}}(Et),function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments)))||this;n.name="MidSideCompressor";var r=V(e.getDefaults(),arguments);return n._midSideSplit=n.input=new Cn({context:n.context}),n._midSideMerge=n.output=new En({context:n.context}),n.mid=new Nn(Object.assign(r.mid,{context:n.context})),n.side=new Nn(Object.assign(r.side,{context:n.context})),n._midSideSplit.mid.chain(n.mid,n._midSideMerge.mid),n._midSideSplit.side.chain(n.side,n._midSideMerge.side),rt(n,["mid","side"]),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{mid:{ratio:3,threshold:-24,release:.03,attack:.02,knee:16},side:{ratio:6,threshold:-30,release:.25,attack:.03,knee:10}})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this.mid.dispose(),this.side.dispose(),this._midSideSplit.dispose(),this._midSideMerge.dispose(),this}}(Et),function(t){function e(){var n=t.call(this,Object.assign(V(e.getDefaults(),arguments)))||this;n.name="MultibandCompressor";var r=V(e.getDefaults(),arguments);return n._splitter=n.input=new In({context:n.context,lowFrequency:r.lowFrequency,highFrequency:r.highFrequency}),n.lowFrequency=n._splitter.lowFrequency,n.highFrequency=n._splitter.highFrequency,n.output=new Dt({context:n.context}),n.low=new Nn(Object.assign(r.low,{context:n.context})),n.mid=new Nn(Object.assign(r.mid,{context:n.context})),n.high=new Nn(Object.assign(r.high,{context:n.context})),n._splitter.low.chain(n.low,n.output),n._splitter.mid.chain(n.mid,n.output),n._splitter.high.chain(n.high,n.output),rt(n,["high","mid","low","highFrequency","lowFrequency"]),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{lowFrequency:250,highFrequency:2e3,low:{ratio:6,threshold:-30,release:.25,attack:.03,knee:10},mid:{ratio:3,threshold:-24,release:.03,attack:.02,knee:16},high:{ratio:3,threshold:-24,release:.03,attack:.02,knee:16}})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._splitter.dispose(),this.low.dispose(),this.mid.dispose(),this.high.dispose(),this.output.dispose(),this}}(Et),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["low","mid","high"]))||this;n.name="EQ3",n.output=new Dt({context:n.context}),n._internalChannels=[];var r=V(e.getDefaults(),arguments,["low","mid","high"]);return n.input=n._multibandSplit=new In({context:n.context,highFrequency:r.highFrequency,lowFrequency:r.lowFrequency}),n._lowGain=new Dt({context:n.context,gain:r.low,units:"decibels"}),n._midGain=new Dt({context:n.context,gain:r.mid,units:"decibels"}),n._highGain=new Dt({context:n.context,gain:r.high,units:"decibels"}),n.low=n._lowGain.gain,n.mid=n._midGain.gain,n.high=n._highGain.gain,n.Q=n._multibandSplit.Q,n.lowFrequency=n._multibandSplit.lowFrequency,n.highFrequency=n._multibandSplit.highFrequency,n._multibandSplit.low.chain(n._lowGain,n.output),n._multibandSplit.mid.chain(n._midGain,n.output),n._multibandSplit.high.chain(n._highGain,n.output),rt(n,["low","mid","high","lowFrequency","highFrequency"]),n._internalChannels=[n._multibandSplit],n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{high:0,highFrequency:2500,low:0,lowFrequency:400,mid:0})},e.prototype.dispose=function(){return t.prototype.dispose.call(this),ot(this,["low","mid","high","lowFrequency","highFrequency"]),this._multibandSplit.dispose(),this.lowFrequency.dispose(),this.highFrequency.dispose(),this._lowGain.dispose(),this._midGain.dispose(),this._highGain.dispose(),this.low.dispose(),this.mid.dispose(),this.high.dispose(),this.Q.dispose(),this}}(Et),function(t){function e(){var n=t.call(this,V(e.getDefaults(),arguments,["url","onload"]))||this;n.name="Convolver",n._convolver=n.context.createConvolver();var r=V(e.getDefaults(),arguments,["url","onload"]);return n._buffer=new at(r.url,(function(t){n.buffer=t,r.onload()})),n.input=new Dt({context:n.context}),n.output=new Dt({context:n.context}),n._buffer.loaded&&(n.buffer=n._buffer),n.normalize=r.normalize,n.input.chain(n._convolver,n.output),n}i(e,t),e.getDefaults=function(){return Object.assign(Et.getDefaults(),{normalize:!0,onload:it})},e.prototype.load=function(t){return s(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return e=this,[4,this._buffer.load(t)];case 1:return e.buffer=n.sent(),[2]}}))}))},Object.defineProperty(e.prototype,"buffer",{get:function(){return this._buffer.length?this._buffer:null},set:function(t){t&&this._buffer.set(t),this._convolver.buffer&&(this.input.disconnect(),this._convolver.disconnect(),this._convolver=this.context.createConvolver(),this.input.chain(this._convolver,this.output));var e=this._buffer.get();this._convolver.buffer=e||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"normalize",{get:function(){return this._convolver.normalize},set:function(t){this._convolver.normalize=t},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){return t.prototype.dispose.call(this),this._buffer.dispose(),this._convolver.disconnect(),this}}(Et);n.d(e,"c",(function(){return Fn})),n.d(e,"b",(function(){return Ve})),n.d(e,"a",(function(){return Xe}));lt().now.bind(lt()),lt().immediate.bind(lt());var Fn=lt().transport;lt().destination,lt().listener,lt().draw,lt(),at.loaded.bind(at)}]]);