mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-04-20 07:37:18 -05:00
2 lines
646 KiB
JavaScript
2 lines
646 KiB
JavaScript
/*! For license information please see vendor.js.LICENSE.txt */
|
||
(self.webpackChunkchaoticbackup=self.webpackChunkchaoticbackup||[]).push([[736],{6981:(t,e,n)=>{"use strict";n(1983);var r,i=(r=n(1543))&&r.__esModule?r:{default:r};i.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."),i.default._babelPolyfill=!0},1983:(t,e,n)=>{"use strict";n(5033),n(8033),n(2863),n(6141),n(4316),n(117),n(6863),n(290),n(8652),n(1235),n(8930),n(1794),n(1523),n(5666)},5033:(t,e,n)=>{n(8997),n(7944),n(5388),n(266),n(7557),n(3386),n(81),n(4943),n(192),n(4371),n(7026),n(6736),n(7260),n(4649),n(8325),n(2798),n(6911),n(4394),n(8769),n(729),n(9383),n(9315),n(5072),n(348),n(1028),n(2610),n(4007),n(7616),n(6762),n(3316),n(3019),n(293),n(640),n(6589),n(3210),n(2372),n(511),n(6781),n(4434),n(4783),n(5521),n(4093),n(6378),n(2380),n(2803),n(3725),n(7977),n(4192),n(2940),n(5731),n(9382),n(8877),n(2539),n(9820),n(8417),n(4333),n(2858),n(2058),n(5472),n(7001),n(7492),n(447),n(5624),n(1263),n(5193),n(8241),n(6723),n(9394),n(6938),n(1961),n(9659),n(3354),n(9620),n(638),n(2338),n(641),n(1575),n(5611),n(1033),n(160),n(5271),n(8221),n(2523),n(5441),n(8375),n(9106),n(9139),n(3352),n(3289),n(5943),n(9483),n(8292),n(6174),n(6975),n(1412),n(360),n(8394),n(3118),n(8772),n(1308),n(7080),n(8615),n(5244),n(9544),n(5475),n(3770),n(5201),n(1385),n(2813),n(2509),n(8253),n(7391),n(3307),n(3315),n(2920),n(5443),n(9815),n(3771),n(6935),n(7846),n(6403),n(1200),n(951),n(29),n(9310),n(6722),n(8372),n(4604),n(4781),n(8416),n(4395),n(9649),n(2475),n(2924),n(6337),n(3286),n(7225),n(8766),t.exports=n(4411)},2863:(t,e,n)=>{n(8125),t.exports=n(4411).Array.flatMap},8033:(t,e,n)=>{n(9348),t.exports=n(4411).Array.includes},8930:(t,e,n)=>{n(1768),t.exports=n(4411).Object.entries},8652:(t,e,n)=>{n(9223),t.exports=n(4411).Object.getOwnPropertyDescriptors},1235:(t,e,n)=>{n(7442),t.exports=n(4411).Object.values},1794:(t,e,n)=>{"use strict";n(2813),n(4936),t.exports=n(4411).Promise.finally},4316:(t,e,n)=>{n(239),t.exports=n(4411).String.padEnd},6141:(t,e,n)=>{n(8755),t.exports=n(4411).String.padStart},6863:(t,e,n)=>{n(6948),t.exports=n(4411).String.trimRight},117:(t,e,n)=>{n(3412),t.exports=n(4411).String.trimLeft},290:(t,e,n)=>{n(8284),t.exports=n(8833).f("asyncIterator")},1543:(t,e,n)=>{n(4296),t.exports=n(1275).global},7411:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},3206:(t,e,n)=>{var r=n(700);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},1275:t=>{var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)},999:(t,e,n)=>{var r=n(7411);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,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},697:(t,e,n)=>{t.exports=!n(3834)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},2394:(t,e,n)=>{var r=n(700),i=n(1075).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},4553:(t,e,n)=>{var r=n(1075),i=n(1275),o=n(999),s=n(2550),a=n(4324),u=function(t,e,n){var l,c,h,f=t&u.F,p=t&u.G,d=t&u.S,m=t&u.P,v=t&u.B,g=t&u.W,y=p?i:i[e]||(i[e]={}),b=y.prototype,_=p?r:d?r[e]:(r[e]||{}).prototype;for(l in p&&(n=e),n)(c=!f&&_&&void 0!==_[l])&&a(y,l)||(h=c?_[l]:n[l],y[l]=p&&"function"!=typeof _[l]?n[l]:v&&c?o(h,r):g&&_[l]==h?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}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[l]=h,t&u.R&&b&&!b[l]&&s(b,l,h)))};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},3834:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},1075:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},4324:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},2550:(t,e,n)=>{var r=n(249),i=n(3652);t.exports=n(697)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},3393:(t,e,n)=>{t.exports=!n(697)&&!n(3834)((function(){return 7!=Object.defineProperty(n(2394)("div"),"a",{get:function(){return 7}}).a}))},700:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},249:(t,e,n)=>{var r=n(3206),i=n(3393),o=n(3377),s=Object.defineProperty;e.f=n(697)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(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}},3652:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3377:(t,e,n)=>{var r=n(700);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},4296:(t,e,n)=>{var r=n(4553);r(r.G,{global:n(1075)})},3079:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},3373:(t,e,n)=>{var r=n(9426);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},2802:(t,e,n)=>{var r=n(9739)("unscopables"),i=Array.prototype;null==i[r]&&n(8442)(i,r,{}),t.exports=function(t){i[r][t]=!0}},9959:(t,e,n)=>{"use strict";var r=n(7384)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},599:t=>{t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},9719:(t,e,n)=>{var r=n(7481);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},4893:(t,e,n)=>{"use strict";var r=n(4200),i=n(5044),o=n(1838);t.exports=[].copyWithin||function(t,e){var n=r(this),s=o(n.length),a=i(t,s),u=i(e,s),l=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===l?s:i(l,s))-u,s-a),h=1;for(u<a&&a<u+c&&(h=-1,u+=c-1,a+=c-1);c-- >0;)u in n?n[a]=n[u]:delete n[a],a+=h,u+=h;return n}},852:(t,e,n)=>{"use strict";var r=n(4200),i=n(5044),o=n(1838);t.exports=function(t){for(var e=r(this),n=o(e.length),s=arguments.length,a=i(s>1?arguments[1]:void 0,n),u=s>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>a;)e[a++]=t;return e}},1545:(t,e,n)=>{var r=n(8500),i=n(1838),o=n(5044);t.exports=function(t){return function(e,n,s){var a,u=r(e),l=i(u.length),c=o(s,l);if(t&&n!=n){for(;l>c;)if((a=u[c++])!=a)return!0}else for(;l>c;c++)if((t||c in u)&&u[c]===n)return t||c||0;return!t&&-1}}},6934:(t,e,n)=>{var r=n(2794),i=n(975),o=n(4200),s=n(1838),a=n(4087);t.exports=function(t,e){var n=1==t,u=2==t,l=3==t,c=4==t,h=6==t,f=5==t||h,p=e||a;return function(e,a,d){for(var m,v,g=o(e),y=i(g),b=r(a,d,3),_=s(y.length),w=0,x=n?p(e,_):u?p(e,0):void 0;_>w;w++)if((f||w in y)&&(v=b(m=y[w],w,g),t))if(n)x[w]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:x.push(m)}else if(c)return!1;return h?-1:l||c?c:x}}},9857:(t,e,n)=>{var r=n(3079),i=n(4200),o=n(975),s=n(1838);t.exports=function(t,e,n,a,u){r(e);var l=i(t),c=o(l),h=s(l.length),f=u?h-1:0,p=u?-1:1;if(n<2)for(;;){if(f in c){a=c[f],f+=p;break}if(f+=p,u?f<0:h<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:h>f;f+=p)f in c&&(a=e(a,c[f],f,l));return a}},4849:(t,e,n)=>{var r=n(7481),i=n(689),o=n(9739)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},4087:(t,e,n)=>{var r=n(4849);t.exports=function(t,e){return new(r(t))(e)}},6966:(t,e,n)=>{"use strict";var r=n(3079),i=n(7481),o=n(3534),s=[].slice,a={},u=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i<e;i++)r[i]="a["+i+"]";a[e]=Function("F,a","return new F("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=s.call(arguments,1),a=function(){var r=n.concat(s.call(arguments));return this instanceof a?u(e,r.length,r):o(e,r,t)};return i(e.prototype)&&(a.prototype=e.prototype),a}},2845:(t,e,n)=>{var r=n(9426),i=n(9739)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},9426:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},5144:(t,e,n)=>{"use strict";var r=n(3530).f,i=n(2545),o=n(4092),s=n(2794),a=n(599),u=n(2971),l=n(9121),c=n(8611),h=n(5993),f=n(1916),p=n(2153).fastKey,d=n(1603),m=f?"_s":"size",v=function(t,e){var n,r=p(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,l){var c=t((function(t,r){a(t,c,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,null!=r&&u(r,n,t[l],t)}));return o(c.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[m]=0},delete:function(t){var n=d(this,e),r=v(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){d(this,e);for(var n,r=s(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)}}),f&&r(c.prototype,"size",{get:function(){return d(this,e)[m]}}),c},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){l(t,e,(function(t,n){this._t=d(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?c(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,c(1))}),n?"entries":"values",!n,!0),h(e)}}},3503:(t,e,n)=>{"use strict";var r=n(4092),i=n(2153).getWeak,o=n(9719),s=n(7481),a=n(599),u=n(2971),l=n(6934),c=n(1063),h=n(1603),f=l(5),p=l(6),d=0,m=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return f(t.a,(function(t){return t[0]===e}))};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var l=t((function(t,r){a(t,l,e,"_i"),t._t=e,t._i=d++,t._l=void 0,null!=r&&u(r,n,t[o],t)}));return r(l.prototype,{delete:function(t){if(!s(t))return!1;var n=i(t);return!0===n?m(h(this,e)).delete(t):n&&c(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=i(t);return!0===n?m(h(this,e)).has(t):n&&c(n,this._i)}}),l},def:function(t,e,n){var r=i(o(e),!0);return!0===r?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},8091:(t,e,n)=>{"use strict";var r=n(6341),i=n(5366),o=n(1564),s=n(4092),a=n(2153),u=n(2971),l=n(599),c=n(7481),h=n(1240),f=n(1461),p=n(1309),d=n(4805);t.exports=function(t,e,n,m,v,g){var y=r[t],b=y,_=v?"set":"add",w=b&&b.prototype,x={},S=function(t){var e=w[t];o(w,t,"delete"==t||"has"==t?function(t){return!(g&&!c(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!c(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&&(g||w.forEach&&!h((function(){(new b).entries().next()})))){var T=new b,k=T[_](g?{}:-0,1)!=T,C=h((function(){T.has(1)})),O=f((function(t){new b(t)})),E=!g&&h((function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)}));O||((b=e((function(e,n){l(e,b,t);var r=d(new y,e,b);return null!=n&&u(n,v,r[_],r),r}))).prototype=w,w.constructor=b),(C||E)&&(S("delete"),S("has"),v&&S("get")),(E||k)&&S(_),g&&w.clear&&delete w.clear}else b=m.getConstructor(e,t,v,_),s(b.prototype,n),a.NEED=!0;return p(b,t),x[t]=b,i(i.G+i.W+i.F*(b!=y),x),g||m.setStrong(b,t,v),b}},4411:t=>{var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)},1676:(t,e,n)=>{"use strict";var r=n(3530),i=n(1761);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},2794:(t,e,n)=>{var r=n(3079);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,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},1792:(t,e,n)=>{"use strict";var r=n(1240),i=Date.prototype.getTime,o=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.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)+"-"+s(t.getUTCMonth()+1)+"-"+s(t.getUTCDate())+"T"+s(t.getUTCHours())+":"+s(t.getUTCMinutes())+":"+s(t.getUTCSeconds())+"."+(n>99?n:"0"+s(n))+"Z"}:o},7687:(t,e,n)=>{"use strict";var r=n(9719),i=n(9241),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),t!=o)}},3589:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},1916:(t,e,n)=>{t.exports=!n(1240)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},3383:(t,e,n)=>{var r=n(7481),i=n(6341).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},7590:t=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},4535:(t,e,n)=>{var r=n(5825),i=n(2520),o=n(1144);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var s,a=n(t),u=o.f,l=0;a.length>l;)u.call(t,s=a[l++])&&e.push(s);return e}},5366:(t,e,n)=>{var r=n(6341),i=n(4411),o=n(8442),s=n(1564),a=n(2794),u=function(t,e,n){var l,c,h,f,p=t&u.F,d=t&u.G,m=t&u.S,v=t&u.P,g=t&u.B,y=d?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,b=d?i:i[e]||(i[e]={}),_=b.prototype||(b.prototype={});for(l in d&&(n=e),n)h=((c=!p&&y&&void 0!==y[l])?y:n)[l],f=g&&c?a(h,r):v&&"function"==typeof h?a(Function.call,h):h,y&&s(y,l,h,t&u.U),b[l]!=h&&o(b,l,f),v&&_[l]!=h&&(_[l]=h)};r.core=i,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},6881:(t,e,n)=>{var r=n(9739)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},1240:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},5307:(t,e,n)=>{"use strict";n(8615);var r=n(1564),i=n(8442),o=n(1240),s=n(3589),a=n(9739),u=n(8868),l=a("species"),c=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),h=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 f=a(t),p=!o((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),d=p?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[f](""),!e})):void 0;if(!p||!d||"replace"===t&&!c||"split"===t&&!h){var m=/./[f],v=n(s,f,""[t],(function(t,e,n,r,i){return e.exec===u?p&&!i?{done:!0,value:m.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=v[0],y=v[1];r(String.prototype,t,g),i(RegExp.prototype,f,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},6439:(t,e,n)=>{"use strict";var r=n(9719);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}},3885:(t,e,n)=>{"use strict";var r=n(689),i=n(7481),o=n(1838),s=n(2794),a=n(9739)("isConcatSpreadable");t.exports=function t(e,n,u,l,c,h,f,p){for(var d,m,v=c,g=0,y=!!f&&s(f,p,3);g<l;){if(g in u){if(d=y?y(u[g],g,n):u[g],m=!1,i(d)&&(m=void 0!==(m=d[a])?!!m:r(d)),m&&h>0)v=t(e,n,d,o(d.length),v,h-1)-1;else{if(v>=9007199254740991)throw TypeError();e[v]=d}v++}g++}return v}},2971:(t,e,n)=>{var r=n(2794),i=n(5539),o=n(3894),s=n(9719),a=n(1838),u=n(8444),l={},c={},h=t.exports=function(t,e,n,h,f){var p,d,m,v,g=f?function(){return t}:u(t),y=r(n,h,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>b;b++)if((v=e?y(s(d=t[b])[0],d[1]):y(t[b]))===l||v===c)return v}else for(m=g.call(t);!(d=m.next()).done;)if((v=i(m,y,d.value,e))===l||v===c)return v};h.BREAK=l,h.RETURN=c},5979:(t,e,n)=>{t.exports=n(7355)("native-function-to-string",Function.toString)},6341:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},1063:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},8442:(t,e,n)=>{var r=n(3530),i=n(1761);t.exports=n(1916)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},6137:(t,e,n)=>{var r=n(6341).document;t.exports=r&&r.documentElement},4352:(t,e,n)=>{t.exports=!n(1916)&&!n(1240)((function(){return 7!=Object.defineProperty(n(3383)("div"),"a",{get:function(){return 7}}).a}))},4805:(t,e,n)=>{var r=n(7481),i=n(7135).set;t.exports=function(t,e,n){var o,s=e.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},3534:t=>{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)}},975:(t,e,n)=>{var r=n(9426);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},3894:(t,e,n)=>{var r=n(4919),i=n(9739)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},689:(t,e,n)=>{var r=n(9426);t.exports=Array.isArray||function(t){return"Array"==r(t)}},2289:(t,e,n)=>{var r=n(7481),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},7481:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},9543:(t,e,n)=>{var r=n(7481),i=n(9426),o=n(9739)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},5539:(t,e,n)=>{var r=n(9719);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},7938:(t,e,n)=>{"use strict";var r=n(2545),i=n(1761),o=n(1309),s={};n(8442)(s,n(9739)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(s,{next:i(1,n)}),o(t,e+" Iterator")}},9121:(t,e,n)=>{"use strict";var r=n(5113),i=n(5366),o=n(1564),s=n(8442),a=n(4919),u=n(7938),l=n(1309),c=n(4408),h=n(9739)("iterator"),f=!([].keys&&"next"in[].keys()),p="keys",d="values",m=function(){return this};t.exports=function(t,e,n,v,g,y,b){u(n,e,v);var _,w,x,S=function(t){if(!f&&t in O)return O[t];switch(t){case p:case d:return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",k=g==d,C=!1,O=t.prototype,E=O[h]||O["@@iterator"]||g&&O[g],A=E||S(g),P=g?k?S("entries"):A:void 0,I="Array"==e&&O.entries||E;if(I&&(x=c(I.call(new t)))!==Object.prototype&&x.next&&(l(x,T,!0),r||"function"==typeof x[h]||s(x,h,m)),k&&E&&E.name!==d&&(C=!0,A=function(){return E.call(this)}),r&&!b||!f&&!C&&O[h]||s(O,h,A),a[e]=A,a[T]=m,g)if(_={values:k?A:S(d),keys:y?A:S(p),entries:P},b)for(w in _)w in O||o(O,w,_[w]);else i(i.P+i.F*(f||C),e,_);return _}},1461:(t,e,n)=>{var r=n(9739)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},8611:t=>{t.exports=function(t,e){return{value:e,done:!!t}}},4919:t=>{t.exports={}},5113:t=>{t.exports=!1},7117:t=>{var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},9396:(t,e,n)=>{var r=n(4247),i=Math.pow,o=i(2,-52),s=i(2,-23),a=i(2,127)*(2-s),u=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),l=r(t);return i<u?l*(i/u/s+1/o-1/o)*u*s:(n=(e=(1+s/o)*i)-(e-i))>a||n!=n?l*(1/0):l*n}},9007:t=>{t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},4247:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},2153:(t,e,n)=>{var r=n(430)("meta"),i=n(7481),o=n(1063),s=n(3530).f,a=0,u=Object.isExtensible||function(){return!0},l=!n(1240)((function(){return u(Object.preventExtensions({}))})),c=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},h=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";c(t)}return t[r].i},getWeak:function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;c(t)}return t[r].w},onFreeze:function(t){return l&&h.NEED&&u(t)&&!o(t,r)&&c(t),t}}},37:(t,e,n)=>{var r=n(6341),i=n(7122).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(9426)(s);t.exports=function(){var t,e,n,l=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var c=a.resolve(void 0);n=function(){c.then(l)}}else n=function(){i.call(r,l)};else{var h=!0,f=document.createTextNode("");new o(l).observe(f,{characterData:!0}),n=function(){f.data=h=!h}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},3285:(t,e,n)=>{"use strict";var r=n(3079);function i(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 i(t)}},9821:(t,e,n)=>{"use strict";var r=n(1916),i=n(5825),o=n(2520),s=n(1144),a=n(4200),u=n(975),l=Object.assign;t.exports=!l||n(1240)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=r}))?function(t,e){for(var n=a(t),l=arguments.length,c=1,h=o.f,f=s.f;l>c;)for(var p,d=u(arguments[c++]),m=h?i(d).concat(h(d)):i(d),v=m.length,g=0;v>g;)p=m[g++],r&&!f.call(d,p)||(n[p]=d[p]);return n}:l},2545:(t,e,n)=>{var r=n(9719),i=n(413),o=n(7590),s=n(3548)("IE_PROTO"),a=function(){},u=function(){var t,e=n(3383)("iframe"),r=o.length;for(e.style.display="none",n(6137).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[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:i(n,e)}},3530:(t,e,n)=>{var r=n(9719),i=n(4352),o=n(9241),s=Object.defineProperty;e.f=n(1916)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(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}},413:(t,e,n)=>{var r=n(3530),i=n(9719),o=n(5825);t.exports=n(1916)?Object.defineProperties:function(t,e){i(t);for(var n,s=o(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},7762:(t,e,n)=>{var r=n(1144),i=n(1761),o=n(8500),s=n(9241),a=n(1063),u=n(4352),l=Object.getOwnPropertyDescriptor;e.f=n(1916)?l:function(t,e){if(t=o(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(a(t,e))return i(!r.f.call(t,e),t[e])}},5009:(t,e,n)=>{var r=n(8500),i=n(4230).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return s.slice()}}(t):i(r(t))}},4230:(t,e,n)=>{var r=n(2851),i=n(7590).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},2520:(t,e)=>{e.f=Object.getOwnPropertySymbols},4408:(t,e,n)=>{var r=n(1063),i=n(4200),o=n(3548)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},2851:(t,e,n)=>{var r=n(1063),i=n(8500),o=n(1545)(!1),s=n(3548)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,l=[];for(n in a)n!=s&&r(a,n)&&l.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~o(l,n)||l.push(n));return l}},5825:(t,e,n)=>{var r=n(2851),i=n(7590);t.exports=Object.keys||function(t){return r(t,i)}},1144:(t,e)=>{e.f={}.propertyIsEnumerable},1025:(t,e,n)=>{var r=n(5366),i=n(4411),o=n(1240);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",s)}},5346:(t,e,n)=>{var r=n(1916),i=n(5825),o=n(8500),s=n(1144).f;t.exports=function(t){return function(e){for(var n,a=o(e),u=i(a),l=u.length,c=0,h=[];l>c;)n=u[c++],r&&!s.call(a,n)||h.push(t?[n,a[n]]:a[n]);return h}}},7285:(t,e,n)=>{var r=n(4230),i=n(2520),o=n(9719),s=n(6341).Reflect;t.exports=s&&s.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},3765:(t,e,n)=>{var r=n(6341).parseFloat,i=n(7370).trim;t.exports=1/r(n(8275)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},500:(t,e,n)=>{var r=n(6341).parseInt,i=n(7370).trim,o=n(8275),s=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(s.test(n)?16:10))}:r},8332:t=>{t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},8614:(t,e,n)=>{var r=n(9719),i=n(7481),o=n(3285);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},1761:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4092:(t,e,n)=>{var r=n(1564);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},1564:(t,e,n)=>{var r=n(6341),i=n(8442),o=n(1063),s=n(430)("src"),a=n(5979),u="toString",l=(""+a).split(u);n(4411).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,s)||i(n,s,t[e]?""+t[e]:l.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[s]||a.call(this)}))},9073:(t,e,n)=>{"use strict";var r=n(2845),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},8868:(t,e,n)=>{"use strict";var r,i,o=n(6439),s=RegExp.prototype.exec,a=String.prototype.replace,u=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(t){var e,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(e=u.lastIndex),r=s.call(u,t),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),c&&r&&r.length>1&&a.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=u},1541:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},7135:(t,e,n)=>{var r=n(7481),i=n(9719),o=function(t,e){if(i(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(2794)(Function.call,n(7762).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},5993:(t,e,n)=>{"use strict";var r=n(6341),i=n(3530),o=n(1916),s=n(9739)("species");t.exports=function(t){var e=r[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},1309:(t,e,n)=>{var r=n(3530).f,i=n(1063),o=n(9739)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},3548:(t,e,n)=>{var r=n(7355)("keys"),i=n(430);t.exports=function(t){return r[t]||(r[t]=i(t))}},7355:(t,e,n)=>{var r=n(4411),i=n(6341),o="__core-js_shared__",s=i[o]||(i[o]={});(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(5113)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},9789:(t,e,n)=>{var r=n(9719),i=n(3079),o=n(9739)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},5139:(t,e,n)=>{"use strict";var r=n(1240);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},7384:(t,e,n)=>{var r=n(1549),i=n(3589);t.exports=function(t){return function(e,n){var o,s,a=String(i(e)),u=r(n),l=a.length;return u<0||u>=l?t?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===l||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):o:t?a.slice(u,u+2):s-56320+(o-55296<<10)+65536}}},3256:(t,e,n)=>{var r=n(9543),i=n(3589);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},9048:(t,e,n)=>{var r=n(5366),i=n(1240),o=n(3589),s=/"/g,a=function(t,e,n,r){var i=String(o(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(s,""")+'"'),a+">"+i+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},9823:(t,e,n)=>{var r=n(1838),i=n(5),o=n(3589);t.exports=function(t,e,n,s){var a=String(o(t)),u=a.length,l=void 0===n?" ":String(n),c=r(e);if(c<=u||""==l)return a;var h=c-u,f=i.call(l,Math.ceil(h/l.length));return f.length>h&&(f=f.slice(0,h)),s?f+a:a+f}},5:(t,e,n)=>{"use strict";var r=n(1549),i=n(3589);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},7370:(t,e,n)=>{var r=n(5366),i=n(3589),o=n(1240),s=n(8275),a="["+s+"]",u=RegExp("^"+a+a+"*"),l=RegExp(a+a+"*$"),c=function(t,e,n){var i={},a=o((function(){return!!s[t]()||"
"!="
"[t]()})),u=i[t]=a?e(h):s[t];n&&(i[n]=u),r(r.P+r.F*a,"String",i)},h=c.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(l,"")),t};t.exports=c},8275:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7122:(t,e,n)=>{var r,i,o,s=n(2794),a=n(3534),u=n(6137),l=n(3383),c=n(6341),h=c.process,f=c.setImmediate,p=c.clearImmediate,d=c.MessageChannel,m=c.Dispatch,v=0,g={},y="onreadystatechange",b=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},_=function(t){b.call(t.data)};f&&p||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++v]=function(){a("function"==typeof t?t:Function(t),e)},r(v),v},p=function(t){delete g[t]},"process"==n(9426)(h)?r=function(t){h.nextTick(s(b,t,1))}:m&&m.now?r=function(t){m.now(s(b,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=_,r=s(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(t){c.postMessage(t+"","*")},c.addEventListener("message",_,!1)):r=y in l("script")?function(t){u.appendChild(l("script")).onreadystatechange=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(s(b,t,1),0)}),t.exports={set:f,clear:p}},5044:(t,e,n)=>{var r=n(1549),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},9707:(t,e,n)=>{var r=n(1549),i=n(1838);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},1549:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},8500:(t,e,n)=>{var r=n(975),i=n(3589);t.exports=function(t){return r(i(t))}},1838:(t,e,n)=>{var r=n(1549),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},4200:(t,e,n)=>{var r=n(3589);t.exports=function(t){return Object(r(t))}},9241:(t,e,n)=>{var r=n(7481);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},8754:(t,e,n)=>{"use strict";if(n(1916)){var r=n(5113),i=n(6341),o=n(1240),s=n(5366),a=n(7728),u=n(9895),l=n(2794),c=n(599),h=n(1761),f=n(8442),p=n(4092),d=n(1549),m=n(1838),v=n(9707),g=n(5044),y=n(9241),b=n(1063),_=n(2845),w=n(7481),x=n(4200),S=n(3894),T=n(2545),k=n(4408),C=n(4230).f,O=n(8444),E=n(430),A=n(9739),P=n(6934),I=n(1545),M=n(9789),D=n(1308),N=n(4919),R=n(1461),j=n(5993),F=n(852),V=n(4893),L=n(3530),z=n(7762),q=L.f,B=z.f,U=i.RangeError,$=i.TypeError,W=i.Uint8Array,H="ArrayBuffer",K="SharedArrayBuffer",G="BYTES_PER_ELEMENT",Z=Array.prototype,X=u.ArrayBuffer,Y=u.DataView,Q=P(0),J=P(2),tt=P(3),et=P(4),nt=P(5),rt=P(6),it=I(!0),ot=I(!1),st=D.values,at=D.keys,ut=D.entries,lt=Z.lastIndexOf,ct=Z.reduce,ht=Z.reduceRight,ft=Z.join,pt=Z.sort,dt=Z.slice,mt=Z.toString,vt=Z.toLocaleString,gt=A("iterator"),yt=A("toStringTag"),bt=E("typed_constructor"),_t=E("def_constructor"),wt=a.CONSTR,xt=a.TYPED,St=a.VIEW,Tt="Wrong length!",kt=P(1,(function(t,e){return Pt(M(t,t[_t]),e)})),Ct=o((function(){return 1===new W(new Uint16Array([1]).buffer)[0]})),Ot=!!W&&!!W.prototype.set&&o((function(){new W(1).set({})})),Et=function(t,e){var n=d(t);if(n<0||n%e)throw U("Wrong offset!");return n},At=function(t){if(w(t)&&xt in t)return t;throw $(t+" is not a typed array!")},Pt=function(t,e){if(!w(t)||!(bt in t))throw $("It is not a typed array constructor!");return new t(e)},It=function(t,e){return Mt(M(t,t[_t]),e)},Mt=function(t,e){for(var n=0,r=e.length,i=Pt(t,r);r>n;)i[n]=e[n++];return i},Dt=function(t,e,n){q(t,e,{get:function(){return this._d[n]}})},Nt=function(t){var e,n,r,i,o,s,a=x(t),u=arguments.length,c=u>1?arguments[1]:void 0,h=void 0!==c,f=O(a);if(null!=f&&!S(f)){for(s=f.call(a),r=[],e=0;!(o=s.next()).done;e++)r.push(o.value);a=r}for(h&&u>2&&(c=l(c,arguments[2],2)),e=0,n=m(a.length),i=Pt(this,n);n>e;e++)i[e]=h?c(a[e],e):a[e];return i},Rt=function(){for(var t=0,e=arguments.length,n=Pt(this,e);e>t;)n[t]=arguments[t++];return n},jt=!!W&&o((function(){vt.call(new W(1))})),Ft=function(){return vt.apply(jt?dt.call(At(this)):At(this),arguments)},Vt={copyWithin:function(t,e){return V.call(At(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return et(At(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return F.apply(At(this),arguments)},filter:function(t){return It(this,J(At(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(At(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return rt(At(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(At(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return ot(At(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(At(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ft.apply(At(this),arguments)},lastIndexOf:function(t){return lt.apply(At(this),arguments)},map:function(t){return kt(At(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(At(this),arguments)},reduceRight:function(t){return ht.apply(At(this),arguments)},reverse:function(){for(var t,e=this,n=At(e).length,r=Math.floor(n/2),i=0;i<r;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return tt(At(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(At(this),t)},subarray:function(t,e){var n=At(this),r=n.length,i=g(t,r);return new(M(n,n[_t]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:g(e,r))-i))}},Lt=function(t,e){return It(this,dt.call(At(this),t,e))},zt=function(t){At(this);var e=Et(arguments[1],1),n=this.length,r=x(t),i=m(r.length),o=0;if(i+e>n)throw U(Tt);for(;o<i;)this[e+o]=r[o++]},qt={entries:function(){return ut.call(At(this))},keys:function(){return at.call(At(this))},values:function(){return st.call(At(this))}},Bt=function(t,e){return w(t)&&t[xt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ut=function(t,e){return Bt(t,e=y(e,!0))?h(2,t[e]):B(t,e)},$t=function(t,e,n){return!(Bt(t,e=y(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?q(t,e,n):(t[e]=n.value,t)};wt||(z.f=Ut,L.f=$t),s(s.S+s.F*!wt,"Object",{getOwnPropertyDescriptor:Ut,defineProperty:$t}),o((function(){mt.call({})}))&&(mt=vt=function(){return ft.call(this)});var Wt=p({},Vt);p(Wt,qt),f(Wt,gt,qt.values),p(Wt,{slice:Lt,set:zt,constructor:function(){},toString:mt,toLocaleString:Ft}),Dt(Wt,"buffer","b"),Dt(Wt,"byteOffset","o"),Dt(Wt,"byteLength","l"),Dt(Wt,"length","e"),q(Wt,yt,{get:function(){return this[xt]}}),t.exports=function(t,e,n,u){var l=t+((u=!!u)?"Clamped":"")+"Array",h="get"+t,p="set"+t,d=i[l],g=d||{},y=d&&k(d),b=!d||!a.ABV,x={},S=d&&d.prototype,O=function(t,n){q(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[h](n*e+r.o,Ct)}(this,n)},set:function(t){return function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*e+i.o,r,Ct)}(this,n,t)},enumerable:!0})};b?(d=n((function(t,n,r,i){c(t,d,l,"_d");var o,s,a,u,h=0,p=0;if(w(n)){if(!(n instanceof X||(u=_(n))==H||u==K))return xt in n?Mt(d,n):Nt.call(d,n);o=n,p=Et(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw U(Tt);if((s=g-p)<0)throw U(Tt)}else if((s=m(i)*e)+p>g)throw U(Tt);a=s/e}else a=v(n),o=new X(s=a*e);for(f(t,"_d",{b:o,o:p,l:s,e:a,v:new Y(o)});h<a;)O(t,h++)})),S=d.prototype=T(Wt),f(S,"constructor",d)):o((function(){d(1)}))&&o((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,i){var o;return c(t,d,l),w(n)?n instanceof X||(o=_(n))==H||o==K?void 0!==i?new g(n,Et(r,e),i):void 0!==r?new g(n,Et(r,e)):new g(n):xt in n?Mt(d,n):Nt.call(d,n):new g(v(n))})),Q(y!==Function.prototype?C(g).concat(C(y)):C(g),(function(t){t in d||f(d,t,g[t])})),d.prototype=S,r||(S.constructor=d));var E=S[gt],A=!!E&&("values"==E.name||null==E.name),P=qt.values;f(d,bt,!0),f(S,xt,l),f(S,St,!0),f(S,_t,d),(u?new d(1)[yt]==l:yt in S)||q(S,yt,{get:function(){return l}}),x[l]=d,s(s.G+s.W+s.F*(d!=g),x),s(s.S,l,{BYTES_PER_ELEMENT:e}),s(s.S+s.F*o((function(){g.of.call(d,1)})),l,{from:Nt,of:Rt}),G in S||f(S,G,e),s(s.P,l,Vt),j(l),s(s.P+s.F*Ot,l,{set:zt}),s(s.P+s.F*!A,l,qt),r||S.toString==mt||(S.toString=mt),s(s.P+s.F*o((function(){new d(1).slice()})),l,{slice:Lt}),s(s.P+s.F*(o((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!o((function(){S.toLocaleString.call([1,2])}))),l,{toLocaleString:Ft}),N[l]=A?E:P,r||A||f(S,gt,P)}}else t.exports=function(){}},9895:(t,e,n)=>{"use strict";var r=n(6341),i=n(1916),o=n(5113),s=n(7728),a=n(8442),u=n(4092),l=n(1240),c=n(599),h=n(1549),f=n(1838),p=n(9707),d=n(4230).f,m=n(3530).f,v=n(852),g=n(1309),y="ArrayBuffer",b="DataView",_="Wrong index!",w=r.ArrayBuffer,x=r.DataView,S=r.Math,T=r.RangeError,k=r.Infinity,C=w,O=S.abs,E=S.pow,A=S.floor,P=S.log,I=S.LN2,M="buffer",D="byteLength",N="byteOffset",R=i?"_b":M,j=i?"_l":D,F=i?"_o":N;function V(t,e,n){var r,i,o,s=new Array(n),a=8*n-e-1,u=(1<<a)-1,l=u>>1,c=23===e?E(2,-24)-E(2,-77):0,h=0,f=t<0||0===t&&1/t<0?1:0;for((t=O(t))!=t||t===k?(i=t!=t?1:0,r=u):(r=A(P(t)/I),t*(o=E(2,-r))<1&&(r--,o*=2),(t+=r+l>=1?c/o:c*E(2,1-l))*o>=2&&(r++,o/=2),r+l>=u?(i=0,r=u):r+l>=1?(i=(t*o-1)*E(2,e),r+=l):(i=t*E(2,l-1)*E(2,e),r=0));e>=8;s[h++]=255&i,i/=256,e-=8);for(r=r<<e|i,a+=e;a>0;s[h++]=255&r,r/=256,a-=8);return s[--h]|=128*f,s}function L(t,e,n){var r,i=8*n-e-1,o=(1<<i)-1,s=o>>1,a=i-7,u=n-1,l=t[u--],c=127&l;for(l>>=7;a>0;c=256*c+t[u],u--,a-=8);for(r=c&(1<<-a)-1,c>>=-a,a+=e;a>0;r=256*r+t[u],u--,a-=8);if(0===c)c=1-s;else{if(c===o)return r?NaN:l?-k:k;r+=E(2,e),c-=s}return(l?-1:1)*r*E(2,c-e)}function z(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function q(t){return[255&t]}function B(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function $(t){return V(t,52,8)}function W(t){return V(t,23,4)}function H(t,e,n){m(t.prototype,e,{get:function(){return this[n]}})}function K(t,e,n,r){var i=p(+n);if(i+e>t[j])throw T(_);var o=t[R]._b,s=i+t[F],a=o.slice(s,s+e);return r?a:a.reverse()}function G(t,e,n,r,i,o){var s=p(+n);if(s+e>t[j])throw T(_);for(var a=t[R]._b,u=s+t[F],l=r(+i),c=0;c<e;c++)a[u+c]=l[o?c:e-c-1]}if(s.ABV){if(!l((function(){w(1)}))||!l((function(){new w(-1)}))||l((function(){return new w,new w(1.5),new w(NaN),w.name!=y}))){for(var Z,X=(w=function(t){return c(this,w),new C(p(t))}).prototype=C.prototype,Y=d(C),Q=0;Y.length>Q;)(Z=Y[Q++])in w||a(w,Z,C[Z]);o||(X.constructor=w)}var J=new x(new w(2)),tt=x.prototype.setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||u(x.prototype,{setInt8:function(t,e){tt.call(this,t,e<<24>>24)},setUint8:function(t,e){tt.call(this,t,e<<24>>24)}},!0)}else w=function(t){c(this,w,y);var e=p(t);this._b=v.call(new Array(e),0),this[j]=e},x=function(t,e,n){c(this,x,b),c(t,w,b);var r=t[j],i=h(e);if(i<0||i>r)throw T("Wrong offset!");if(i+(n=void 0===n?r-i:f(n))>r)throw T("Wrong length!");this[R]=t,this[F]=i,this[j]=n},i&&(H(w,D,"_l"),H(x,M,"_b"),H(x,D,"_l"),H(x,N,"_o")),u(x.prototype,{getInt8:function(t){return K(this,1,t)[0]<<24>>24},getUint8:function(t){return K(this,1,t)[0]},getInt16:function(t){var e=K(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=K(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return z(K(this,4,t,arguments[1]))},getUint32:function(t){return z(K(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return L(K(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return L(K(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,q,e)},setUint8:function(t,e){G(this,1,t,q,e)},setInt16:function(t,e){G(this,2,t,B,e,arguments[2])},setUint16:function(t,e){G(this,2,t,B,e,arguments[2])},setInt32:function(t,e){G(this,4,t,U,e,arguments[2])},setUint32:function(t,e){G(this,4,t,U,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,W,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,$,e,arguments[2])}});g(w,y),g(x,b),a(x.prototype,s.VIEW,!0),e.ArrayBuffer=w,e.DataView=x},7728:(t,e,n)=>{for(var r,i=n(6341),o=n(8442),s=n(430),a=s("typed_array"),u=s("view"),l=!(!i.ArrayBuffer||!i.DataView),c=l,h=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(r=i[f[h++]])?(o(r.prototype,a,!0),o(r.prototype,u,!0)):c=!1;t.exports={ABV:l,CONSTR:c,TYPED:a,VIEW:u}},430:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+n).toString(36))}},3843:(t,e,n)=>{var r=n(6341).navigator;t.exports=r&&r.userAgent||""},1603:(t,e,n)=>{var r=n(7481);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},8155:(t,e,n)=>{var r=n(6341),i=n(4411),o=n(5113),s=n(8833),a=n(3530).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},8833:(t,e,n)=>{e.f=n(9739)},9739:(t,e,n)=>{var r=n(7355)("wks"),i=n(430),o=n(6341).Symbol,s="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=r},8444:(t,e,n)=>{var r=n(2845),i=n(9739)("iterator"),o=n(4919);t.exports=n(4411).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},1412:(t,e,n)=>{var r=n(5366);r(r.P,"Array",{copyWithin:n(4893)}),n(2802)("copyWithin")},5943:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(4);r(r.P+r.F*!n(5139)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},360:(t,e,n)=>{var r=n(5366);r(r.P,"Array",{fill:n(852)}),n(2802)("fill")},3352:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(2);r(r.P+r.F*!n(5139)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},3118:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(6),o="findIndex",s=!0;o in[]&&Array(1)[o]((function(){s=!1})),r(r.P+r.F*s,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(2802)(o)},8394:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(5),o="find",s=!0;o in[]&&Array(1).find((function(){s=!1})),r(r.P+r.F*s,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(2802)(o)},9106:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(0),o=n(5139)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},5271:(t,e,n)=>{"use strict";var r=n(2794),i=n(5366),o=n(4200),s=n(5539),a=n(3894),u=n(1838),l=n(1676),c=n(8444);i(i.S+i.F*!n(1461)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,f=o(t),p="function"==typeof this?this:Array,d=arguments.length,m=d>1?arguments[1]:void 0,v=void 0!==m,g=0,y=c(f);if(v&&(m=r(m,d>2?arguments[2]:void 0,2)),null==y||p==Array&&a(y))for(n=new p(e=u(f.length));e>g;g++)l(n,g,v?m(f[g],g):f[g]);else for(h=y.call(f),n=new p;!(i=h.next()).done;g++)l(n,g,v?s(h,m,[i.value,g],!0):i.value);return n.length=g,n}})},6174:(t,e,n)=>{"use strict";var r=n(5366),i=n(1545)(!1),o=[].indexOf,s=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(s||!n(5139)(o)),"Array",{indexOf:function(t){return s?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},160:(t,e,n)=>{var r=n(5366);r(r.S,"Array",{isArray:n(689)})},1308:(t,e,n)=>{"use strict";var r=n(2802),i=n(8611),o=n(4919),s=n(8500);t.exports=n(9121)(Array,"Array",(function(t,e){this._t=s(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,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},2523:(t,e,n)=>{"use strict";var r=n(5366),i=n(8500),o=[].join;r(r.P+r.F*(n(975)!=Object||!n(5139)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},6975:(t,e,n)=>{"use strict";var r=n(5366),i=n(8500),o=n(1549),s=n(1838),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(5139)(a)),"Array",{lastIndexOf:function(t){if(u)return a.apply(this,arguments)||0;var e=i(this),n=s(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},9139:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(1);r(r.P+r.F*!n(5139)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},8221:(t,e,n)=>{"use strict";var r=n(5366),i=n(1676);r(r.S+r.F*n(1240)((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;)i(n,t,arguments[t++]);return n.length=e,n}})},8292:(t,e,n)=>{"use strict";var r=n(5366),i=n(9857);r(r.P+r.F*!n(5139)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},9483:(t,e,n)=>{"use strict";var r=n(5366),i=n(9857);r(r.P+r.F*!n(5139)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},5441:(t,e,n)=>{"use strict";var r=n(5366),i=n(6137),o=n(9426),s=n(5044),a=n(1838),u=[].slice;r(r.P+r.F*n(1240)((function(){i&&u.call(i)})),"Array",{slice:function(t,e){var n=a(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=s(t,n),l=s(e,n),c=a(l-i),h=new Array(c),f=0;f<c;f++)h[f]="String"==r?this.charAt(i+f):this[i+f];return h}})},3289:(t,e,n)=>{"use strict";var r=n(5366),i=n(6934)(3);r(r.P+r.F*!n(5139)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},8375:(t,e,n)=>{"use strict";var r=n(5366),i=n(3079),o=n(4200),s=n(1240),a=[].sort,u=[1,2,3];r(r.P+r.F*(s((function(){u.sort(void 0)}))||!s((function(){u.sort(null)}))||!n(5139)(a)),"Array",{sort:function(t){return void 0===t?a.call(o(this)):a.call(o(this),i(t))}})},8772:(t,e,n)=>{n(5993)("Array")},2338:(t,e,n)=>{var r=n(5366);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},1575:(t,e,n)=>{var r=n(5366),i=n(1792);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},641:(t,e,n)=>{"use strict";var r=n(5366),i=n(4200),o=n(9241);r(r.P+r.F*n(1240)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},1033:(t,e,n)=>{var r=n(9739)("toPrimitive"),i=Date.prototype;r in i||n(8442)(i,r,n(7687))},5611:(t,e,n)=>{var r=Date.prototype,i="Invalid Date",o="toString",s=r.toString,a=r.getTime;new Date(NaN)+""!=i&&n(1564)(r,o,(function(){var t=a.call(this);return t==t?s.call(this):i}))},8769:(t,e,n)=>{var r=n(5366);r(r.P,"Function",{bind:n(6966)})},9383:(t,e,n)=>{"use strict";var r=n(7481),i=n(4408),o=n(9739)("hasInstance"),s=Function.prototype;o in s||n(3530).f(s,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},729:(t,e,n)=>{var r=n(3530).f,i=Function.prototype,o=/^\s*function ([^ (]*)/,s="name";s in i||n(1916)&&r(i,s,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},2509:(t,e,n)=>{"use strict";var r=n(5144),i=n(1603),o="Map";t.exports=n(8091)(o,(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(i(this,o),t);return e&&e.v},set:function(t,e){return r.def(i(this,o),0===t?0:t,e)}},r,!0)},2372:(t,e,n)=>{var r=n(5366),i=n(9007),o=Math.sqrt,s=Math.acosh;r(r.S+r.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))&&s(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},511:(t,e,n)=>{var r=n(5366),i=Math.asinh;r(r.S+r.F*!(i&&1/i(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}})},6781:(t,e,n)=>{var r=n(5366),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},4434:(t,e,n)=>{var r=n(5366),i=n(4247);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},4783:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},5521:(t,e,n)=>{var r=n(5366),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},4093:(t,e,n)=>{var r=n(5366),i=n(7117);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},6378:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{fround:n(9396)})},2380:(t,e,n)=>{var r=n(5366),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,s=0,a=arguments.length,u=0;s<a;)u<(n=i(arguments[s++]))?(o=o*(r=u/n)*r+1,u=n):o+=n>0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},2803:(t,e,n)=>{var r=n(5366),i=Math.imul;r(r.S+r.F*n(1240)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,s=n&i;return 0|o*s+((n&r>>>16)*s+o*(n&i>>>16)<<16>>>0)}})},3725:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},7977:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{log1p:n(9007)})},4192:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},2940:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{sign:n(4247)})},5731:(t,e,n)=>{var r=n(5366),i=n(7117),o=Math.exp;r(r.S+r.F*n(1240)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},9382:(t,e,n)=>{var r=n(5366),i=n(7117),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},8877:(t,e,n)=>{var r=n(5366);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},348:(t,e,n)=>{"use strict";var r=n(6341),i=n(1063),o=n(9426),s=n(4805),a=n(9241),u=n(1240),l=n(4230).f,c=n(7762).f,h=n(3530).f,f=n(7370).trim,p="Number",d=r.Number,m=d,v=d.prototype,g=o(n(2545)(v))==p,y="trim"in String.prototype,b=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=y?e.trim():f(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var s,u=e.slice(2),l=0,c=u.length;l<c;l++)if((s=u.charCodeAt(l))<48||s>i)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(g?u((function(){v.valueOf.call(n)})):o(n)!=p)?s(new m(b(e)),n,d):b(e)};for(var _,w=n(1916)?l(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)i(m,_=w[x])&&!i(d,_)&&h(d,_,c(m,_));d.prototype=v,v.constructor=d,n(1564)(r,p,d)}},4007:(t,e,n)=>{var r=n(5366);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},7616:(t,e,n)=>{var r=n(5366),i=n(6341).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},6762:(t,e,n)=>{var r=n(5366);r(r.S,"Number",{isInteger:n(2289)})},3316:(t,e,n)=>{var r=n(5366);r(r.S,"Number",{isNaN:function(t){return t!=t}})},3019:(t,e,n)=>{var r=n(5366),i=n(2289),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},293:(t,e,n)=>{var r=n(5366);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},640:(t,e,n)=>{var r=n(5366);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},6589:(t,e,n)=>{var r=n(5366),i=n(3765);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},3210:(t,e,n)=>{var r=n(5366),i=n(500);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},1028:(t,e,n)=>{"use strict";var r=n(5366),i=n(1549),o=n(3373),s=n(5),a=1..toFixed,u=Math.floor,l=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",h="0",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*l[n],l[n]=r%1e7,r=u(r/1e7)},p=function(t){for(var e=6,n=0;--e>=0;)n+=l[e],l[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==l[t]){var n=String(l[t]);e=""===e?n:e+s.call(h,7-n.length)+n}return e},m=function(t,e,n){return 0===e?n:e%2==1?m(t,e-1,n*t):m(t*t,e/2,n)};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(1240)((function(){a.call({})}))),"Number",{toFixed:function(t){var e,n,r,a,u=o(this,c),l=i(t),v="",g=h;if(l<0||l>20)throw RangeError(c);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(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*m(2,69,1))-69,n=e<0?u*m(2,-e,1):u/m(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=l;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=e-1;r>=23;)p(1<<23),r-=23;p(1<<r),f(1,1),p(2),g=d()}else f(0,n),f(1<<-e,0),g=d()+s.call(h,l);return g=l>0?v+((a=g.length)<=l?"0."+s.call(h,l-a)+g:g.slice(0,a-l)+"."+g.slice(a-l)):v+g}})},2610:(t,e,n)=>{"use strict";var r=n(5366),i=n(1240),o=n(3373),s=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==s.call(1,void 0)}))||!i((function(){s.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},8325:(t,e,n)=>{var r=n(5366);r(r.S+r.F,"Object",{assign:n(9821)})},7944:(t,e,n)=>{var r=n(5366);r(r.S,"Object",{create:n(2545)})},266:(t,e,n)=>{var r=n(5366);r(r.S+r.F*!n(1916),"Object",{defineProperties:n(413)})},5388:(t,e,n)=>{var r=n(5366);r(r.S+r.F*!n(1916),"Object",{defineProperty:n(3530).f})},192:(t,e,n)=>{var r=n(7481),i=n(2153).onFreeze;n(1025)("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},7557:(t,e,n)=>{var r=n(8500),i=n(7762).f;n(1025)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},4943:(t,e,n)=>{n(1025)("getOwnPropertyNames",(function(){return n(5009).f}))},3386:(t,e,n)=>{var r=n(4200),i=n(4408);n(1025)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},4649:(t,e,n)=>{var r=n(7481);n(1025)("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},6736:(t,e,n)=>{var r=n(7481);n(1025)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},7260:(t,e,n)=>{var r=n(7481);n(1025)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},2798:(t,e,n)=>{var r=n(5366);r(r.S,"Object",{is:n(1541)})},81:(t,e,n)=>{var r=n(4200),i=n(5825);n(1025)("keys",(function(){return function(t){return i(r(t))}}))},7026:(t,e,n)=>{var r=n(7481),i=n(2153).onFreeze;n(1025)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},4371:(t,e,n)=>{var r=n(7481),i=n(2153).onFreeze;n(1025)("seal",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},6911:(t,e,n)=>{var r=n(5366);r(r.S,"Object",{setPrototypeOf:n(7135).set})},4394:(t,e,n)=>{"use strict";var r=n(2845),i={};i[n(9739)("toStringTag")]="z",i+""!="[object z]"&&n(1564)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},5072:(t,e,n)=>{var r=n(5366),i=n(3765);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},9315:(t,e,n)=>{var r=n(5366),i=n(500);r(r.G+r.F*(parseInt!=i),{parseInt:i})},2813:(t,e,n)=>{"use strict";var r,i,o,s,a=n(5113),u=n(6341),l=n(2794),c=n(2845),h=n(5366),f=n(7481),p=n(3079),d=n(599),m=n(2971),v=n(9789),g=n(7122).set,y=n(37)(),b=n(3285),_=n(8332),w=n(3843),x=n(8614),S="Promise",T=u.TypeError,k=u.process,C=k&&k.versions,O=C&&C.v8||"",E=u.Promise,A="process"==c(k),P=function(){},I=i=b.f,M=!!function(){try{var t=E.resolve(1),e=(t.constructor={})[n(9739)("species")]=function(t){t(P,P)};return(A||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==O.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),D=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},N=function(t,e){if(!t._n){t._n=!0;var n=t._c;y((function(){for(var r=t._v,i=1==t._s,o=0,s=function(e){var n,o,s,a=i?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{a?(i||(2==t._h&&F(t),t._h=1),!0===a?n=r:(c&&c.enter(),n=a(r),c&&(c.exit(),s=!0)),n===e.promise?l(T("Promise-chain cycle")):(o=D(n))?o.call(n,u,l):u(n)):l(r)}catch(t){c&&!s&&c.exit(),l(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&R(t)}))}},R=function(t){g.call(u,(function(){var e,n,r,i=t._v,o=j(t);if(o&&(e=_((function(){A?k.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=A||j(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},j=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){g.call(u,(function(){var e;A?k.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},V=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()),N(e,!0))},L=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw T("Promise can't be resolved itself");(e=D(t))?y((function(){var r={_w:n,_d:!1};try{e.call(t,l(L,r,1),l(V,r,1))}catch(t){V.call(r,t)}})):(n._v=t,n._s=1,N(n,!1))}catch(t){V.call({_w:n,_d:!1},t)}}};M||(E=function(t){d(this,E,S,"_h"),p(t),r.call(this);try{t(l(L,this,1),l(V,this,1))}catch(t){V.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(4092)(E.prototype,{then:function(t,e){var n=I(v(this,E));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=A?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=l(L,t,1),this.reject=l(V,t,1)},b.f=I=function(t){return t===E||t===s?new o(t):i(t)}),h(h.G+h.W+h.F*!M,{Promise:E}),n(1309)(E,S),n(5993)(S),s=n(4411).Promise,h(h.S+h.F*!M,S,{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!M),S,{resolve:function(t){return x(a&&this===s?E:this,t)}}),h(h.S+h.F*!(M&&n(1461)((function(t){E.all(t).catch(P)}))),S,{all:function(t){var e=this,n=I(e),r=n.resolve,i=n.reject,o=_((function(){var n=[],o=0,s=1;m(t,!1,(function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then((function(t){u||(u=!0,n[a]=t,--s||r(n))}),i)})),--s||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,i=_((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},9310:(t,e,n)=>{var r=n(5366),i=n(3079),o=n(9719),s=(n(6341).Reflect||{}).apply,a=Function.apply;r(r.S+r.F*!n(1240)((function(){s((function(){}))})),"Reflect",{apply:function(t,e,n){var r=i(t),u=o(n);return s?s(r,e,u):a.call(r,e,u)}})},6722:(t,e,n)=>{var r=n(5366),i=n(2545),o=n(3079),s=n(9719),a=n(7481),u=n(1240),l=n(6966),c=(n(6341).Reflect||{}).construct,h=u((function(){function t(){}return!(c((function(){}),[],t)instanceof t)})),f=!u((function(){c((function(){}))}));r(r.S+r.F*(h||f),"Reflect",{construct:function(t,e){o(t),s(e);var n=arguments.length<3?t:o(arguments[2]);if(f&&!h)return c(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(l.apply(t,r))}var u=n.prototype,p=i(a(u)?u:Object.prototype),d=Function.apply.call(t,p,e);return a(d)?d:p}})},8372:(t,e,n)=>{var r=n(3530),i=n(5366),o=n(9719),s=n(9241);i(i.S+i.F*n(1240)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,e,n){o(t),e=s(e,!0),o(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},4604:(t,e,n)=>{var r=n(5366),i=n(7762).f,o=n(9719);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(o(t),e);return!(n&&!n.configurable)&&delete t[e]}})},4781:(t,e,n)=>{"use strict";var r=n(5366),i=n(9719),o=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(7938)(o,"Object",(function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},4395:(t,e,n)=>{var r=n(7762),i=n(5366),o=n(9719);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},9649:(t,e,n)=>{var r=n(5366),i=n(4408),o=n(9719);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},8416:(t,e,n)=>{var r=n(7762),i=n(4408),o=n(1063),s=n(5366),a=n(7481),u=n(9719);s(s.S,"Reflect",{get:function t(e,n){var s,l,c=arguments.length<3?e:arguments[2];return u(e)===c?e[n]:(s=r.f(e,n))?o(s,"value")?s.value:void 0!==s.get?s.get.call(c):void 0:a(l=i(e))?t(l,n,c):void 0}})},2475:(t,e,n)=>{var r=n(5366);r(r.S,"Reflect",{has:function(t,e){return e in t}})},2924:(t,e,n)=>{var r=n(5366),i=n(9719),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},6337:(t,e,n)=>{var r=n(5366);r(r.S,"Reflect",{ownKeys:n(7285)})},3286:(t,e,n)=>{var r=n(5366),i=n(9719),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},8766:(t,e,n)=>{var r=n(5366),i=n(7135);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},7225:(t,e,n)=>{var r=n(3530),i=n(7762),o=n(4408),s=n(1063),a=n(5366),u=n(1761),l=n(9719),c=n(7481);a(a.S,"Reflect",{set:function t(e,n,a){var h,f,p=arguments.length<4?e:arguments[3],d=i.f(l(e),n);if(!d){if(c(f=o(e)))return t(f,n,a,p);d=u(0)}if(s(d,"value")){if(!1===d.writable||!c(p))return!1;if(h=i.f(p,n)){if(h.get||h.set||!1===h.writable)return!1;h.value=a,r.f(p,n,h)}else r.f(p,n,u(0,a));return!0}return void 0!==d.set&&(d.set.call(p,a),!0)}})},7080:(t,e,n)=>{var r=n(6341),i=n(4805),o=n(3530).f,s=n(4230).f,a=n(9543),u=n(6439),l=r.RegExp,c=l,h=l.prototype,f=/a/g,p=/a/g,d=new l(f)!==f;if(n(1916)&&(!d||n(1240)((function(){return p[n(9739)("match")]=!1,l(f)!=f||l(p)==p||"/a/i"!=l(f,"i")})))){l=function(t,e){var n=this instanceof l,r=a(t),o=void 0===e;return!n&&r&&t.constructor===l&&o?t:i(d?new c(r&&!o?t.source:t,e):c((r=t instanceof l)?t.source:t,r&&o?u.call(t):e),n?this:h,l)};for(var m=function(t){t in l||o(l,t,{configurable:!0,get:function(){return c[t]},set:function(e){c[t]=e}})},v=s(c),g=0;v.length>g;)m(v[g++]);h.constructor=l,l.prototype=h,n(1564)(r,"RegExp",l)}n(5993)("RegExp")},8615:(t,e,n)=>{"use strict";var r=n(8868);n(5366)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},9544:(t,e,n)=>{n(1916)&&"g"!=/./g.flags&&n(3530).f(RegExp.prototype,"flags",{configurable:!0,get:n(6439)})},5475:(t,e,n)=>{"use strict";var r=n(9719),i=n(1838),o=n(9959),s=n(9073);n(5307)("match",1,(function(t,e,n,a){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),l=String(this);if(!u.global)return s(u,l);var c=u.unicode;u.lastIndex=0;for(var h,f=[],p=0;null!==(h=s(u,l));){var d=String(h[0]);f[p]=d,""===d&&(u.lastIndex=o(l,i(u.lastIndex),c)),p++}return 0===p?null:f}]}))},3770:(t,e,n)=>{"use strict";var r=n(9719),i=n(4200),o=n(1838),s=n(1549),a=n(9959),u=n(9073),l=Math.max,c=Math.min,h=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(5307)("replace",2,(function(t,e,n,d){return[function(r,i){var o=t(this),s=null==r?void 0:r[e];return void 0!==s?s.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=d(n,t,this,e);if(i.done)return i.value;var h=r(t),f=String(this),p="function"==typeof e;p||(e=String(e));var v=h.global;if(v){var g=h.unicode;h.lastIndex=0}for(var y=[];;){var b=u(h,f);if(null===b)break;if(y.push(b),!v)break;""===String(b[0])&&(h.lastIndex=a(f,o(h.lastIndex),g))}for(var _,w="",x=0,S=0;S<y.length;S++){b=y[S];for(var T=String(b[0]),k=l(c(s(b.index),f.length),0),C=[],O=1;O<b.length;O++)C.push(void 0===(_=b[O])?_:String(_));var E=b.groups;if(p){var A=[T].concat(C,k,f);void 0!==E&&A.push(E);var P=String(e.apply(void 0,A))}else P=m(T,f,k,C,E,e);k>=x&&(w+=f.slice(x,k)+P,x=k+T.length)}return w+f.slice(x)}];function m(t,e,r,o,s,a){var u=r+t.length,l=o.length,c=p;return void 0!==s&&(s=i(s),c=f),n.call(a,c,(function(n,i){var a;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":a=s[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>l){var f=h(c/10);return 0===f?n:f<=l?void 0===o[f-1]?i.charAt(1):o[f-1]+i.charAt(1):n}a=o[c-1]}return void 0===a?"":a}))}}))},5201:(t,e,n)=>{"use strict";var r=n(9719),i=n(1541),o=n(9073);n(5307)("search",1,(function(t,e,n,s){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var a=r(t),u=String(this),l=a.lastIndex;i(l,0)||(a.lastIndex=0);var c=o(a,u);return i(a.lastIndex,l)||(a.lastIndex=l),null===c?-1:c.index}]}))},1385:(t,e,n)=>{"use strict";var r=n(9543),i=n(9719),o=n(9789),s=n(9959),a=n(1838),u=n(9073),l=n(8868),c=n(1240),h=Math.min,f=[].push,p=4294967295,d=!c((function(){RegExp(p,"y")}));n(5307)("split",2,(function(t,e,n,c){var m;return m="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 i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,s,a,u=[],c=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),h=0,d=void 0===e?p:e>>>0,m=new RegExp(t.source,c+"g");(o=l.call(m,i))&&!((s=m.lastIndex)>h&&(u.push(i.slice(h,o.index)),o.length>1&&o.index<i.length&&f.apply(u,o.slice(1)),a=o[0].length,h=s,u.length>=d));)m.lastIndex===o.index&&m.lastIndex++;return h===i.length?!a&&m.test("")||u.push(""):u.push(i.slice(h)),u.length>d?u.slice(0,d):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 i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):m.call(String(i),n,r)},function(t,e){var r=c(m,t,this,e,m!==n);if(r.done)return r.value;var l=i(t),f=String(this),v=o(l,RegExp),g=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(d?"y":"g"),b=new v(d?l:"^(?:"+l.source+")",y),_=void 0===e?p:e>>>0;if(0===_)return[];if(0===f.length)return null===u(b,f)?[f]:[];for(var w=0,x=0,S=[];x<f.length;){b.lastIndex=d?x:0;var T,k=u(b,d?f:f.slice(x));if(null===k||(T=h(a(b.lastIndex+(d?0:x)),f.length))===w)x=s(f,x,g);else{if(S.push(f.slice(w,x)),S.length===_)return S;for(var C=1;C<=k.length-1;C++)if(S.push(k[C]),S.length===_)return S;x=w=T}}return S.push(f.slice(w)),S}]}))},5244:(t,e,n)=>{"use strict";n(9544);var r=n(9719),i=n(6439),o=n(1916),s="toString",a=/./.toString,u=function(t){n(1564)(RegExp.prototype,s,t,!0)};n(1240)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?u((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):a.name!=s&&u((function(){return a.call(this)}))},8253:(t,e,n)=>{"use strict";var r=n(5144),i=n(1603);t.exports=n(8091)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},447:(t,e,n)=>{"use strict";n(9048)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},5624:(t,e,n)=>{"use strict";n(9048)("big",(function(t){return function(){return t(this,"big","","")}}))},1263:(t,e,n)=>{"use strict";n(9048)("blink",(function(t){return function(){return t(this,"blink","","")}}))},5193:(t,e,n)=>{"use strict";n(9048)("bold",(function(t){return function(){return t(this,"b","","")}}))},2858:(t,e,n)=>{"use strict";var r=n(5366),i=n(7384)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},2058:(t,e,n)=>{"use strict";var r=n(5366),i=n(1838),o=n(3256),s="endsWith",a="".endsWith;r(r.P+r.F*n(6881)(s),"String",{endsWith:function(t){var e=o(this,t,s),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),l=String(t);return a?a.call(e,l,u):e.slice(u-l.length,u)===l}})},8241:(t,e,n)=>{"use strict";n(9048)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},6723:(t,e,n)=>{"use strict";n(9048)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},9394:(t,e,n)=>{"use strict";n(9048)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},2539:(t,e,n)=>{var r=n(5366),i=n(5044),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,s=0;r>s;){if(e=+arguments[s++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},5472:(t,e,n)=>{"use strict";var r=n(5366),i=n(3256),o="includes";r(r.P+r.F*n(6881)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},6938:(t,e,n)=>{"use strict";n(9048)("italics",(function(t){return function(){return t(this,"i","","")}}))},4333:(t,e,n)=>{"use strict";var r=n(7384)(!0);n(9121)(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})}))},1961:(t,e,n)=>{"use strict";n(9048)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},9820:(t,e,n)=>{var r=n(5366),i=n(8500),o=n(1838);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,s=[],a=0;n>a;)s.push(String(e[a++])),a<r&&s.push(String(arguments[a]));return s.join("")}})},7001:(t,e,n)=>{var r=n(5366);r(r.P,"String",{repeat:n(5)})},9659:(t,e,n)=>{"use strict";n(9048)("small",(function(t){return function(){return t(this,"small","","")}}))},7492:(t,e,n)=>{"use strict";var r=n(5366),i=n(1838),o=n(3256),s="startsWith",a="".startsWith;r(r.P+r.F*n(6881)(s),"String",{startsWith:function(t){var e=o(this,t,s),n=i(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}})},3354:(t,e,n)=>{"use strict";n(9048)("strike",(function(t){return function(){return t(this,"strike","","")}}))},9620:(t,e,n)=>{"use strict";n(9048)("sub",(function(t){return function(){return t(this,"sub","","")}}))},638:(t,e,n)=>{"use strict";n(9048)("sup",(function(t){return function(){return t(this,"sup","","")}}))},8417:(t,e,n)=>{"use strict";n(7370)("trim",(function(t){return function(){return t(this,3)}}))},8997:(t,e,n)=>{"use strict";var r=n(6341),i=n(1063),o=n(1916),s=n(5366),a=n(1564),u=n(2153).KEY,l=n(1240),c=n(7355),h=n(1309),f=n(430),p=n(9739),d=n(8833),m=n(8155),v=n(4535),g=n(689),y=n(9719),b=n(7481),_=n(4200),w=n(8500),x=n(9241),S=n(1761),T=n(2545),k=n(5009),C=n(7762),O=n(2520),E=n(3530),A=n(5825),P=C.f,I=E.f,M=k.f,D=r.Symbol,N=r.JSON,R=N&&N.stringify,j=p("_hidden"),F=p("toPrimitive"),V={}.propertyIsEnumerable,L=c("symbol-registry"),z=c("symbols"),q=c("op-symbols"),B=Object.prototype,U="function"==typeof D&&!!O.f,$=r.QObject,W=!$||!$.prototype||!$.prototype.findChild,H=o&&l((function(){return 7!=T(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=P(B,e);r&&delete B[e],I(t,e,n),r&&t!==B&&I(B,e,r)}:I,K=function(t){var e=z[t]=T(D.prototype);return e._k=t,e},G=U&&"symbol"==typeof D.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof D},Z=function(t,e,n){return t===B&&Z(q,e,n),y(t),e=x(e,!0),y(n),i(z,e)?(n.enumerable?(i(t,j)&&t[j][e]&&(t[j][e]=!1),n=T(n,{enumerable:S(0,!1)})):(i(t,j)||I(t,j,S(1,{})),t[j][e]=!0),H(t,e,n)):I(t,e,n)},X=function(t,e){y(t);for(var n,r=v(e=w(e)),i=0,o=r.length;o>i;)Z(t,n=r[i++],e[n]);return t},Y=function(t){var e=V.call(this,t=x(t,!0));return!(this===B&&i(z,t)&&!i(q,t))&&(!(e||!i(this,t)||!i(z,t)||i(this,j)&&this[j][t])||e)},Q=function(t,e){if(t=w(t),e=x(e,!0),t!==B||!i(z,e)||i(q,e)){var n=P(t,e);return!n||!i(z,e)||i(t,j)&&t[j][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=M(w(t)),r=[],o=0;n.length>o;)i(z,e=n[o++])||e==j||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===B,r=M(n?q:w(t)),o=[],s=0;r.length>s;)!i(z,e=r[s++])||n&&!i(B,e)||o.push(z[e]);return o};U||(a((D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(q,n),i(this,j)&&i(this[j],t)&&(this[j][t]=!1),H(this,t,S(1,n))};return o&&W&&H(B,t,{configurable:!0,set:e}),K(t)}).prototype,"toString",(function(){return this._k})),C.f=Q,E.f=Z,n(4230).f=k.f=J,n(1144).f=Y,O.f=tt,o&&!n(5113)&&a(B,"propertyIsEnumerable",Y,!0),d.f=function(t){return K(p(t))}),s(s.G+s.W+s.F*!U,{Symbol:D});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var rt=A(p.store),it=0;rt.length>it;)m(rt[it++]);s(s.S+s.F*!U,"Symbol",{for:function(t){return i(L,t+="")?L[t]:L[t]=D(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),s(s.S+s.F*!U,"Object",{create:function(t,e){return void 0===e?T(t):X(T(t),e)},defineProperty:Z,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:tt});var ot=l((function(){O.f(1)}));s(s.S+s.F*ot,"Object",{getOwnPropertySymbols:function(t){return O.f(_(t))}}),N&&s(s.S+s.F*(!U||l((function(){var t=D();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!G(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,R.apply(N,r)}}),D.prototype[F]||n(8442)(D.prototype,F,D.prototype.valueOf),h(D,"Symbol"),h(Math,"Math",!0),h(r.JSON,"JSON",!0)},3315:(t,e,n)=>{"use strict";var r=n(5366),i=n(7728),o=n(9895),s=n(9719),a=n(5044),u=n(1838),l=n(7481),c=n(6341).ArrayBuffer,h=n(9789),f=o.ArrayBuffer,p=o.DataView,d=i.ABV&&c.isView,m=f.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(c!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,g,{isView:function(t){return d&&d(t)||l(t)&&v in t}}),r(r.P+r.U+r.F*n(1240)((function(){return!new f(2).slice(1,void 0).byteLength})),g,{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(s(this),t);for(var n=s(this).byteLength,r=a(t,n),i=a(void 0===e?n:e,n),o=new(h(this,f))(u(i-r)),l=new p(this),c=new p(o),d=0;r<i;)c.setUint8(d++,l.getUint8(r++));return o}}),n(5993)(g)},2920:(t,e,n)=>{var r=n(5366);r(r.G+r.W+r.F*!n(7728).ABV,{DataView:n(9895).DataView})},951:(t,e,n)=>{n(8754)("Float32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},29:(t,e,n)=>{n(8754)("Float64",8,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},6935:(t,e,n)=>{n(8754)("Int16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},6403:(t,e,n)=>{n(8754)("Int32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},5443:(t,e,n)=>{n(8754)("Int8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},7846:(t,e,n)=>{n(8754)("Uint16",2,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},1200:(t,e,n)=>{n(8754)("Uint32",4,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},9815:(t,e,n)=>{n(8754)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},3771:(t,e,n)=>{n(8754)("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}),!0)},7391:(t,e,n)=>{"use strict";var r,i=n(6341),o=n(6934)(0),s=n(1564),a=n(2153),u=n(9821),l=n(3503),c=n(7481),h=n(1603),f=n(1603),p=!i.ActiveXObject&&"ActiveXObject"in i,d="WeakMap",m=a.getWeak,v=Object.isExtensible,g=l.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(c(t)){var e=m(t);return!0===e?g(h(this,d)).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(h(this,d),t,e)}},_=t.exports=n(8091)(d,y,b,l,!0,!0);f&&p&&(u((r=l.getConstructor(y,d)).prototype,b),a.NEED=!0,o(["delete","has","get","set"],(function(t){var e=_.prototype,n=e[t];s(e,t,(function(e,i){if(c(e)&&!v(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)}))})))},3307:(t,e,n)=>{"use strict";var r=n(3503),i=n(1603),o="WeakSet";n(8091)(o,(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,o),t,!0)}},r,!1,!0)},8125:(t,e,n)=>{"use strict";var r=n(5366),i=n(3885),o=n(4200),s=n(1838),a=n(3079),u=n(4087);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return a(t),e=s(r.length),n=u(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(2802)("flatMap")},9348:(t,e,n)=>{"use strict";var r=n(5366),i=n(1545)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(2802)("includes")},1768:(t,e,n)=>{var r=n(5366),i=n(5346)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},9223:(t,e,n)=>{var r=n(5366),i=n(7285),o=n(8500),s=n(7762),a=n(1676);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=s.f,l=i(r),c={},h=0;l.length>h;)void 0!==(n=u(r,e=l[h++]))&&a(c,e,n);return c}})},7442:(t,e,n)=>{var r=n(5366),i=n(5346)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},4936:(t,e,n)=>{"use strict";var r=n(5366),i=n(4411),o=n(6341),s=n(9789),a=n(8614);r(r.P+r.R,"Promise",{finally:function(t){var e=s(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return a(e,t()).then((function(){return n}))}:t,n?function(n){return a(e,t()).then((function(){throw n}))}:t)}})},239:(t,e,n)=>{"use strict";var r=n(5366),i=n(9823),o=n(3843),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*s,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},8755:(t,e,n)=>{"use strict";var r=n(5366),i=n(9823),o=n(3843),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*s,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},3412:(t,e,n)=>{"use strict";n(7370)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},6948:(t,e,n)=>{"use strict";n(7370)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},8284:(t,e,n)=>{n(8155)("asyncIterator")},8745:(t,e,n)=>{for(var r=n(1308),i=n(5825),o=n(1564),s=n(6341),a=n(8442),u=n(4919),l=n(9739),c=l("iterator"),h=l("toStringTag"),f=u.Array,p={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=i(p),m=0;m<d.length;m++){var v,g=d[m],y=p[g],b=s[g],_=b&&b.prototype;if(_&&(_[c]||a(_,c,f),_[h]||a(_,h,g),u[g]=f,y))for(v in r)_[v]||o(_,v,r[v],!0)}},25:(t,e,n)=>{var r=n(5366),i=n(7122);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},1629:(t,e,n)=>{var r=n(6341),i=n(5366),o=n(3843),s=[].slice,a=/MSIE .\./.test(o),u=function(t){return function(e,n){var r=arguments.length>2,i=!!r&&s.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*a,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},1523:(t,e,n)=>{n(1629),n(25),n(8745),t.exports=n(4411)},7228:t=>{t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},7191:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},4575:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},3913:t=>{function e(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,n,r){return n&&e(t.prototype,n),r&&e(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0},3884:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}},t.exports.default=t.exports,t.exports.__esModule=!0},521:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},3038:(t,e,n)=>{var r=n(7191),i=n(3884),o=n(379),s=n(521);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},379:(t,e,n)=>{var r=n(7228);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},7757:(t,e,n)=>{t.exports=n(5666)},684:(t,e,n)=>{"use strict";n.d(e,{ZP:()=>k});var r=n(7294),i=n(3366),o=n(7462),s=n(7326),a=n(1721),u=n(971),l=n(8679),c=n.n(l);function h(t,e){if(!t){var n=new Error("loadable: "+e);throw n.framesToPop=1,n.name="Invariant Violation",n}}var f=r.createContext();var p={initialChunks:{}},d="PENDING",m="REJECTED";var v=function(t){return t};function g(t){var e=t.defaultResolveComponent,n=void 0===e?v:e,l=t.render,g=t.onLoad;function y(t,e){void 0===e&&(e={});var v=function(t){return"function"==typeof t?{requireAsync:t,resolve:function(){},chunkName:function(){}}:t}(t),y={};function b(t){return e.cacheKey?e.cacheKey(t):v.resolve?v.resolve(t):"static"}function _(t,r,i){var o=e.resolveComponent?e.resolveComponent(t,r):n(t);if(e.resolveComponent&&!(0,u.isValidElementType)(o))throw new Error("resolveComponent returned something that is not a React component!");return c()(i,o,{preload:!0}),o}var w,x,S=function(t){function n(n){var r;return(r=t.call(this,n)||this).state={result:null,error:null,loading:!0,cacheKey:b(n)},h(!n.__chunkExtractor||v.requireSync,"SSR requires `@loadable/babel-plugin`, please install it"),n.__chunkExtractor?(!1===e.ssr||(v.requireAsync(n).catch((function(){return null})),r.loadSync(),n.__chunkExtractor.addChunk(v.chunkName(n))),(0,s.Z)(r)):(!1!==e.ssr&&(v.isReady&&v.isReady(n)||v.chunkName&&p.initialChunks[v.chunkName(n)])&&r.loadSync(),r)}(0,a.Z)(n,t),n.getDerivedStateFromProps=function(t,e){var n=b(t);return(0,o.Z)({},e,{cacheKey:n,loading:e.loading||e.cacheKey!==n})};var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0;var t=this.getCache();t&&t.status===m&&this.setCache(),this.state.loading&&this.loadAsync()},r.componentDidUpdate=function(t,e){e.cacheKey!==this.state.cacheKey&&this.loadAsync()},r.componentWillUnmount=function(){this.mounted=!1},r.safeSetState=function(t,e){this.mounted&&this.setState(t,e)},r.getCacheKey=function(){return b(this.props)},r.getCache=function(){return y[this.getCacheKey()]},r.setCache=function(t){void 0===t&&(t=void 0),y[this.getCacheKey()]=t},r.triggerOnLoad=function(){var t=this;g&&setTimeout((function(){g(t.state.result,t.props)}))},r.loadSync=function(){if(this.state.loading)try{var t=_(v.requireSync(this.props),this.props,k);this.state.result=t,this.state.loading=!1}catch(t){console.error("loadable-components: failed to synchronously load component, which expected to be available",{fileName:v.resolve(this.props),chunkName:v.chunkName(this.props),error:t?t.message:t}),this.state.error=t}},r.loadAsync=function(){var t=this,e=this.resolveAsync();return e.then((function(e){var n=_(e,t.props,{Loadable:k});t.safeSetState({result:n,loading:!1},(function(){return t.triggerOnLoad()}))})).catch((function(e){return t.safeSetState({error:e,loading:!1})})),e},r.resolveAsync=function(){var t=this,e=this.props,n=(e.__chunkExtractor,e.forwardedRef,(0,i.Z)(e,["__chunkExtractor","forwardedRef"])),r=this.getCache();return r||((r=v.requireAsync(n)).status=d,this.setCache(r),r.then((function(){r.status="RESOLVED"}),(function(e){console.error("loadable-components: failed to asynchronously load component",{fileName:v.resolve(t.props),chunkName:v.chunkName(t.props),error:e?e.message:e}),r.status=m}))),r},r.render=function(){var t=this.props,n=t.forwardedRef,r=t.fallback,s=(t.__chunkExtractor,(0,i.Z)(t,["forwardedRef","fallback","__chunkExtractor"])),a=this.state,u=a.error,c=a.loading,h=a.result;if(e.suspense&&(this.getCache()||this.loadAsync()).status===d)throw this.loadAsync();if(u)throw u;var f=r||e.fallback||null;return c?f:l({fallback:f,result:h,options:e,props:(0,o.Z)({},s,{ref:n})})},n}(r.Component),T=(x=function(t){return r.createElement(f.Consumer,null,(function(e){return r.createElement(w,Object.assign({__chunkExtractor:e},t))}))},(w=S).displayName&&(x.displayName=w.displayName+"WithChunkExtractor"),x),k=r.forwardRef((function(t,e){return r.createElement(T,Object.assign({forwardedRef:e},t))}));return k.displayName="Loadable",k.preload=function(t){v.requireAsync(t)},k.load=function(t){return v.requireAsync(t)},k}return{loadable:y,lazy:function(t,e){return y(t,(0,o.Z)({},e,{suspense:!0}))}}}var y=g({defaultResolveComponent:function(t){return t.__esModule?t.default:t.default||t},render:function(t){var e=t.result,n=t.props;return r.createElement(e,n)}}),b=y.loadable,_=y.lazy,w=g({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.props;return n.children?n.children(e):null}}),x=w.loadable,S=w.lazy;var T=b;T.lib=x,_.lib=S;const k=T},8145:(t,e)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case c:case h:case o:case a:case s:case p:return t;default:switch(t=t&&t.$$typeof){case l:case f:case v:case m:case u:return t;default:return e}}case i:return e}}}function x(t){return w(t)===h}e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===a||t===s||t===p||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===m||t.$$typeof===u||t.$$typeof===l||t.$$typeof===f||t.$$typeof===y||t.$$typeof===b||t.$$typeof===_||t.$$typeof===g)}},971:(t,e,n)=>{"use strict";t.exports=n(8145)},5382:function(t,e,n){!function(t,e,n,r){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),s=i(n),a=i(r),u=function(t,e,n){return{endTime:e,insertTime:n,type:"exponentialRampToValue",value:t}},l=function(t,e,n){return{endTime:e,insertTime:n,type:"linearRampToValue",value:t}},c=function(t,e){return{startTime:e,type:"setValue",value:t}},h=function(t,e,n){return{duration:n,startTime:e,type:"setValueCurve",values:t}},f=function(t,e,n){var r=n.startTime,i=n.target,o=n.timeConstant;return i+(e-i)*Math.exp((r-t)/o)},p=function(t){return"exponentialRampToValue"===t.type},d=function(t){return"linearRampToValue"===t.type},m=function(t){return p(t)||d(t)},v=function(t){return"setValue"===t.type},g=function(t){return"setValueCurve"===t.type},y=function t(e,n,r,i){var o=e[n];return void 0===o?i:m(o)||v(o)?o.value:g(o)?o.values[o.values.length-1]:f(r,t(e,n-1,o.startTime,i),o)},b=function(t,e,n,r,i){return void 0===n?[r.insertTime,i]:m(n)?[n.endTime,n.value]:v(n)?[n.startTime,n.value]:g(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,y(t,e-1,n.startTime,i)]},_=function(t){return"cancelAndHold"===t.type},w=function(t){return"cancelScheduledValues"===t.type},x=function(t){return _(t)||w(t)?t.cancelTime:p(t)||d(t)?t.endTime:t.startTime},S=function(t,e,n,r){var i=r.endTime,o=r.value;return n===o?o:0<n&&0<o||n<0&&o<0?n*Math.pow(o/n,(t-e)/(i-e)):0},T=function(t,e,n,r){return n+(t-e)/(r.endTime-e)*(r.value-n)},k=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]},C=function(t,e){var n=e.duration,r=e.startTime,i=e.values,o=(t-r)/n*(i.length-1);return k(i,o)},O=function(t){return"setTarget"===t.type},E=function(){function t(e){s.default(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return a.default(t,[{key:Symbol.iterator,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(t){var e=x(t);if(_(t)||w(t)){var n=this._automationEvents.findIndex((function(n){return w(t)&&g(n)?n.startTime+n.duration>=e:x(n)>=e})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),_(t)){var i=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&m(r)){if(O(i))throw new Error("The internal list is malformed.");var o=g(i)?i.startTime+i.duration:x(i),s=g(i)?i.values[i.values.length-1]:i.value,a=p(r)?S(e,o,s,r):T(e,o,s,r),f=p(r)?u(a,e,this._currenTime):l(a,e,this._currenTime);this._automationEvents.push(f)}void 0!==i&&O(i)&&this._automationEvents.push(c(this.getValue(e),e)),void 0!==i&&g(i)&&i.startTime+i.duration>e&&(this._automationEvents[this._automationEvents.length-1]=h(new Float32Array([6,7]),i.startTime,e-i.startTime))}}else{var v=this._automationEvents.findIndex((function(t){return x(t)>e})),y=-1===v?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[v-1];if(void 0!==y&&g(y)&&x(y)+y.duration>e)return!1;var b=p(t)?u(t.value,t.endTime,this._currenTime):d(t)?l(t.value,e,this._currenTime):t;if(-1===v)this._automationEvents.push(b);else{if(g(t)&&e+t.duration>x(this._automationEvents[v]))return!1;this._automationEvents.splice(v,0,b)}}return!0}},{key:"flush",value:function(t){var e=this._automationEvents.findIndex((function(e){return x(e)>t}));if(e>1){var n=this._automationEvents.slice(e-1),r=n[0];O(r)&&n.unshift(c(y(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 e=this._automationEvents.findIndex((function(e){return x(e)>t})),n=this._automationEvents[e],r=(-1===e?this._automationEvents.length:e)-1,i=this._automationEvents[r];if(void 0!==i&&O(i)&&(void 0===n||!m(n)||n.insertTime>t))return f(t,y(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(void 0!==i&&v(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==i&&g(i)&&(void 0===n||!m(n)||i.startTime+i.duration>t))return t<i.startTime+i.duration?C(t,i):i.values[i.values.length-1];if(void 0!==i&&m(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==n&&p(n)){var s=b(this._automationEvents,r,i,n,this._defaultValue),a=o.default(s,2),u=a[0],l=a[1];return S(t,u,l,n)}if(void 0!==n&&d(n)){var c=b(this._automationEvents,r,i,n,this._defaultValue),h=o.default(c,2),_=h[0],w=h[1];return T(t,_,w,n)}return this._defaultValue}}]),t}(),A=function(t){return{cancelTime:t,type:"cancelAndHold"}},P=function(t){return{cancelTime:t,type:"cancelScheduledValues"}},I=function(t,e){return{endTime:e,type:"exponentialRampToValue",value:t}},M=function(t,e){return{endTime:e,type:"linearRampToValue",value:t}},D=function(t,e,n){return{startTime:e,target:t,timeConstant:n,type:"setTarget"}};t.AutomationEventList=E,t.createCancelAndHoldAutomationEvent=A,t.createCancelScheduledValuesAutomationEvent=P,t.createExponentialRampToValueAutomationEvent=I,t.createLinearRampToValueAutomationEvent=M,t.createSetTargetAutomationEvent=D,t.createSetValueAutomationEvent=c,t.createSetValueCurveAutomationEvent=h,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(3038),n(4575),n(3913))},6489:(t,e)=>{"use strict";e.Q=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var r={},o=e||{},a=t.split(i),u=o.decode||n,l=0;l<a.length;l++){var c=a[l],h=c.indexOf("=");if(!(h<0)){var f=c.substr(0,h).trim(),p=c.substr(++h,c.length).trim();'"'==p[0]&&(p=p.slice(1,-1)),null==r[f]&&(r[f]=s(p,u))}}return r},e.q=function(t,e,n){var i=n||{},s=i.encode||r;if("function"!=typeof s)throw new TypeError("option encode is invalid");if(!o.test(t))throw new TypeError("argument name is invalid");var a=s(e);if(a&&!o.test(a))throw new TypeError("argument val is invalid");var u=t+"="+a;if(null!=i.maxAge){var l=i.maxAge-0;if(isNaN(l))throw new Error("maxAge should be a Number");u+="; Max-Age="+Math.floor(l)}if(i.domain){if(!o.test(i.domain))throw new TypeError("option domain is invalid");u+="; Domain="+i.domain}if(i.path){if(!o.test(i.path))throw new TypeError("option path is invalid");u+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");u+="; Expires="+i.expires.toUTCString()}i.httpOnly&&(u+="; HttpOnly");i.secure&&(u+="; Secure");if(i.sameSite){switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:case"strict":u+="; SameSite=Strict";break;case"lax":u+="; SameSite=Lax";break;case"none":u+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return u};var n=decodeURIComponent,r=encodeURIComponent,i=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(t,e){try{return e(t)}catch(e){return t}}},71:(t,e,n)=>{"use strict";n.d(e,{lX:()=>S,q_:()=>A,ob:()=>m,PP:()=>I,Ep:()=>d,Hp:()=>v});var r=n(7462);function i(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}const s=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],s=e&&e.split("/")||[],a=t&&i(t),u=e&&i(e),l=a||u;if(t&&i(t)?s=r:r.length&&(s.pop(),s=s.concat(r)),!s.length)return"/";if(s.length){var c=s[s.length-1];n="."===c||".."===c||""===c}else n=!1;for(var h=0,f=s.length;f>=0;f--){var p=s[f];"."===p?o(s,f):".."===p?(o(s,f),h++):h&&(o(s,f),h--)}if(!l)for(;h--;h)s.unshift("..");!l||""===s[0]||s[0]&&i(s[0])||s.unshift("");var d=s.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function a(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}const 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=a(e),i=a(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1};var l=n(2177);function c(t){return"/"===t.charAt(0)?t:"/"+t}function h(t){return"/"===t.charAt(0)?t.substr(1):t}function f(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 p(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,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(t,e,n,i){var o;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t),o.state=e):(void 0===(o=(0,r.Z)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=s(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}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 g(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"==typeof t?t(e,n):t;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!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)}))}}}var y=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(t,e){e(window.confirm(t))}var _="popstate",w="hashchange";function x(){try{return window.history.state||{}}catch(t){return{}}}function S(t){void 0===t&&(t={}),y||(0,l.Z)(!1);var e,n=window.history,i=(-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,o=!(-1===window.navigator.userAgent.indexOf("Trident")),s=t,a=s.forceRefresh,u=void 0!==a&&a,h=s.getUserConfirmation,v=void 0===h?b:h,S=s.keyLength,T=void 0===S?6:S,k=t.basename?p(c(t.basename)):"";function C(t){var e=t||{},n=e.key,r=e.state,i=window.location,o=i.pathname+i.search+i.hash;return k&&(o=f(o,k)),m(o,r,n)}function O(){return Math.random().toString(36).substr(2,T)}var E=g();function A(t){(0,r.Z)(q,t),q.length=n.length,E.notifyListeners(q.location,q.action)}function P(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||D(C(t.state))}function I(){D(C(x()))}var M=!1;function D(t){if(M)M=!1,A();else{E.confirmTransitionTo(t,"POP",v,(function(e){e?A({action:"POP",location:t}):function(t){var e=q.location,n=R.indexOf(e.key);-1===n&&(n=0);var r=R.indexOf(t.key);-1===r&&(r=0);var i=n-r;i&&(M=!0,F(i))}(t)}))}}var N=C(x()),R=[N.key];function j(t){return k+d(t)}function F(t){n.go(t)}var V=0;function L(t){1===(V+=t)&&1===t?(window.addEventListener(_,P),o&&window.addEventListener(w,I)):0===V&&(window.removeEventListener(_,P),o&&window.removeEventListener(w,I))}var z=!1;var q={length:n.length,action:"POP",location:N,createHref:j,push:function(t,e){var r="PUSH",o=m(t,e,O(),q.location);E.confirmTransitionTo(o,r,v,(function(t){if(t){var e=j(o),s=o.key,a=o.state;if(i)if(n.pushState({key:s,state:a},null,e),u)window.location.href=e;else{var l=R.indexOf(q.location.key),c=R.slice(0,l+1);c.push(o.key),R=c,A({action:r,location:o})}else window.location.href=e}}))},replace:function(t,e){var r="REPLACE",o=m(t,e,O(),q.location);E.confirmTransitionTo(o,r,v,(function(t){if(t){var e=j(o),s=o.key,a=o.state;if(i)if(n.replaceState({key:s,state:a},null,e),u)window.location.replace(e);else{var l=R.indexOf(q.location.key);-1!==l&&(R[l]=o.key),A({action:r,location:o})}else window.location.replace(e)}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(t){void 0===t&&(t=!1);var e=E.setPrompt(t);return z||(L(1),z=!0),function(){return z&&(z=!1,L(-1)),e()}},listen:function(t){var e=E.appendListener(t);return L(1),function(){L(-1),e()}}};return q}var T="hashchange",k={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+h(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:h,decodePath:c},slash:{encodePath:c,decodePath:c}};function C(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function O(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function E(t){window.location.replace(C(window.location.href)+"#"+t)}function A(t){void 0===t&&(t={}),y||(0,l.Z)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),i=n.getUserConfirmation,o=void 0===i?b:i,s=n.hashType,a=void 0===s?"slash":s,u=t.basename?p(c(t.basename)):"",h=k[a],v=h.encodePath,_=h.decodePath;function w(){var t=_(O());return u&&(t=f(t,u)),m(t)}var x=g();function S(t){(0,r.Z)(z,t),z.length=e.length,x.notifyListeners(z.location,z.action)}var A=!1,P=null;function I(){var t,e,n=O(),r=v(n);if(n!==r)E(r);else{var i=w(),s=z.location;if(!A&&(e=i,(t=s).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(P===d(i))return;P=null,function(t){if(A)A=!1,S();else{var e="POP";x.confirmTransitionTo(t,e,o,(function(n){n?S({action:e,location:t}):function(t){var e=z.location,n=R.lastIndexOf(d(e));-1===n&&(n=0);var r=R.lastIndexOf(d(t));-1===r&&(r=0);var i=n-r;i&&(A=!0,j(i))}(t)}))}}(i)}}var M=O(),D=v(M);M!==D&&E(D);var N=w(),R=[d(N)];function j(t){e.go(t)}var F=0;function V(t){1===(F+=t)&&1===t?window.addEventListener(T,I):0===F&&window.removeEventListener(T,I)}var L=!1;var z={length:e.length,action:"POP",location:N,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=C(window.location.href)),n+"#"+v(u+d(t))},push:function(t,e){var n="PUSH",r=m(t,void 0,void 0,z.location);x.confirmTransitionTo(r,n,o,(function(t){if(t){var e=d(r),i=v(u+e);if(O()!==i){P=e,function(t){window.location.hash=t}(i);var o=R.lastIndexOf(d(z.location)),s=R.slice(0,o+1);s.push(e),R=s,S({action:n,location:r})}else S()}}))},replace:function(t,e){var n="REPLACE",r=m(t,void 0,void 0,z.location);x.confirmTransitionTo(r,n,o,(function(t){if(t){var e=d(r),i=v(u+e);O()!==i&&(P=e,E(i));var o=R.indexOf(d(z.location));-1!==o&&(R[o]=e),S({action:n,location:r})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(t){void 0===t&&(t=!1);var e=x.setPrompt(t);return L||(V(1),L=!0),function(){return L&&(L=!1,V(-1)),e()}},listen:function(t){var e=x.appendListener(t);return V(1),function(){V(-1),e()}}};return z}function P(t,e,n){return Math.min(Math.max(t,e),n)}function I(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,i=e.initialEntries,o=void 0===i?["/"]:i,s=e.initialIndex,a=void 0===s?0:s,u=e.keyLength,l=void 0===u?6:u,c=g();function h(t){(0,r.Z)(_,t),_.length=_.entries.length,c.notifyListeners(_.location,_.action)}function f(){return Math.random().toString(36).substr(2,l)}var p=P(a,0,o.length-1),v=o.map((function(t){return m(t,void 0,"string"==typeof t?f():t.key||f())})),y=d;function b(t){var e=P(_.index+t,0,_.entries.length-1),r=_.entries[e];c.confirmTransitionTo(r,"POP",n,(function(t){t?h({action:"POP",location:r,index:e}):h()}))}var _={length:v.length,action:"POP",location:v[p],index:p,entries:v,createHref:y,push:function(t,e){var r="PUSH",i=m(t,e,f(),_.location);c.confirmTransitionTo(i,r,n,(function(t){if(t){var e=_.index+1,n=_.entries.slice(0);n.length>e?n.splice(e,n.length-e,i):n.push(i),h({action:r,location:i,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",i=m(t,e,f(),_.location);c.confirmTransitionTo(i,r,n,(function(t){t&&(_.entries[_.index]=i,h({action:r,location:i}))}))},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),c.setPrompt(t)},listen:function(t){return c.appendListener(t)}};return _}},8679:(t,e,n)=>{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function u(t){return r.isMemo(t)?s:a[t.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var l=Object.defineProperty,c=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(d){var i=p(n);i&&i!==d&&t(e,i,r)}var s=c(n);h&&(s=s.concat(h(n)));for(var a=u(e),m=u(n),v=0;v<s.length;++v){var g=s[v];if(!(o[g]||r&&r[g]||m&&m[g]||a&&a[g])){var y=f(n,g);try{l(e,g,y)}catch(t){}}}}return e}},7996:function(t,e){var n,r,i;r=[],void 0===(i="function"==typeof(n=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,i=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){i.catalog=e,i.loadDatabase(t,n)}))},t.prototype.loadKey=t.prototype.loadDatabase,t.prototype.saveDatabase=function(t,n,r){var i=this.app,o=this;function s(t){t&&!0===t.success?r(null):r(new Error("Error saving database")),o.options.closeAfterSave&&o.closeDatabase()}null!==this.catalog&&null!==this.catalog.db?this.catalog.setAppKey(i,t,n,s):this.catalog=new e((function(e){o.saveDatabase(t,n,s)}))},t.prototype.saveKey=t.prototype.saveDatabase,t.prototype.deleteDatabase=function(t,n){var r=this.app,i=this;null!==this.catalog&&null!==this.catalog.db?this.catalog.getAppKey(r,t,(function(t){var e=t.id;0!==e?i.catalog.deleteAppKey(e,n):"function"==typeof n&&n({success:!0})})):this.catalog=new e((function(e){i.catalog=e,i.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,i,o,s,a=[],u=0;u<e.length;u++)i=(n=e[u]).app||"",o=n.key||"",s=n.val||"",r=2*i.length+2*o.length+s.length+1,a.push({app:n.app,key:n.key,size:r});"function"==typeof t?t(a):a.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,i=t+","+e,o=this.db.transaction(["LokiAKV"],"readonly").objectStore("LokiAKV").index("appkey").get(i);o.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)}),o.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 i,o=this.db.transaction(["LokiAKV"],"readwrite").objectStore("LokiAKV"),s=o.index("appkey"),a=t+","+e,u=s.get(a);u.onsuccess=function(i){var s=i.target.result;null==s?s={app:t,key:e,appkey:t+","+e,val:n}:s.val=n;var a,l=o.put(s);l.onerror=(a=r,function(t){"function"==typeof a?a({success:!1}):(console.error("LokiCatalog.setAppKey (set) onerror"),console.error(u.error))}),l.onsuccess=function(t){return function(e){"function"==typeof t&&t({success:!0})}}(r)},u.onerror=(i=r,function(t){"function"==typeof i?i({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"),i=IDBKeyRange.only(t),o=r.openCursor(i),s=[];o.onsuccess=function(t,e){return function(n){var r=n.target.result;if(r){var i=r.value;t.push(i),r.continue()}else"function"==typeof e?e(t):console.log(t)}}(s,e),o.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(),r=[];n.onsuccess=function(t,e){return function(n){var r=n.target.result;if(r){var i=r.value;t.push(i),r.continue()}else"function"==typeof e?e(t):console.log(t)}}(r,t),n.onerror=(e=t,function(t){"function"==typeof e&&e(null)})},t}()})?n.apply(e,r):n)||(t.exports=i)},3050:function(t,e,n){var r,i,o;i=[],r=function(){return function(){"use strict";var t=Object.prototype.hasOwnProperty;function e(t){var n,i;if(Array.isArray(t)){for(i=0;i<t.length;i++)e(t[i]);r(t)}else if(null!==t&&"object"==typeof t){for(n in t)t.hasOwnProperty(n)&&e(t[n]);r(t)}}function r(t){Object.isFrozen(t)||Object.freeze(t)}function i(t){return Object.isFrozen(t)?g(t,"shallow"):t}var o={copyProperties:function(t,e){var n;for(n in t)e[n]=t[n]},resolveTransformObject:function(t,e,n){var r,i;if("number"!=typeof n&&(n=0),++n>=10)return t;for(r in t)"string"==typeof t[r]&&0===t[r].indexOf("[%lktxp]")?(i=t[r].substring(8),e.hasOwnProperty(i)&&(t[r]=e[i])):"object"==typeof t[r]&&(t[r]=o.resolveTransformObject(t[r],e,n));return t},resolveTransformParams:function(t,e){var n,r,i=[];if(void 0===e)return t;for(n=0;n<t.length;n++)r=g(t[n],"shallow-recurse-objects"),i.push(o.resolveTransformObject(r,e));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,i=e.length;null!=t&&r<i;)t=t[e[r++]];return r&&r==i?t:void 0}}},s={aeq:a,lt:u,gt:l};function a(t,e){var n,r,i,o;if(t===e)return!0;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:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=e==e?9:0}if(9!==i||9!==o)return i===o}return n=Number(t),r=Number(e),n==n||r==r?n===r:(n=t.toString())==(r=e.toString())}function u(t,e,n){var r,i,o,s;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:s=1;break;case!1:s=3;break;case!0:s=4;break;case"":s=5;break;default:s=e==e?9:0}if(9!==o||9!==s)return o===s?n:o<s}return r=Number(t),i=Number(e),r==r&&i==i?r<i||!(r>i)&&n:r==r&&i!=i||(i!=i||r==r)&&(t<e||!(t>e)&&(t==e?n:(r=t.toString())<(i=e.toString())||r==i&&n))}function l(t,e,n){var r,i,o,s;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:s=1;break;case!1:s=3;break;case!0:s=4;break;case"":s=5;break;default:s=e==e?9:0}if(9!==o||9!==s)return o===s?n:o>s}return r=Number(t),i=Number(e),r==r&&i==i?r>i||!(r<i)&&n:(r!=r||i==i)&&(i==i&&r!=r||t>e||!(t<e)&&(t==e?n:(r=t.toString())>(i=e.toString())||r==i&&n))}function c(t,e,n){return s.aeq(t,e)?0:s.lt(t,e,!1)?n?1:-1:s.gt(t,e,!1)?n?-1:1:0}function h(t,e,n){for(var r,i,s,a,u,l=0,h=0,f=t.length;h<f;h++)if(~(i=(r=t[h])[0]).indexOf(".")?(u=i.split("."),s=o.getIn(e,u,!0),a=o.getIn(n,u,!0)):(s=e[i],a=n[i]),0!==(l=c(s,a,r[1])))return l;return 0}function f(t,e,n,r,i,o){var s,a=o||0,u=e[a],l=!1;if("object"==typeof t&&u in t&&(s=t[u]),a+1>=e.length)l=n(s,r,i);else if(Array.isArray(s))for(var c=0,h=s.length;c<h&&!0!==(l=f(s[c],e,n,r,i,a+1));c+=1);else l=f(s,e,n,r,i,a+1);return l}function p(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 d(e,n,r){for(var i in n)if(t.call(n,i))return m[i](e,n[i],r);return!1}var m={$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 s.aeq(t,e)},$gt:function(t,e){return s.gt(t,e,!1)},$gte:function(t,e){return s.gt(t,e,!0)},$lt:function(t,e){return s.lt(t,e,!1)},$lte:function(t,e){return s.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&&s.gt(t,e[0],!0)&&s.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)},$inSet:function(t,e){return e.has(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!m.$containsAny(t,e)},$containsAny:function(t,e){var n=p(t);return null!==n&&(Array.isArray(e)?e.some(n):n(e))},$contains:function(t,e){var n=p(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(".")?f(t,n.split("."),d,e[n],t):d(t[n],r,t)}))}))},$type:function(t,e,n){var r=typeof t;return"object"===r&&(Array.isArray(t)?r="array":t instanceof Date&&(r="date")),"object"!=typeof e?r===e:d(r,e,n)},$finite:function(t,e){return e===isFinite(t)},$size:function(t,e,n){return!!Array.isArray(t)&&("object"!=typeof e?t.length===e:d(t.length,e,n))},$len:function(t,e,n){return"string"==typeof t&&("object"!=typeof e?t.length===e:d(t.length,e,n))},$where:function(t,e){return!0===e(t)},$not:function(t,e,n){return!d(t,e,n)},$and:function(t,e,n){for(var r=0,i=e.length;r<i;r+=1)if(!d(t,e[r],n))return!1;return!0},$or:function(t,e,n){for(var r=0,i=e.length;r<i;r+=1)if(d(t,e[r],n))return!0;return!1},$exists:function(t,e){return e?void 0!==t:void 0===t}};["$eq","$aeq","$ne","$dteq","$gt","$gte","$lt","$lte","$jgt","$jgte","$jlt","$jlte","$type"].forEach((function(t){var e=m[t];m["$"+t]=function(t,n,r){if("string"==typeof n)return e(t,r[n]);if("function"==typeof n)return e(t,n(r));throw new Error("Invalid argument to $$ matcher")}}));var v={$eq:m.$eq,$aeq:!0,$dteq:!0,$gt:!0,$gte:!0,$lt:!0,$lte:!0,$in:!0,$between:!0};function g(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=g(t,"shallow"),Object.keys(t).forEach((function(e){"object"==typeof t[e]&&"Object"===t[e].constructor.name?n[e]=g(t[e],"shallow-recurse-objects"):Array.isArray(t[e])&&(n[e]=y(t[e],"shallow-recurse-objects"))}))}return n}function y(t,e){if("parse-stringify"==e)return g(t,e);for(var n=[],r=0,i=t.length;r<i;r++)n[r]=g(t[r],e);return n}function b(){try{return window&&void 0!==window.localStorage&&null!==window.localStorage}catch(t){return!1}}function _(){}function w(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:[]};var r=function(){return void 0!==n.g&&(n.g.android||n.g.NSObject)?"NATIVESCRIPT":"undefined"==typeof window||void 0!==n.g&&n.g.window&&"undefined"!=typeof process?"NODEJS":"undefined"!=typeof document?-1===document.URL.indexOf("http://")&&-1===document.URL.indexOf("https://")?"CORDOVA":"BROWSER":"CORDOVA"};e&&e.hasOwnProperty("env")?this.ENV=e.env:this.ENV=r(),"undefined"===this.ENV&&(this.ENV="NODEJS"),this.configureOptions(e,!0),this.on("init",this.clearChanges)}function x(t){this.hashStore={},this.options=t||{},this.options.hasOwnProperty("asyncResponses")||(this.options.asyncResponses=!1),this.options.hasOwnProperty("asyncTimeout")||(this.options.asyncTimeout=50)}function S(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 T(){try{this.fs=n(693)}catch(t){this.fs=null}}function k(){}function C(t,e){return e=e||{},this.collection=t,this.filteredrows=[],this.filterInitialized=!1,this}function O(t,e){if("$regex"===t)Array.isArray(e)?e=new RegExp(e[0],e[1]):e instanceof RegExp||(e=new RegExp(e));else if("object"==typeof e)for(var n in e)"$regex"!==n&&"object"!=typeof e[n]||(e[n]=O(n,e[n]));return e}function E(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 C(t),this.resultdata=[],this.resultsdirty=!1,this.cachedresultset=null,this.filterPipeline=[],this.collection.disableFreeze||Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,this.events={rebuild:[],filter:[],sort:[]}}function A(e,n){this.name=e,this.data=[],this.idIndex=null,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)}))),n.hasOwnProperty("exact")&&n.exact.forEach((function(t){r.constraints.exact[t]=new q(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.disableFreeze=!n.hasOwnProperty("disableFreeze")||n.disableFreeze,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=[];var i=[];if(n&&n.indices)if("[object Array]"===Object.prototype.toString.call(n.indices))i=n.indices;else{if("string"!=typeof n.indices)throw new TypeError("Indices needs to be a string or an array of strings");i=[n.indices]}for(var o=0;o<i.length;o++)this.ensureIndex(i[o]);function s(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){}}))}function a(t,e){return e?u(e,t):JSON.parse(JSON.stringify(t))}function u(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 i={},o=0;o<n.length;o++){var s=n[o];if(e.hasOwnProperty(s))if(!t.hasOwnProperty(s)||r.uniqueNames.indexOf(s)>=0||"$loki"==s||"meta"==s)i[s]=e[s];else{var a=u(t[s],e[s]);void 0!==a&&a!={}&&(i[s]=a)}}return 0===Object.keys(i).length?void 0:i}return t===e?void 0:e}function l(){r.changes=[]}this.observerCallback=s,this.getChangeDelta=a,this.getObjectDelta=u,this.getChanges=function(){return r.changes},this.flushChanges=l,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)})),l()}function P(t){return-1!==t.indexOf(".")}function I(t){return parseFloat(t,10)}function M(t,e){return t+e}function D(t,e){return t-e}function N(t){return t.reduce(M,0)/t.length}function R(t){var e=N(t),n=N(t.map((function(t){var n=t-e;return n*n})));return Math.sqrt(n)}function j(t,e,n){if(!1===n)return t[e];for(var r=e.split("."),i=t;r.length>0;)i=i[r.shift()];return i}function F(t,e,n){for(var r,i,o=0,s=t.length;o<s;){if(i=o+s>>1,0===(r=n.apply(null,[e,t[i]])))return{found:!0,index:i};r<0?s=i:o=i+1}return{found:!1,index:s}}function V(t){return function(e,n){return F(e,n,t)}}function L(){}function z(t){this.field=t,this.keyMap=Object.create(null),this.lokiMap=Object.create(null)}function q(t){this.index=Object.create(null),this.field=t}function B(t){this.field=t}return _.prototype.events={},_.prototype.asyncListeners=!1,_.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)},_.prototype.emit=function(t){var e,n=this;if(!t||!this.events[t])throw new Error("No event "+t+" defined");this.events[t].length&&(e=Array.prototype.slice.call(arguments,1),this.events[t].forEach((function(t){n.asyncListeners?setTimeout((function(){t.apply(n,e)}),1):t.apply(n,e)})))},_.prototype.addListener=_.prototype.on,_.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)}},w.prototype=new _,w.prototype.constructor=w,w.prototype.getIndexedAdapter=function(){return n(7996)},w.prototype.configureOptions=function(t,e){var n={NODEJS:"fs",BROWSER:"localStorage",CORDOVA:"localStorage",MEMORY:"memory"},r={fs:T,localStorage:k,memory:x};if(this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,void 0!==t){if(this.options=t,this.options.hasOwnProperty("persistenceMethod")&&"function"==typeof r[t.persistenceMethod]&&(this.persistenceMethod=t.persistenceMethod,this.persistenceAdapter=new r[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 i=this;setTimeout((function(){i.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=n[this.ENV],this.persistenceMethod&&(this.persistenceAdapter=new r[this.persistenceMethod]))},w.prototype.copy=function(t){var e,n,r=new w(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},w.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 i=new A(t,e);return i.isIncremental=this.isIncremental,this.collections.push(i),this.verbose&&(i.lokiConsoleWrapper=console),i},w.prototype.loadCollection=function(t){if(!t.name)throw new Error("Collection must have a name property to be loaded");this.collections.push(t)},w.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},w.prototype.renameCollection=function(t,e){var n=this.getCollection(t);return n&&(n.name=e),n},w.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},w.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 A(t,{}),i=this.collections[e];for(var o in i)i.hasOwnProperty(o)&&r.hasOwnProperty(o)&&(i[o]=r[o]);return void this.collections.splice(e,1)}},w.prototype.getName=function(){return this.name},w.prototype.serializeReplacer=function(t,e){switch(t){case"autosaveHandle":case"persistenceAdapter":case"constraints":case"ttl":case"lokiConsoleWrapper":return null;case"throttledSavePending":case"throttledCallbacks":return;default:return e}},w.prototype.serialize=function(t){switch((t=t||{}).hasOwnProperty("serializationMethod")||(t.serializationMethod=this.options.serializationMethod),t.serializationMethod){default:return JSON.stringify(this,this.serializeReplacer);case"pretty":return JSON.stringify(this,this.serializeReplacer,2);case"destructured":return this.serializeDestructured()}},w.prototype.toJson=w.prototype.serialize,w.prototype.serializeDestructured=function(t){var e,n,r,i,o,s=[];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((o=new w(this.filename)).loadJSONObject(this),e=0;e<o.collections.length;e++)o.collections[e].data=[];if(!0===t.partitioned&&-1===t.partition)return o.serialize({serializationMethod:"normal"});for(s.push(o.serialize({serializationMethod:"normal"})),o=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(i=r.length,n=0;n<i;n++)s.push(r[n]),r[n]=null;s.push("")}else s.push(r);return t.partitioned?(t.delimited,s):t.delimited?(s.push(""),s.join(t.delimiter)):(s.push(""),s)},w.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},w.prototype.deserializeDestructured=function(t,e){var n,r,i,o=[],s=0,a=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,s=0;s<r;s++)n.collections[s].data=this.deserializeCollection(t[s+1],e);return n}if(e.delimited){if(o=t.split(e.delimiter),t=null,0===o.length)return null}else o=t;for(r=(n=JSON.parse(o[0])).collections.length,o[0]=null;!u;)o[a],""===o[a]?++s>r&&(u=!0):(i=JSON.parse(o[a]),n.collections[s].data.push(i)),o[a++]=null;return n},w.prototype.deserializeCollection=function(t,e){var n,r,i=[];for((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),e.delimited?(i=t.split(e.delimiter)).pop():i=t,r=i.length,n=0;n<r;n++)i[n]=JSON.parse(i[n]);return i},w.prototype.loadJSON=function(t,e){var n;n=0===t.length?{}:"destructured"===this.options.serializationMethod?this.deserializeDestructured(t):JSON.parse(t),this.loadJSONObject(n,e)},w.prototype.loadJSONObject=function(t,n){var r,i,s,a,u,l,c=0,h=t.collections?t.collections.length:0;function f(t){var e,r=n[t.name];return r.proto?(e=r.inflate||o.copyProperties,function(t){var n=new r.proto;return e(t,n),n}):r.inflate}for(this.name=t.name,t.hasOwnProperty("throttledSaves")&&n&&!n.hasOwnProperty("throttledSaves")&&(this.throttledSaves=t.throttledSaves),this.collections=[];c<h;c+=1){if(r=t.collections[c],(i=this.addCollection(r.name,{disableChangesApi:r.disableChangesApi,disableDeltaChangesApi:r.disableDeltaChangesApi,disableMeta:r.disableMeta,disableFreeze:!r.hasOwnProperty("disableFreeze")||r.disableFreeze})).adaptiveBinaryIndices=!!r.hasOwnProperty("adaptiveBinaryIndices")&&!0===r.adaptiveBinaryIndices,i.transactional=r.transactional,i.asyncListeners=r.asyncListeners,i.cloneObjects=r.cloneObjects,i.cloneMethod=r.cloneMethod||"parse-stringify",i.autoupdate=r.autoupdate,i.changes=r.changes,i.dirtyIds=r.dirtyIds||[],n&&!0===n.retainDirtyFlags?i.dirty=r.dirty:i.dirty=!1,s=r.data.length,a=0,n&&n.hasOwnProperty(r.name))for(u=f(r);a<s;a++)l=u(r.data[a]),i.data[a]=l,i.addAutoUpdateObserver(l),i.disableFreeze||e(i.data[a]);else for(;a<s;a++)i.data[a]=r.data[a],i.addAutoUpdateObserver(i.data[a]),i.disableFreeze||e(i.data[a]);if(i.maxId=void 0===r.maxId?0:r.maxId,void 0!==r.binaryIndices&&(i.binaryIndices=r.binaryIndices),void 0!==r.transforms&&(i.transforms=r.transforms),i.uniqueNames=[],r.hasOwnProperty("uniqueNames")&&(i.uniqueNames=r.uniqueNames),void 0!==r.DynamicViews){for(var p=0;p<r.DynamicViews.length;p++){var d=r.DynamicViews[p],m=i.addDynamicView(d.name,d.options);m.resultdata=d.resultdata,m.resultsdirty=d.resultsdirty,m.filterPipeline=d.filterPipeline,m.sortCriteriaSimple=d.sortCriteriaSimple,m.sortCriteria=d.sortCriteria,m.sortFunction=null,m.sortDirty=d.sortDirty,i.disableFreeze||(e(m.filterPipeline),m.sortCriteriaSimple?e(m.sortCriteriaSimple):m.sortCriteria&&e(m.sortCriteria)),m.resultset.filteredrows=d.resultset.filteredrows,m.resultset.filterInitialized=d.resultset.filterInitialized,m.rematerialize({removeWhereFilters:!0})}t.databaseVersion<1.5&&(i.ensureAllIndexes(!0),i.dirty=!0)}}},w.prototype.close=function(t){this.autosave&&(this.autosaveDisable(),this.autosaveDirty()&&(this.saveDatabase(t),t=void 0)),t&&this.on("close",t),this.emit("close")},w.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},w.prototype.serializeChanges=function(t){return JSON.stringify(this.generateChangesNotification(t))},w.prototype.clearChanges=function(){this.collections.forEach((function(t){t.flushChanges&&t.flushChanges()}))},x.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)},x.prototype.saveDatabase=function(t,e,n){var r,i=this;this.options.asyncResponses?setTimeout((function(){r=i.hashStore.hasOwnProperty(t)?i.hashStore[t].savecount:0,i.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())},x.prototype.deleteDatabase=function(t,e){this.hashStore.hasOwnProperty(t)&&delete this.hashStore[t],"function"==typeof e&&e()},S.prototype.loadDatabase=function(t,e){var n=this;this.dbname=t,this.dbref=new w(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)}))},S.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 i=r.dbref.deserializeCollection(n,{delimited:!0,collectionIndex:t});r.dbref.collections[t].data=i,++t<r.dbref.collections.length?r.loadNextPartition(t,e):e()}))},S.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 i,o=r.length,s=""===r[o-1];for(s&&(r.pop(),""===r[(o=r.length)-1]&&1===o&&(r.pop(),o=r.length)),i=0;i<o;i++)n.dbref.collections[n.pageIterator.collection].data.push(JSON.parse(r[i])),r[i]=null;r=[],s?++n.pageIterator.collection<n.dbref.collections.length?n.loadNextPartition(n.pageIterator.collection,t):t():(n.pageIterator.pageIndex++,n.loadNextPage(t))}))},S.prototype.exportDatabase=function(t,e,n){var r,i=e.collections.length;for(this.dbref=e,this.dbname=t,this.dirtyPartitions=[-1],r=0;r<i;r++)e.collections[r].dirty&&this.dirtyPartitions.push(r);this.saveNextPartition((function(t){n(t)}))},S.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 i=this.dbref.serializeDestructured({partitioned:!0,delimited:!0,partition:n});this.adapter.saveDatabase(r,i,(function(n){n?t(n):0===e.dirtyPartitions.length?t(null):e.saveNextPartition(t)}))},S.prototype.saveNextPage=function(t){var e=this,n=this.dbref.collections[this.pageIterator.collection],r=this.dbname+"."+this.pageIterator.collection+"."+this.pageIterator.pageIndex,i=0,o=n.data.length,s=this.options.delimiter.length,a="",u="",l=!1,c=!1,h=function(n){u="",n&&t(n),l?t(null):(e.pageIterator.pageIndex++,e.saveNextPage(t))};for(0===n.data.length&&(l=!0);;)if(l||(a=JSON.stringify(n.data[this.pageIterator.docIndex]),u+=a,i+=a.length,++this.pageIterator.docIndex>=o&&(l=!0)),i>=this.options.pageSize&&(c=!0),c&&!l||(u+=this.options.delimiter,i+=s),l||c)return void this.adapter.saveDatabase(r,u,h)},T.prototype.loadDatabase=function(t,e){var n=this;this.fs.stat(t,(function(r,i){!r&&i.isFile()?n.fs.readFile(t,{encoding:"utf8"},(function(t,n){e(t?new Error(t):n)})):e(null)}))},T.prototype.saveDatabase=function(t,e,n){var r=this,i=t+"~";this.fs.writeFile(i,e,(function(e){e?n(new Error(e)):r.fs.rename(i,t,n)}))},T.prototype.deleteDatabase=function(t,e){this.fs.unlink(t,(function(t){t?e(new Error(t)):e()}))},k.prototype.loadDatabase=function(t,e){b()?e(localStorage.getItem(t)):e(new Error("localStorage is not available"))},k.prototype.saveDatabase=function(t,e,n){b()?(localStorage.setItem(t,e),n(null)):n(new Error("localStorage is not available"))},k.prototype.deleteDatabase=function(t,e){b()?(localStorage.removeItem(t),e(null)):e(new Error("localStorage is not available"))},w.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)},w.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 i=!1;try{r.loadJSON(e,t||{}),i=!0}catch(t){n(t)}i&&(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"))},w.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)},w.prototype.saveDatabaseInternal=function(t){var e,n=t||function(t){if(t)throw t},r=this;this.persistenceAdapter?"incremental"===this.persistenceAdapter.mode?(this.ignoreAutosave=!0,this.persistenceAdapter.saveDatabase(this.filename,(function(){if(r.ignoreAutosave=!1,!e){var t=r.copy({removeNonSerializable:!0});return e=r.collections.map((function(t){return[t.dirty,t.dirtyIds]})),r.collections.forEach((function(t){t.dirty=!1,t.dirtyIds=[]})),t}n(new Error("adapter error - getLokiCopy called more than once"))}),(function(t){r.ignoreAutosave=!1,t&&e&&r.collections.forEach((function(t,n){var r=e[n];t.dirty=t.dirty||r[0],t.dirtyIds=t.dirtyIds.concat(r[1])})),n(t)}))):"reference"===this.persistenceAdapter.mode&&"function"==typeof this.persistenceAdapter.exportDatabase?this.persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}),(function(t){r.autosaveClearFlags(),n(t)})):(this.autosaveClearFlags(),this.persistenceAdapter.saveDatabase(this.filename,this.serialize(),(function(t){n(t)}))):n(new Error("persistenceAdapter not configured"))},w.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)},w.prototype.save=w.prototype.saveDatabase,w.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"))},w.prototype.autosaveDirty=function(){for(var t=0;t<this.collections.length;t++)if(this.collections[t].dirty)return!0;return!1},w.prototype.autosaveClearFlags=function(){for(var t=0;t<this.collections.length;t++)this.collections[t].dirty=!1},w.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.ignoreAutosave&&r.saveDatabase(e)}),n)},w.prototype.autosaveDisable=function(){void 0!==this.autosaveHandle&&null!==this.autosaveHandle&&(clearInterval(this.autosaveHandle),this.autosaveHandle=null)},C.prototype.reset=function(){return this.filteredrows.length>0&&(this.filteredrows=[]),this.filterInitialized=!1,this},C.prototype.toJSON=function(){var t=this.copy();return t.collection=null,t},C.prototype.limit=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new C(this.collection);return e.filteredrows=this.filteredrows.slice(0,t),e.filterInitialized=!0,e},C.prototype.offset=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new C(this.collection);return e.filteredrows=this.filteredrows.slice(t),e.filterInitialized=!0,e},C.prototype.copy=function(){var t=new C(this.collection);return this.filteredrows.length>0&&(t.filteredrows=this.filteredrows.slice()),t.filterInitialized=this.filterInitialized,t},C.prototype.branch=C.prototype.copy,C.prototype.transform=function(t,e){var n,r,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!==e&&(t=o.resolveTransformParams(t,e)),n=0;n<t.length;n++)switch((r=t[n]).type){case"find":i.find(r.value);break;case"where":i.where(r.value);break;case"simplesort":i.simplesort(r.property,r.desc||r.options);break;case"compoundsort":i.compoundsort(r.value);break;case"sort":i.sort(r.value);break;case"limit":i=i.limit(r.value);break;case"offset":i=i.offset(r.value);break;case"map":i=i.map(r.value,r.dataOptions);break;case"eqJoin":i=i.eqJoin(r.joinData,r.leftJoinKey,r.rightJoinKey,r.mapFun,r.dataOptions);break;case"mapReduce":i=i.mapReduce(r.mapFunction,r.reduceFunction);break;case"update":i.update(r.value);break;case"remove":i.remove()}return i},C.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},C.prototype.simplesort=function(t,e){var n,r=10,i=this.collection.data.length,s=this.filteredrows.length,a=this.collection.binaryIndices.hasOwnProperty(t);if(void 0!==e&&!1!==e||(e={desc:!1}),!0===e&&(e={desc:!0}),0===s){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),e.desc&&this.filteredrows.reverse(),this;this.filteredrows=this.collection.prepareFullDocIndex()}else if(!e.disableIndexIntersect&&a&&(n=i/s,e.useJavascriptSorting&&(r=6),n<=r||e.forceIndexIntersect)){var u,l=this.filteredrows,h={};for(u=0;u<s;u++)h[l[u]]=!0;var f=this.collection.binaryIndices[t].values;return this.filteredrows=f.filter((function(t){return h[t]})),e.desc&&this.filteredrows.reverse(),this}if(e.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 p,d,m,v,g,y,b=(p=t,d=e.desc,m=this.collection.data,function(t,e){return~p.indexOf(".")?(y=p.split("."),v=o.getIn(m[t],y,!0),g=o.getIn(m[e],y,!0)):(v=m[t][p],g=m[e][p]),c(v,g,d)});return this.filteredrows.sort(b),this},C.prototype.compoundsort=function(t){if(0===t.length)throw new Error("Invalid call to compoundsort, need at least one property");var e;if(1===t.length)return e=t[0],Array.isArray(e)?this.simplesort(e[0],e[1]):this.simplesort(e,!1);for(var n=0,r=t.length;n<r;n+=1)e=t[n],Array.isArray(e)||(t[n]=[e,!1]);this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var i,o,s=(i=t,o=this.collection.data,function(t,e){return h(i,o[t],o[e])});return this.filteredrows.sort(s),this},C.prototype.findOr=function(t){for(var e=null,n=0,r=0,i=[],o=[],s=0,a=(this.count(),0),u=t.length;a<u;a++)for(r=(e=this.branch().find(t[a]).filteredrows).length,n=0;n<r;n++)void 0===o[s=e[n]]&&(o[s]=!0,i.push(s));return this.filteredrows=i,this.filterInitialized=!0,this},C.prototype.$or=C.prototype.findOr,C.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},C.prototype.$and=C.prototype.findAnd,C.prototype.find=function(e,n){if(0===this.collection.data.length)return this.filteredrows=[],this.filterInitialized=!0,this;var r,i,s,a,u,l,c,h=e||"getAll",p=!1,d=[],g=[],y=null;if(n=n||!1,"object"==typeof h){for(r in h)(a={})[r]=h[r],g.push(a),t.call(h,r)&&(i=r,s=h[r]);if(g.length>1)return this.find({$and:g},n)}if(!i||"getAll"===h)return n&&(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](s),n&&this.filteredrows.length>1&&(this.filteredrows=this.filteredrows.slice(0,1)),this;if(null===s||"object"!=typeof s||s instanceof Date)u="$eq",l=s;else{if("object"!=typeof s)throw new Error("Do not know what you want to do.");for(c in s)if(t.call(s,c)){u=c,l=s[c];break}}"$regex"!==u&&"object"!=typeof l||(l=O(u,l));var b=-1!==i.indexOf(".");!this.filterInitialized&&this.collection.binaryIndices[i]&&v[u]&&(!0!==this.collection.adaptiveBinaryIndices&&this.collection.ensureIndex(i),p=!0,y=this.collection.binaryIndices[i]),!p&&"$in"===u&&Array.isArray(l)&&"undefined"!=typeof Set&&(l=new Set(l),u="$inSet");var _,w,x=m[u],S=this.collection.data,T=0,k=0,C=0;if(this.filterInitialized){if(k=(_=this.filteredrows).length,b){for(i=i.split("."),T=0;T<k;T++)if(f(w=S[C=_[T]],i,x,l,w)&&(d.push(C),n))return this.filteredrows=d,this}else for(T=0;T<k;T++)if(x((w=S[C=_[T]])[i],l,w)&&(d.push(C),n))return this.filteredrows=d,this}else if(p){var E=this.collection.calculateRange(u,i,l);if("$in"!==u){for(T=E[0];T<=E[1];T++)if(!0!==v[u]){if(v[u](o.getIn(S[y.values[T]],i,b),l)&&(d.push(y.values[T]),n))return this.filteredrows=d,this.filterInitialized=!0,this}else if(d.push(y.values[T]),n)return this.filteredrows=d,this.filterInitialized=!0,this}else for(T=0,k=E.length;T<k;T++)if(d.push(y.values[E[T]]),n)return this.filteredrows=d,this.filterInitialized=!0,this}else if(k=S.length,b){for(i=i.split("."),T=0;T<k;T++)if(f(w=S[T],i,x,l,w)&&(d.push(T),n))return this.filteredrows=d,this.filterInitialized=!0,this}else for(T=0;T<k;T++)if(x((w=S[T])[i],l,w)&&(d.push(T),n))return this.filteredrows=d,this.filterInitialized=!0,this;return this.filteredrows=d,this.filterInitialized=!0,this},C.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 i=this.collection.data.length;i--;)!0===e(this.collection.data[i])&&n.push(i);return this.filteredrows=n,this.filterInitialized=!0,this}catch(t){throw t}},C.prototype.count=function(){return this.filterInitialized?this.filteredrows.length:this.collection.count()},C.prototype.data=function(t){var e,n,r,i,o=[],s=this.collection.data;if((t=t||{}).removeMeta&&!t.forceClones&&(t.forceClones=!0,t.forceCloneMethod=t.forceCloneMethod||"shallow"),!this.collection.disableDeltaChangesApi&&this.collection.disableFreeze&&(t.forceClones=!0,t.forceCloneMethod="parse-stringify"),!this.filterInitialized){if(0===this.filteredrows.length){if(this.collection.cloneObjects||t.forceClones){for(n=s.length,i=t.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)e=g(s[r],i),t.removeMeta&&(delete e.$loki,delete e.meta),o.push(e);return o}return s.slice()}this.filterInitialized=!0}var a=this.filteredrows;if(n=a.length,this.collection.cloneObjects||t.forceClones)for(i=t.forceCloneMethod||this.collection.cloneMethod,r=0;r<n;r++)e=g(s[a[r]],i),t.removeMeta&&(delete e.$loki,delete e.meta),o.push(e);else for(r=0;r<n;r++)o.push(s[a[r]]);return o},C.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,i=0;i<n;i++)this.disableFreeze&&!this.collection.cloneObjects&&this.collection.disableDeltaChangesApi?(t(r[this.filteredrows[i]]),this.collection.update(r[this.filteredrows[i]])):(t(e=g(r[this.filteredrows[i]],this.collection.cloneMethod)),this.collection.update(e));return this},C.prototype.remove=function(){return this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex()),this.collection.removeBatchByPositions(this.filteredrows),this.filteredrows=[],this},C.prototype.mapReduce=function(t,e){try{return e(this.data().map(t))}catch(t){throw t}},C.prototype.eqJoin=function(t,e,n,r,i){var o,s,a,u=[],l=[],c=[],h="function"==typeof e,f="function"==typeof n,p={};if(o=(u=this.data(i)).length,t instanceof A)l=t.chain().data(i);else if(t instanceof C)l=t.data(i);else{if(!Array.isArray(t))throw new TypeError("joinData needs to be an array or result set");l=t}s=l.length;for(var d=0;d<s;d++)p[a=f?n(l[d]):l[d][n]]=l[d];r||(r=function(t,e){return{left:t,right:e}});for(var m=0;m<o;m++)a=h?e(u[m]):u[m][e],c.push(r(u[m],p[a]||{}));return this.collection=new A("joinData"),this.collection.insert(c),this.filteredrows=[],this.filterInitialized=!1,this},C.prototype.map=function(t,e){var n=this.data(e).map(t);return this.collection=new A("mappedData"),this.collection.insert(n),this.filteredrows=[],this.filterInitialized=!1,this},E.prototype=new _,E.prototype.constructor=E,E.prototype.getSort=function(){return this.sortFunction||this.sortCriteria||this.sortCriteriaSimple},E.prototype.rematerialize=function(t){var e,n,r;t=t||{},this.resultdata=[],this.resultsdirty=!0,this.resultset=new C(this.collection),(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple)&&(this.sortDirty=!0);var i=Object.isFrozen(this.filterPipeline);if(t.hasOwnProperty("removeWhereFilters"))for(i&&(this.filterPipeline=this.filterPipeline.slice()),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,o[r].uid);return i&&Object.freeze(this.filterPipeline),this.data(),this.emit("rebuild",this),this},E.prototype.branchResultset=function(t,e){var n=this.resultset.branch();return void 0===t?n:n.transform(t,e)},E.prototype.toJSON=function(){var t=new E(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},E.prototype.removeFilters=function(t){t=t||{},this.rebuildPending=!1,this.resultset.reset(),this.resultdata=[],this.resultsdirty=!0,this.cachedresultset=null;var e=Object.isFrozen(this.filterPipeline),n=this.filterPipeline.length>0;this.filterPipeline=[],e&&Object.freeze(this.filterPipeline),this.sortFunction=null,this.sortCriteria=null,this.sortCriteriaSimple=null,this.sortDirty=!1,!0===t.queueSortPhase&&this.queueSortPhase(),n&&this.emit("filter")},E.prototype.applySort=function(t){return this.sortFunction=t,this.sortCriteria=null,this.sortCriteriaSimple=null,this.queueSortPhase(),this.emit("sort"),this},E.prototype.applySimpleSort=function(t,n){return this.sortCriteriaSimple={propname:t,options:n||!1},this.collection.disableFreeze||e(this.sortCriteriaSimple),this.sortCriteria=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},E.prototype.applySortCriteria=function(t){return this.sortCriteria=t,this.collection.disableFreeze||e(this.sortCriteria),this.sortCriteriaSimple=null,this.sortFunction=null,this.queueSortPhase(),this.emit("sort"),this},E.prototype.startTransaction=function(){return this.cachedresultset=this.resultset.copy(),this},E.prototype.commit=function(){return this.cachedresultset=null,this},E.prototype.rollback=function(){return this.resultset=this.cachedresultset,this.options.persistent&&(this.resultdata=this.resultset.data(),this.emit("rebuild",this)),this},E.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},E.prototype._addFilter=function(t){var n=Object.isFrozen(this.filterPipeline);n&&(this.filterPipeline=this.filterPipeline.slice()),this.collection.disableFreeze||e(t),this.filterPipeline.push(t),n&&Object.freeze(this.filterPipeline),this.resultset[t.type](t.val)},E.prototype.reapplyFilters=function(){this.resultset.reset(),this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0);var t=this.filterPipeline,e=Object.isFrozen(t);this.filterPipeline=[];for(var n=0,r=t.length;n<r;n+=1)this._addFilter(t[n]);return e&&Object.freeze(this.filterPipeline),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this.emit("filter"),this},E.prototype.applyFilter=function(t){var e=this._indexOfFilterWithId(t.uid);if(e>=0){var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline[e]=t,n&&(r(t),Object.freeze(this.filterPipeline)),this.reapplyFilters()}return 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.emit("filter"),this},E.prototype.applyFind=function(t,e){return this.applyFilter({type:"find",val:t,uid:e}),this},E.prototype.applyWhere=function(t,e){return this.applyFilter({type:"where",val:t,uid:e}),this},E.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);var n=Object.isFrozen(this.filterPipeline);return n&&(this.filterPipeline=this.filterPipeline.slice()),this.filterPipeline.splice(e,1),n&&Object.freeze(this.filterPipeline),this.reapplyFilters(),this},E.prototype.count=function(){return this.resultsdirty&&(this.resultdata=this.resultset.data()),this.resultset.count()},E.prototype.data=function(t){return(this.sortDirty||this.resultsdirty)&&this.performSortPhase({suppressRebuildEvent:!0}),this.options.persistent?this.resultdata:this.resultset.data(t)},E.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)}},E.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()}},E.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))},E.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,i=e?-1:r.indexOf(+t),o=r.length,s=new C(this.collection);s.filteredrows=[t],s.filterInitialized=!0;for(var a=0,u=this.filterPipeline.length;a<u;a++)s[(n=this.filterPipeline[a]).type](n.val);var l=0===s.filteredrows.length?-1:0;return-1!==i||-1!==l?-1===i&&-1!==l?(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!==i&&-1===l?(i<o-1?(r.splice(i,1),this.options.persistent&&this.resultdata.splice(i,1)):(r.length=o-1,this.options.persistent&&(this.resultdata.length=o-1)),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):-1!==i&&-1!==l?(this.options.persistent&&(this.resultdata[i]=this.collection.data[t]),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent())):void 0:void 0},E.prototype.removeDocument=function(t){var e,n,r,i={},o={},s=[],a=this.resultset,u=this.resultset.filteredrows,l=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++)i[t[n]]=!0;for(e=0;e<l;e++)i[u[e]]&&(o[e]=!0);Object.keys(o).length>0&&(this.resultset.filteredrows=this.resultset.filteredrows.filter((function(t,e){return!o[e]})),this.options.persistent&&(this.resultdata=this.resultdata.filter((function(t,e){return!o[e]}))),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var c=function(t){return function(e){return e<a.filteredrows[t]}};for(l=a.filteredrows.length,e=0;e<l;e++)s=t.filter(c(e)),a.filteredrows[e]-=s.length},E.prototype.mapReduce=function(t,e){try{return e(this.data().map(t))}catch(t){throw t}},A.prototype=new _,A.prototype.contructor=A,A.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)})},A.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},A.prototype.updateMeta=function(t){return this.disableMeta||!t||(this.disableFreeze||((t=i(t)).meta=i(t.meta)),t.meta.updated=(new Date).getTime(),t.meta.revision+=1),t},A.prototype.createInsertChange=function(t){this.createChange(this.name,"I",t)},A.prototype.createUpdateChange=function(t,e){this.createChange(this.name,"U",t,e)},A.prototype.insertMetaWithChange=function(t){this.insertMeta(t),this.createInsertChange(t)},A.prototype.updateMetaWithChange=function(t,e,n){return t=this.updateMeta(t,n),this.createUpdateChange(t,e),t},A.prototype.lokiConsoleWrapper={log:function(){},warn:function(){},error:function(){}},A.prototype.addAutoUpdateObserver=function(t){this.autoupdate&&"function"==typeof Object.observe&&Object.observe(t,this.observerCallback,["add","update","delete","reconfigure","setPrototype"])},A.prototype.removeAutoUpdateObserver=function(t){this.autoupdate&&"function"==typeof Object.observe&&Object.unobserve(t,this.observerCallback)},A.prototype.addTransform=function(t,e){if(this.transforms.hasOwnProperty(t))throw new Error("a transform by that name already exists");this.transforms[t]=e},A.prototype.getTransform=function(t){return this.transforms[t]},A.prototype.setTransform=function(t,e){this.transforms[t]=e},A.prototype.removeTransform=function(t){delete this.transforms[t]},A.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}},A.prototype.findObject=function(t){return this.findOne(this.byExample(t))},A.prototype.findObjects=function(t){return this.find(this.byExample(t))},A.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()}},A.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))},A.prototype.prepareFullDocIndex=function(){for(var t=this.data.length,e=new Array(t),n=0;n<t;n+=1)e[n]=n;return e},A.prototype.configureOptions=function(t){(t=t||{}).hasOwnProperty("adaptiveBinaryIndices")&&(this.adaptiveBinaryIndices=t.adaptiveBinaryIndices,this.adaptiveBinaryIndices&&this.ensureAllIndexes())},A.prototype.ensureIndex=function(t,e){if(void 0===e&&(e=!1),null==t)throw new Error("Attempting to set index without an associated property");if((!this.binaryIndices[t]||e||this.binaryIndices[t].dirty)&&(!0!==this.adaptiveBinaryIndices||!this.binaryIndices.hasOwnProperty(t)||e)){var n={name:t,dirty:!0,values:this.prepareFullDocIndex()};this.binaryIndices[t]=n;var r,i,a,u,l,c=(r=t,i=this.data,l=!!~r.indexOf(".")&&r.split("."),function(t,e){if(l?(a=o.getIn(i[t],l,!0),u=o.getIn(i[e],l,!0)):(a=i[t][r],u=i[e][r]),a!==u){if(s.lt(a,u,!1))return-1;if(s.gt(a,u,!1))return 1}return 0});n.values.sort(c),n.dirty=!1,this.dirty=!0}},A.prototype.checkAllIndexes=function(e){var n,r=this.binaryIndices,i=[];for(n in r)t.call(r,n)&&(this.checkIndex(n,e)||i.push(n));return i},A.prototype.checkIndex=function(t,e){(e=e||{}).randomSamplingFactor&&!1!==e.randomSampling&&(e.randomSampling=!0),e.randomSamplingFactor=e.randomSamplingFactor||.1,(e.randomSamplingFactor<0||e.randomSamplingFactor>1)&&(e.randomSamplingFactor=.1);var n,r,i,s,a,u=!0;if(!this.binaryIndices.hasOwnProperty(t))throw new Error("called checkIndex on property without an index: "+t);if(this.adaptiveBinaryIndices||this.ensureIndex(t),(s=(a=this.binaryIndices[t].values).length)!==this.data.length)return e.repair&&this.ensureIndex(t,!0),!1;if(0===s)return!0;var l=-1!==t.indexOf(".");if(1===s)u=0===a[0];else if(e.randomSampling){if(m.$lte(o.getIn(this.data[a[0]],t,l),o.getIn(this.data[a[1]],t,l))||(u=!1),m.$lte(o.getIn(this.data[a[s-2]],t,l),o.getIn(this.data[a[s-1]],t,l))||(u=!1),u)for(r=Math.floor((s-1)*e.randomSamplingFactor),n=0;n<r-1;n++)if(i=Math.floor(Math.random()*(s-1)),!m.$lte(o.getIn(this.data[a[i]],t,l),o.getIn(this.data[a[i+1]],t,l))){u=!1;break}}else for(n=0;n<s-1;n++)if(!m.$lte(o.getIn(this.data[a[n]],t,l),o.getIn(this.data[a[n+1]],t,l))){u=!1;break}return!u&&e.repair&&this.ensureIndex(t,!0),u},A.prototype.getBinaryIndexValues=function(t){var e,n=this.binaryIndices[t].values,r=[];for(e=0;e<n.length;e++)r.push(o.getIn(this.data[n[e]],t,!0));return r},A.prototype.getUniqueIndex=function(t,e){var n=this.constraints.unique[t];return!n&&e?this.ensureUniqueIndex(t):n},A.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 z(t),this.data.forEach((function(t){e.set(t)})),e},A.prototype.ensureAllIndexes=function(e){var n,r=this.binaryIndices;for(n in r)t.call(r,n)&&this.ensureIndex(n,e)},A.prototype.flagBinaryIndexesDirty=function(){var e,n=this.binaryIndices;for(e in n)t.call(n,e)&&(n[e].dirty=!0)},A.prototype.flagBinaryIndexDirty=function(t){this.binaryIndices[t]&&(this.binaryIndices[t].dirty=!0)},A.prototype.count=function(t){return t?this.chain().find(t).filteredrows.length:this.data.length},A.prototype.ensureId=function(){if(!this.idIndex){for(var t=this.data,e=0,n=t.length,r=new Array(n);e<n;e++)r[e]=t[e].$loki;this.idIndex=r}},A.prototype.ensureIdAsync=function(t){this.async((function(){this.ensureId()}),t)},A.prototype.addDynamicView=function(t,e){var n=new E(this,t,e);return this.DynamicViews.push(n),n},A.prototype.removeDynamicView=function(t){this.DynamicViews=this.DynamicViews.filter((function(e){return e.name!==t}))},A.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},A.prototype.findAndUpdate=function(t,e){"function"==typeof t?this.updateWhere(t,e):this.chain().find(t).update(e)},A.prototype.findAndRemove=function(t){this.chain().find(t).remove()},A.prototype.insert=function(t,e){if(!Array.isArray(t))return this.insertOne(t);var n,r=[],i=e&&!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0;i&&(this.adaptiveBinaryIndices=!1);try{this.emit("pre-insert",t);for(var o=0,s=t.length;o<s;o++){if(!(n=this.insertOne(t[o],!0)))return;r.push(n)}}finally{i&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}return this.emit("insert",r),1===(r=this.cloneObjects?g(r,this.cloneMethod):r).length?r[0]:r},A.prototype.insertOne=function(t,n){var r,o=null;if("object"!=typeof t?o=new TypeError("Document needs to be an object"):null===t&&(o=new TypeError("Object cannot be null")),null!==o)throw this.emit("error",o),o;var s=this.cloneObjects?g(t,this.cloneMethod):t;if(this.disableFreeze||(s=i(s)),this.disableMeta||(void 0===s.meta?s.meta={revision:0,created:0}:this.disableFreeze||(s.meta=i(s.meta))),n||this.emit("pre-insert",s),this.add(s))return this.disableChangesApi?this.insertMeta(s):this.insertMetaWithChange(s),this.disableFreeze||e(s),r=this.cloneObjects?g(s,this.cloneMethod):s,n||this.emit("insert",r),this.addAutoUpdateObserver(r),r},A.prototype.clear=function(t){var e=this;t=t||{},this.data=[],this.idIndex=null,this.cachedIndex=null,this.cachedBinaryIndex=null,this.cachedData=null,this.maxId=0,this.DynamicViews=[],this.dirty=!0,this.constraints={unique:{},exact:{}},!0===t.removeIndices?(this.binaryIndices={},this.uniqueNames=[]):Object.keys(this.binaryIndices).forEach((function(t){e.binaryIndices[t].dirty=!1,e.binaryIndices[t].values=[]}))},A.prototype.update=function(n){var r,i,o;if(Array.isArray(n)){o=n.length,(r=!this.cloneObjects&&this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0)&&(this.adaptiveBinaryIndices=!1);try{for(i=0;i<o;i+=1)this.update(n[i])}finally{r&&(this.ensureAllIndexes(),this.adaptiveBinaryIndices=!0)}}else{if(!t.call(n,"$loki"))throw new Error("Trying to update unsynced document. Please save the document first by using insert() or addMany()");try{this.startTransaction();var s,a,u,l,c,h=this.get(n.$loki,!0),f=this;if(!h)throw new Error("Trying to update a document not in collection.");s=h[0],u=h[1],a=this.cloneObjects||!this.disableDeltaChangesApi&&this.disableFreeze?g(n,this.cloneMethod):n,this.emit("pre-update",n),this.uniqueNames.forEach((function(t){f.getUniqueIndex(t,!0).update(s,a)})),this.data[u]=a,a!==n&&this.addAutoUpdateObserver(n);for(var p=0;p<this.DynamicViews.length;p++)this.DynamicViews[p].evaluateDocument(u,!1);if(this.adaptiveBinaryIndices){var d=this.binaryIndices;for(l in d)this.adaptiveBinaryIndexUpdate(u,l)}else this.flagBinaryIndexesDirty();return this.idIndex[u]=a.$loki,this.isIncremental&&this.dirtyIds.push(a.$loki),this.commit(),this.dirty=!0,a=this.disableChangesApi?this.updateMeta(a):this.updateMetaWithChange(a,s),this.disableFreeze||e(a),c=this.cloneObjects?g(a,this.cloneMethod):a,this.emit("update",c,s),c}catch(t){throw this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),t}}},A.prototype.add=function(t){if("object"!=typeof t)throw new TypeError("Object being added needs to be an object");if(void 0!==t.$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);var e=this.maxId;t.$loki=e,this.disableMeta||(t.meta.version=0);for(var n=0,r=this.uniqueNames.length;n<r;n++)this.getUniqueIndex(this.uniqueNames[n],!0).set(t);this.idIndex&&this.idIndex.push(e),this.isIncremental&&this.dirtyIds.push(e),this.data.push(t);var i=this.data.length-1,o=this.DynamicViews.length;for(n=0;n<o;n++)this.DynamicViews[n].evaluateDocument(i,!0);if(this.adaptiveBinaryIndices){var s=this.binaryIndices;for(var a in s)this.adaptiveBinaryIndexInsert(i,a)}else this.flagBinaryIndexesDirty();return this.commit(),this.dirty=!0,this.cloneObjects?g(t,this.cloneMethod):t}catch(t){throw this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),t}},A.prototype.updateWhere=function(t,e){var n,r=this.where(t),i=0;try{for(;i<r.length;i++)n=e(r[i]),this.update(n)}catch(t){this.rollback(),this.lokiConsoleWrapper.error(t.message)}},A.prototype.removeWhere=function(t){var e;"function"==typeof t?(e=this.data.filter(t),this.remove(e)):this.chain().find(t).remove()},A.prototype.removeDataOnly=function(){this.remove(this.data.slice())},A.prototype.removeBatchByPositions=function(t){var e,n,r,i,o=t.length,s={},a=Object.keys(this.binaryIndices).length,u=Object.keys(this.constraints.unique).length,l=this.adaptiveBinaryIndices&&Object.keys(this.binaryIndices).length>0,c=this;try{for(this.startTransaction(),this.ensureId(),r=0;r<o;r++)s[this.idIndex[t[r]]]=!0;if((e=this.DynamicViews.length)>0||a>0||u>0){if(e>0)for(n=0;n<e;n++)this.DynamicViews[n].removeDocument(t);if(this.adaptiveBinaryIndices&&!l){var h,f=this.binaryIndices;for(h in f)this.adaptiveBinaryIndexRemove(t,h)}else this.flagBinaryIndexesDirty();u&&this.uniqueNames.forEach((function(e){var n=c.getUniqueIndex(e);if(n)for(r=0;r<o;r++)null!==(i=c.data[t[r]])[e]&&void 0!==i[e]&&n.remove(i[e])}))}if(!this.disableChangesApi||this.events.delete.length>1)for(r=0;r<o;r++)this.emit("delete",this.data[t[r]]);if(this.data=this.data.filter((function(t){return!s[t.$loki]})),this.isIncremental)for(r=0;r<o;r++)this.dirtyIds.push(this.idIndex[t[r]]);this.idIndex=this.idIndex.filter((function(t){return!s[t]})),this.adaptiveBinaryIndices&&l&&(this.adaptiveBinaryIndices=!1,this.ensureAllIndexes(!0),this.adaptiveBinaryIndices=!0),this.commit(),this.dirty=!0}catch(t){return this.rollback(),l&&(this.adaptiveBinaryIndices=!0),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),null}},A.prototype.removeBatch=function(t){var e,n=t.length,r=this.data.length,i={},o=[];for(e=0;e<r;e++)i[this.data[e].$loki]=e;for(e=0;e<n;e++)"object"==typeof t[e]?o.push(i[t[e].$loki]):o.push(i[t[e]]);this.removeBatchByPositions(o)},A.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),o=n[1],s=this;this.uniqueNames.forEach((function(t){if(null!==e[t]&&void 0!==e[t]){var n=s.getUniqueIndex(t);n&&n.remove(e[t])}}));for(var a=0;a<this.DynamicViews.length;a++)this.DynamicViews[a].removeDocument(o);if(this.adaptiveBinaryIndices){var u,l=this.binaryIndices;for(u in l)this.adaptiveBinaryIndexRemove(o,u)}else this.flagBinaryIndexesDirty();return this.data.splice(o,1),this.removeAutoUpdateObserver(e),this.idIndex.splice(o,1),this.isIncremental&&this.dirtyIds.push(e.$loki),this.commit(),this.dirty=!0,this.emit("delete",n[0]),this.disableFreeze||(e=i(e)),delete e.$loki,delete e.meta,this.disableFreeze||r(e),e}catch(t){return this.rollback(),this.lokiConsoleWrapper.error(t.message),this.emit("error",t),null}}},A.prototype.get=function(t,e){this.idIndex||this.ensureId();var n=e||!1,r=this.idIndex,i=r.length-1,o=0,s=o+i>>1;if(t="number"==typeof t?t:parseInt(t,10),isNaN(t))throw new TypeError("Passed id is not an integer");for(;r[o]<r[i];)r[s=o+i>>1]<t?o=s+1:i=s;return i===o&&r[o]===t?n?[this.data[o],o]:this.data[o]:null},A.prototype.getBinaryIndexPosition=function(t,e){var n=o.getIn(this.data[t],e,!0),r=this.binaryIndices[e].values,i=this.calculateRange("$eq",e,n);if(0===i[0]&&-1===i[1])return null;for(var s=i[0],a=i[1],u=s;u<=a;u++)if(r[u]===t)return u;return null},A.prototype.adaptiveBinaryIndexInsert=function(t,e){var n=-1!==e.indexOf("."),r=this.binaryIndices[e].values,i=o.getIn(this.data[t],e,n);!0===this.serializableIndices&&i instanceof Date&&(this.data[t][e]=i.getTime(),i=o.getIn(this.data[t],e));var s=0===r.length?0:this.calculateRangeStart(e,i,!0,n);this.binaryIndices[e].values.splice(s,0,t)},A.prototype.adaptiveBinaryIndexUpdate=function(t,e){var n,r=this.binaryIndices[e].values,i=r.length;for(n=0;n<i&&r[n]!==t;n++);this.binaryIndices[e].values.splice(n,1),this.adaptiveBinaryIndexInsert(t,e)},A.prototype.adaptiveBinaryIndexRemove=function(t,e,n){var r,i,o,s,a,u,l,c=this.binaryIndices[e],h={};if(Array.isArray(t)){if(1!==(s=t.length)){for(o=0;o<s;o++)h[t[o]]=!0;if(c.values=c.values.filter((function(t){return!h[t]})),!0===n)return;var f=t.slice();for(f.sort((function(t,e){return t-e})),r=c.values.length,i=0;i<r;i++){for(a=c.values[i],u=0,o=0;o<s&&a>f[o];o++)u++;c.values[i]-=u}return}t=t[0]}if(null===(l=this.getBinaryIndexPosition(t,e)))return null;if(c.values.splice(l,1),!0!==n)for(r=c.values.length,i=0;i<r;i++)c.values[i]>t&&c.values[i]--},A.prototype.calculateRangeStart=function(t,e,n,r){var i=this.data,a=this.binaryIndices[t].values,u=0,l=a.length-1,c=0;if(0===a.length)return-1;for(o.getIn(i[a[u]],t,r),o.getIn(i[a[l]],t,r);u<l;)c=u+l>>1,s.lt(o.getIn(i[a[c]],t,r),e,!1)?u=c+1:l=c;var h=u;return s.aeq(e,o.getIn(i[a[h]],t,r))?h:s.lt(e,o.getIn(i[a[h]],t,r),!1)?n?h:h-1:n?h+1:h},A.prototype.calculateRangeEnd=function(t,e,n){var r=this.data,i=this.binaryIndices[t].values,a=0,u=i.length-1,l=0;if(0===i.length)return-1;for(o.getIn(r[i[a]],t,n),o.getIn(r[i[u]],t,n);a<u;)l=a+u>>1,s.lt(e,o.getIn(r[i[l]],t,n),!1)?u=l:a=l+1;var c=u;return s.aeq(e,o.getIn(r[i[c]],t,n))?c:s.gt(e,o.getIn(r[i[c]],t,n),!1)?c+1:s.aeq(e,o.getIn(r[i[c-1]],t,n))?c-1:c},A.prototype.calculateRange=function(t,e,n){var r,i,a,u=this.data,l=this.binaryIndices[e].values,c=0,h=l.length-1;if(0===u.length)return[0,-1];var f=-1!==e.indexOf("."),p=o.getIn(u[l[c]],e,f),d=o.getIn(u[l[h]],e,f);switch(t){case"$eq":case"$aeq":case"$dteq":if(s.lt(n,p,!1)||s.gt(n,d,!1))return[0,-1];break;case"$gt":if(s.gt(n,d,!0))return[0,-1];if(s.gt(p,n,!1))return[c,h];break;case"$gte":if(s.gt(n,d,!1))return[0,-1];if(s.gt(p,n,!0))return[c,h];break;case"$lt":if(s.lt(n,p,!0))return[0,-1];if(s.lt(d,n,!1))return[c,h];break;case"$lte":if(s.lt(n,p,!1))return[0,-1];if(s.lt(d,n,!0))return[c,h];break;case"$between":return s.gt(n[0],d,!1)||s.lt(n[1],p,!1)?[0,-1]:((r=this.calculateRangeStart(e,n[0],!1,f))<0&&r++,(a=this.calculateRangeEnd(e,n[1],f))>h&&a--,s.gt(o.getIn(u[l[r]],e,f),n[0],!0)||r++,s.lt(o.getIn(u[l[a]],e,f),n[1],!0)||a--,a<r?[0,-1]:[r,a]);case"$in":for(var m=[],v=[],g=0,y=n.length;g<y;g++)for(var b=this.calculateRange("$eq",e,n[g]),_=b[0];_<=b[1];_++)void 0===m[_]&&(m[_]=!0,v.push(_));return v}switch(t){case"$eq":case"$aeq":case"$dteq":case"$gte":case"$lt":r=this.calculateRangeStart(e,n,!1,f),i=o.getIn(u[l[r]],e,f)}switch(t){case"$eq":case"$aeq":case"$dteq":case"$lte":case"$gt":a=this.calculateRangeEnd(e,n,f),o.getIn(u[l[a]],e,f)}switch(t){case"$eq":case"$aeq":case"$dteq":return s.aeq(i,n)?[r,a]:[0,-1];case"$gt":return s.aeq(o.getIn(u[l[a]],e,f),n)?[a+1,h]:[a,h];case"$gte":return s.aeq(o.getIn(u[l[r]],e,f),n)?[r,h]:[r+1,h];case"$lt":return s.aeq(o.getIn(u[l[r]],e,f),n)?[c,r-1]:[c,r];case"$lte":return s.aeq(o.getIn(u[l[a]],e,f),n)?[c,a]:[c,a-1];default:return[0,u.length-1]}},A.prototype.by=function(t,e){var n;if(void 0===e)return n=this,function(e){return n.by(t,e)};var r=this.getUniqueIndex(t,!0).get(e);return this.cloneObjects?g(r,this.cloneMethod):r},A.prototype.findOne=function(t){t=t||{};var e=this.chain().find(t,!0).data();return Array.isArray(e)&&0===e.length?null:this.cloneObjects?g(e[0],this.cloneMethod):e[0]},A.prototype.chain=function(t,e){var n=new C(this);return void 0===t?n:n.transform(t,e)},A.prototype.find=function(t){return this.chain().find(t).data()},A.prototype.findOneUnindexed=function(t,e){for(var n=this.data.length;n--;)if(o.getIn(this.data[n],t,!0)===e)return this.data[n];return null},A.prototype.startTransaction=function(){if(this.transactional){this.cachedData=g(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()}},A.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()}},A.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()}},A.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)},A.prototype.where=function(t){return this.chain().where(t).data()},A.prototype.mapReduce=function(t,e){try{return e(this.data.map(t))}catch(t){throw t}},A.prototype.eqJoin=function(t,e,n,r,i){return new C(this).eqJoin(t,e,n,r,i)},A.prototype.stages={},A.prototype.getStage=function(t){return this.stages[t]||(this.stages[t]={}),this.stages[t]},A.prototype.commitLog=[],A.prototype.stage=function(t,e){var n=JSON.parse(JSON.stringify(e));return this.getStage(t)[e.$loki]=n,n},A.prototype.commitStage=function(t,e){var n,r=this.getStage(t),i=(new Date).getTime();for(n in r)this.update(r[n]),this.commitLog.push({timestamp:i,message:e,data:JSON.parse(JSON.stringify(r[n]))});this.stages[t]={}},A.prototype.no_op=function(){},A.prototype.extract=function(t){for(var e=0,n=this.data.length,r=P(t),i=[];e<n;e+=1)i.push(j(this.data[e],t,r));return i},A.prototype.max=function(t){return Math.max.apply(null,this.extract(t))},A.prototype.min=function(t){return Math.min.apply(null,this.extract(t))},A.prototype.maxRecord=function(t){for(var e,n=0,r=this.data.length,i=P(t),o={index:0,value:void 0};n<r;n+=1)void 0!==e?e<j(this.data[n],t,i)&&(e=j(this.data[n],t,i),o.index=this.data[n].$loki):(e=j(this.data[n],t,i),o.index=this.data[n].$loki);return o.value=e,o},A.prototype.minRecord=function(t){for(var e,n=0,r=this.data.length,i=P(t),o={index:0,value:void 0};n<r;n+=1)void 0!==e?e>j(this.data[n],t,i)&&(e=j(this.data[n],t,i),o.index=this.data[n].$loki):(e=j(this.data[n],t,i),o.index=this.data[n].$loki);return o.value=e,o},A.prototype.extractNumerical=function(t){return this.extract(t).map(I).filter(Number).filter((function(t){return!isNaN(t)}))},A.prototype.avg=function(t){return N(this.extractNumerical(t))},A.prototype.stdDev=function(t){return R(this.extractNumerical(t))},A.prototype.mode=function(t){var e,n,r,i={},o=this.extract(t);for(n in o.forEach((function(t){i[t]?i[t]+=1:i[t]=1})),i)e?e<i[n]&&(r=n):(r=n,e=i[n]);return r},A.prototype.median=function(t){var e=this.extractNumerical(t);e.sort(D);var n=Math.floor(e.length/2);return e.length%2?e[n]:(e[n-1]+e[n])/2},L.prototype={keys:[],values:[],sort:function(t,e){return t<e?-1:t>e?1:0},setSort:function(t){this.bs=new V(t)},bs:function(){return new V(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[F(this.keys,t,this.sort).index]}},z.prototype.keyMap={},z.prototype.lokiMap={},z.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}},z.prototype.get=function(t){return this.keyMap[t]},z.prototype.byId=function(t){return this.keyMap[this.lokiMap[t]]},z.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},z.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},z.prototype.clear=function(){this.keyMap=Object.create(null),this.lokiMap=Object.create(null)},q.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={}}},B.prototype={keys:[],values:[],sort:function(t,e){return t<e?-1:t>e?1:0},bs:function(){return new V(this.sort)},setSort:function(t){this.bs=new V(t)},set:function(t,e){var n=F(this.keys,t,this.sort);n.found?this.values[n.index].push(e):(this.keys.splice(n.index,0,t),this.values.splice(n.index,0,[e]))},get:function(t){var e=F(this.keys,t,this.sort);return e.found?this.values[e.index]:[]},getLt:function(t){var e=F(this.keys,t,this.sort),n=e.index;return e.found&&n--,this.getAll(t,0,n)},getGt:function(t){var e=F(this.keys,t,this.sort),n=e.index;return e.found&&n++,this.getAll(t,n,this.keys.length)},getAll:function(t,e,n){for(var r=[],i=e;i<n;i++)r=r.concat(this.values[i]);return r},getPos:function(t){return F(this.keys,t,this.sort)},remove:function(t,e){var n=F(this.keys,t,this.sort).index,r=this.values[n];for(var i in r)r[i]==e&&r.splice(i,1);r.length<1&&(this.keys.splice(n,1),this.values.splice(n,1))},clear:function(){this.keys=[],this.values=[]}},w.deepFreeze=e,w.freeze=r,w.unFreeze=i,w.LokiOps=m,w.Collection=A,w.DynamicView=E,w.Resultset=C,w.KeyValueStore=L,w.LokiMemoryAdapter=x,w.LokiPartitioningAdapter=S,w.LokiLocalStorageAdapter=k,w.LokiFsAdapter=T,w.persistenceAdapters={fs:T,localStorage:k},w.aeq=a,w.lt=u,w.gt=l,w.Comparators=s,w}()},void 0===(o="function"==typeof r?r.apply(e,i):r)||(t.exports=o)},798:(t,e,n)=>{"use strict";n.d(e,{f3:()=>ut,Pi:()=>rt});var r=n(2188),i=n(7294);if(!i.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.rV)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var o=n(3935),s=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s};function a(){var t=s((0,i.useState)(0),2)[1];return(0,i.useCallback)((function(){t((function(t){return t+1}))}),[])}var u={};var l,c=(l="observerBatching","function"==typeof Symbol?Symbol.for(l):"__$mobx-react "+l+"__");function h(t){t()}var f=!1;function p(){return f}function d(t){return(0,r.Gf)(t)}var m,v=1e4,g=new Set;function y(){void 0===m&&(m=setTimeout(b,1e4))}function b(){m=void 0;var t=Date.now();g.forEach((function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,g.delete(e))})),g.size>0&&y()}var _=!1,w=[];var x={};function S(t){return"observer"+t}function T(t,e,n){if(void 0===e&&(e="observed"),void 0===n&&(n=x),p())return t();var o,s=function(t){return function(){_?w.push(t):t()}}((n.useForceUpdate||a)()),u=i.useRef(null);if(!u.current){var l=new r.le(S(e),(function(){c.mounted?s():(l.dispose(),u.current=null)})),c=function(t){return{cleanAt:Date.now()+v,reaction:t}}(l);u.current=c,o=u,g.add(o),y()}var h=u.current.reaction;return i.useDebugValue(h,d),i.useEffect((function(){var t;return t=u,g.delete(t),u.current?u.current.mounted=!0:(u.current={reaction:new r.le(S(e),(function(){s()})),cleanAt:1/0},s()),function(){u.current.reaction.dispose(),u.current=null}}),[]),function(t){_=!0,w=[];try{var e=t();_=!1;var n=w.length>0?w:void 0;return i.useLayoutEffect((function(){n&&n.forEach((function(t){return t()}))}),[n]),e}finally{_=!1}}((function(){var e,n;if(h.track((function(){try{e=t()}catch(t){n=t}})),n)throw n;return e}))}var k=function(){return k=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},k.apply(this,arguments)};function C(t,e){if(p())return t;var n,r,o,s=k({forwardRef:!1},e),a=t.displayName||t.name,u=function(e,n){return T((function(){return t(e,n)}),a)};return u.displayName=a,n=s.forwardRef?(0,i.memo)((0,i.forwardRef)(u)):(0,i.memo)(u),r=t,o=n,Object.keys(r).forEach((function(t){O[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))})),n.displayName=a,n}var O={$$typeof:!0,render:!0,compare:!0,type:!0};function E(t){var e=t.children,n=t.render,r=e||n;return"function"!=typeof r?null:T(r)}function A(t,e,n,r,i){var o="children"===e?"render":"children",s="function"==typeof t[e],a="function"==typeof t[o];return s&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+n):s||a?null:new Error("Invalid prop `"+i+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}E.propTypes={children:A,render:A},E.displayName="Observer";var P;(P=o.unstable_batchedUpdates)||(P=h),(0,r.jQ)({reactionScheduler:P}),("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:u)[c]=!0;var I=0;var M={};function D(t){return M[t]||(M[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+I+")";return I++,e}(t)),M[t]}function N(t,e){if(R(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 i=0;i<n.length;i++)if(!Object.hasOwnProperty.call(e,n[i])||!R(t[n[i]],e[n[i]]))return!1;return!0}function R(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}var j={$$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 F(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var V=D("patchMixins"),L=D("patchedDefinition");function z(t,e){for(var n=this,r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];e.locks++;try{var s;return null!=t&&(s=t.apply(this,i)),s}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(n,i)}))}}function q(t,e){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];z.call.apply(z,[this,t,e].concat(r))}}function B(t,e,n){var r=function(t,e){var n=t[V]=t[V]||{},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 i=Object.getOwnPropertyDescriptor(t,e);if(!i||!i[L]){var o=t[e],s=U(t,e,i?i.enumerable:void 0,r,o);Object.defineProperty(t,e,s)}}function U(t,e,n,r,i){var o,s=q(i,r);return(o={})[L]=!0,o.get=function(){return s},o.set=function(i){if(this===t)s=q(i,r);else{var o=U(this,e,n,r,i);Object.defineProperty(this,e,o)}},o.configurable=!0,o.enumerable=n,o}var $=r.so||"$mobx",W=D("isMobXReactObserver"),H=D("isUnmounted"),K=D("skipRender"),G=D("isForcingUpdate");function Z(t){var e=t.prototype;if(t[W]){var n=X(e);console.warn("The provided component class ("+n+") \n has already been declared as an observer component.")}else t[W]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.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;J(e,"props"),J(e,"state");var r=e.render;return e.render=function(){return Y.call(this,r)},B(e,"componentWillUnmount",(function(){var t;if(!0!==p()&&(null===(t=this.render[$])||void 0===t||t.dispose(),this[H]=!0,!this.render[$])){var e=X(this);console.warn("The reactive render of an observer class component ("+e+") \n was overriden after MobX attached. This may result in a memory leak if the \n overriden reactive render was not properly disposed.")}})),t}function X(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function Y(t){var e=this;if(!0===p())return t.call(this);F(this,K,!1),F(this,G,!1);var n=X(this),o=t.bind(this),s=!1,a=new r.le(n+".render()",(function(){if(!s&&(s=!0,!0!==e[H])){var t=!0;try{F(e,G,!0),e[K]||i.Component.prototype.forceUpdate.call(e),t=!1}finally{F(e,G,!1),t&&a.dispose()}}}));function u(){s=!1;var t=void 0,e=void 0;if(a.track((function(){try{e=(0,r.$$)(!1,o)}catch(e){t=e}})),t)throw t;return e}return a.reactComponent=this,u[$]=a,this.render=u,u.call(this)}function Q(t,e){return p()&&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||!N(this.props,t)}function J(t,e){var n=D("reactProp_"+e+"_valueHolder"),i=D("reactProp_"+e+"_atomHolder");function o(){return this[i]||F(this,i,(0,r.cp)("reactive "+e)),this[i]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return r.wM&&r.mJ&&(t=(0,r.wM)(!0)),o.call(this).reportObserved(),r.wM&&r.mJ&&(0,r.mJ)(t),this[n]},set:function(t){this[G]||N(this[n],t)?F(this,n,t):(F(this,n,t),F(this,K,!0),o.call(this).reportChanged(),F(this,K,!1))}})}var tt="function"==typeof Symbol&&Symbol.for,et=tt?Symbol.for("react.forward_ref"):"function"==typeof i.forwardRef&&(0,i.forwardRef)((function(t){return null})).$$typeof,nt=tt?Symbol.for("react.memo"):"function"==typeof i.memo&&(0,i.memo)((function(t){return null})).$$typeof;function rt(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'"),nt&&t.$$typeof===nt)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(et&&t.$$typeof===et){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return(0,i.forwardRef)((function(){var t=arguments;return(0,i.createElement)(E,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.Component,t)?Z(t):C(t)}function it(){return it=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},it.apply(this,arguments)}var ot=i.createContext({});function st(t,e,n,r){var o,s,a,u=i.forwardRef((function(n,r){var o=it({},n),s=i.useContext(ot);return Object.assign(o,t(s||{},o)||{}),r&&(o.ref=r),i.createElement(e,o)}));return r&&(u=rt(u)),u.isMobxInjector=!0,o=e,s=u,a=Object.getOwnPropertyNames(Object.getPrototypeOf(o)),Object.getOwnPropertyNames(o).forEach((function(t){j[t]||-1!==a.indexOf(t)||Object.defineProperty(s,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 at(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 ut(){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 st(r,t,r.name,!0)}}return function(t){return st(at(e),t,e.join("-"),!1)}}if(!i.Component)throw new Error("mobx-react requires React to be available");if(!r.LO)throw new Error("mobx-react requires mobx to be available")},2188:(t,e,n)=>{"use strict";n.d(e,{so:()=>_,le:()=>Vt,$$:()=>gt,mJ:()=>ct,wM:()=>lt,aD:()=>Gt,jQ:()=>ee,cp:()=>S,Gf:()=>oe,Ei:()=>Pe,LJ:()=>Ne,Pb:()=>$e,LO:()=>Z,N7:()=>he,rV:()=>$t,rg:()=>st});var r=[];Object.freeze(r);var i={};function o(){return++At.mobxGuid}function s(t){throw a(!1,t),"X"}function a(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(i);function u(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function c(t){return null!==t&&"object"==typeof t}function h(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function f(t,e,n){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function p(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(t){return c(t)&&!0===t[n]}}function d(t){return t instanceof Map}function m(t){return t instanceof Set}function v(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 g(t){return t&&t.toString?t.toString():new String(t).toString()}function y(t){return null===t?null:"object"==typeof t?""+t:t}var b="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_=Symbol("mobx administration"),w=function(){function t(t){void 0===t&&(t="Atom@"+o()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Y.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 Rt(this)},t.prototype.reportChanged=function(){Dt(),function(t){if(t.lowestObserverState===Y.STALE)return;t.lowestObserverState=Y.STALE,t.observers.forEach((function(e){e.dependenciesState===Y.UP_TO_DATE&&(e.isTracing!==Q.NONE&&jt(e,t),e.onBecomeStale()),e.dependenciesState=Y.STALE}))}(this),Nt()},t.prototype.toString=function(){return this.name},t}(),x=p("Atom",w);function S(t,e,n){void 0===e&&(e=l),void 0===n&&(n=l);var r,i=new w(t);return e!==l&&te("onBecomeObserved",i,e,r),n!==l&&Jt(i,n),i}var T={identity:function(t,e){return t===e},structural:function(t,e){return Ge(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return Ge(t,e,1)}},k=function(t,e){return k=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])},k(t,e)};var C=function(){return C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},C.apply(this,arguments)};function O(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 E(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function A(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(E(arguments[e]));return t}var P=Symbol("mobx did run lazy initializers"),I=Symbol("mobx pending decorators"),M={},D={};function N(t,e){var n=e?M:D;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[P]){var r=t[I];if(r){f(t,P,!0);var i=A(Object.getOwnPropertySymbols(r),Object.keys(r));try{for(var o=O(i),s=o.next();!s.done;s=o.next()){var a=r[s.value];a.propertyCreator(t,a.prop,a.descriptor,a.decoratorTarget,a.decoratorArguments)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}}}}function j(t,e){return function(){var n,i=function(r,i,o,s){if(!0===s)return e(r,i,o,r,n),null;if(!Object.prototype.hasOwnProperty.call(r,I)){var a=r[I];f(r,I,C({},a))}return r[I][i]={prop:i,propertyCreator:e,descriptor:o,decoratorTarget:r,decoratorArguments:n},N(i,t)};return F(arguments)?(n=r,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}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 V(t,e,n){return le(t)?t:Array.isArray(t)?Z.array(t,{name:n}):h(t)?Z.object(t,void 0,{name:n}):d(t)?Z.map(t,{name:n}):m(t)?Z.set(t,{name:n}):t}function L(t){return t}function z(t){a(t);var e=j(!0,(function(e,n,r,i,o){var s=r?r.initializer?r.initializer.call(e):r.value:void 0;Le(e).addObservableProp(n,s,t)})),n=("undefined"!=typeof process&&process.env,e);return n.enhancer=t,n}var q={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function B(t){return null==t?q:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(q);var U=z(V),$=z((function(t,e,n){return null==t||$e(t)||Pe(t)||Ne(t)||Fe(t)?t:Array.isArray(t)?Z.array(t,{name:n,deep:!1}):h(t)?Z.object(t,void 0,{name:n,deep:!1}):d(t)?Z.map(t,{name:n,deep:!1}):m(t)?Z.set(t,{name:n,deep:!1}):s(!1)})),W=z(L),H=z((function(t,e,n){return Ge(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?L:V}var G={box:function(t,e){arguments.length>2&&X("box");var n=B(e);return new _t(t,K(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&X("array");var n=B(e);return ke(t,K(n),n.name)},map:function(t,e){arguments.length>2&&X("map");var n=B(e);return new De(t,K(n),n.name)},set:function(t,e){arguments.length>2&&X("set");var n=B(e);return new je(t,K(n),n.name)},object:function(t,e,n){"string"==typeof arguments[1]&&X("object");var r=B(n);if(!1===r.proxy)return ne({},t,e,r);var i=re(r),o=ne({},void 0,void 0,r),s=ge(o);return ie(s,t,e,i),s},ref:W,shallow:$,deep:U,struct:H},Z=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=h(t)?Z.object(t,e,n):Array.isArray(t)?Z.array(t,e):d(t)?Z.map(t,e):m(t)?Z.set(t,e):t;if(r!==t)return r;s(!1)};function X(t){s("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys(G).forEach((function(t){return Z[t]=G[t]}));var Y,Q,J=j(!1,(function(t,e,n,r,i){var o=n.get,s=n.set,a=i[0]||{};Le(t).addComputedProp(t,e,C({get:o,set:s,context:t},a))}));J({equals:T.structural});!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"}(Y||(Y={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var tt=function(t){this.cause=t};function et(t){return t instanceof tt}function nt(t){switch(t.dependenciesState){case Y.UP_TO_DATE:return!1;case Y.NOT_TRACKING:case Y.STALE:return!0;case Y.POSSIBLY_STALE:for(var e=lt(!0),n=at(),r=t.observing,i=r.length,o=0;o<i;o++){var s=r[o];if(xt(s)){if(At.disableErrorBoundaries)s.get();else try{s.get()}catch(t){return ut(n),ct(e),!0}if(t.dependenciesState===Y.STALE)return ut(n),ct(e),!0}}return ht(t),ut(n),ct(e),!1}}function rt(t){var e=t.observers.size>0;At.computationDepth>0&&e&&s(!1),At.allowStateChanges||!e&&"strict"!==At.enforceActions||s(!1)}function it(t,e,n){var r=lt(!0);ht(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++At.runId;var i,o=At.trackingDerivation;if(At.trackingDerivation=t,!0===At.disableErrorBoundaries)i=e.call(n);else try{i=e.call(n)}catch(t){i=new tt(t)}return At.trackingDerivation=o,function(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Y.UP_TO_DATE,i=0,o=t.unboundDepsCount,s=0;s<o;s++){0===(a=n[s]).diffValue&&(a.diffValue=1,i!==s&&(n[i]=a),i++),a.dependenciesState>r&&(r=a.dependenciesState)}n.length=i,t.newObserving=null,o=e.length;for(;o--;){0===(a=e[o]).diffValue&&It(a,t),a.diffValue=0}for(;i--;){var a;1===(a=n[i]).diffValue&&(a.diffValue=0,Pt(a,t))}r!==Y.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}(t),ct(r),i}function ot(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)It(e[n],t);t.dependenciesState=Y.NOT_TRACKING}function st(t){var e=at();try{return t()}finally{ut(e)}}function at(){var t=At.trackingDerivation;return At.trackingDerivation=null,t}function ut(t){At.trackingDerivation=t}function lt(t){var e=At.allowStateReads;return At.allowStateReads=t,e}function ct(t){At.allowStateReads=t}function ht(t){if(t.dependenciesState!==Y.UP_TO_DATE){t.dependenciesState=Y.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Y.UP_TO_DATE}}var ft=0,pt=1,dt=Object.getOwnPropertyDescriptor((function(){}),"name");dt&&dt.configurable;function mt(t,e,n){var r=function(){return vt(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function vt(t,e,n,r){var i=function(t,e,n){var r=!1,i=0;var o=at();Dt();var s=yt(!0),a=lt(!0),u={prevDerivation:o,prevAllowStateChanges:s,prevAllowStateReads:a,notifySpy:r,startTime:i,actionId:pt++,parentActionId:ft};return ft=u.actionId,u}();try{return e.apply(n,r)}catch(t){throw i.error=t,t}finally{!function(t){ft!==t.actionId&&s("invalid action stack. did you forget to finish an action?");ft=t.parentActionId,void 0!==t.error&&(At.suppressReactionErrors=!0);bt(t.prevAllowStateChanges),ct(t.prevAllowStateReads),Nt(),ut(t.prevDerivation),t.notifySpy&&!1;At.suppressReactionErrors=!1}(i)}}function gt(t,e){var n,r=yt(t);try{n=e()}finally{bt(r)}return n}function yt(t){var e=At.allowStateChanges;return At.allowStateChanges=t,e}function bt(t){At.allowStateChanges=t}var _t=function(t){function e(e,n,r,i,s){void 0===r&&(r="ObservableValue@"+o()),void 0===i&&(i=!0),void 0===s&&(s=T.default);var a=t.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=s,a.hasUnreportedChange=!1,a.value=n(e,void 0,r),a}return function(t,e){function n(){this.constructor=t}k(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))!==At.UNCHANGED){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(rt(this),ye(this)){var e=_e(this,{object:this,type:"update",newValue:t});if(!e)return At.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?At.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),we(this)&&Se(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 y(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(w),wt=(p("ObservableValue",_t),function(){function t(t){this.dependenciesState=Y.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=Y.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+o(),this.value=new tt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,a(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+o(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?T.structural:T.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==Y.UP_TO_DATE)return;t.lowestObserverState=Y.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===Y.UP_TO_DATE&&(e.dependenciesState=Y.POSSIBLY_STALE,e.isTracing!==Q.NONE&&jt(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&&s("Cycle detected in computation "+this.name+": "+this.derivation),0!==At.inBatch||0!==this.observers.size||this.keepAlive?(Rt(this),nt(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===Y.STALE)return;t.lowestObserverState=Y.STALE,t.observers.forEach((function(e){e.dependenciesState===Y.POSSIBLY_STALE?e.dependenciesState=Y.STALE:e.dependenciesState===Y.UP_TO_DATE&&(t.lowestObserverState=Y.UP_TO_DATE)}))}(this)):nt(this)&&(this.warnAboutUntrackedRead(),Dt(),this.value=this.computeValue(!1),Nt());var t=this.value;if(et(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(et(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){a(!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 a(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===Y.NOT_TRACKING,n=this.computeValue(!0),r=e||et(t)||et(n)||!this.equals(t,n);return r&&(this.value=n),r},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,At.computationDepth++,t)e=it(this,this.derivation,this.scope);else if(!0===At.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new tt(t)}return At.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(ot(this),this.value=void 0)},t.prototype.observe=function(t,e){var n=this,r=!0,i=void 0;return Xt((function(){var o=n.get();if(!r||e){var s=at();t({type:"update",object:n,newValue:o,oldValue:i}),ut(s)}r=!1,i=o}))},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 y(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}()),xt=p("ComputedValue",wt),St=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 kt(){return"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:Tt}var Ct,Ot=!0,Et=!1,At=((Ct=kt()).__mobxInstanceCount>0&&!Ct.__mobxGlobals&&(Ot=!1),Ct.__mobxGlobals&&Ct.__mobxGlobals.version!==(new St).version&&(Ot=!1),Ot?Ct.__mobxGlobals?(Ct.__mobxInstanceCount+=1,Ct.__mobxGlobals.UNCHANGED||(Ct.__mobxGlobals.UNCHANGED={}),Ct.__mobxGlobals):(Ct.__mobxInstanceCount=1,Ct.__mobxGlobals=new St):(setTimeout((function(){Et||s("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new St));function Pt(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function It(t,e){t.observers.delete(e),0===t.observers.size&&Mt(t)}function Mt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,At.pendingUnobservations.push(t))}function Dt(){At.inBatch++}function Nt(){if(0==--At.inBatch){zt();for(var t=At.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 wt&&n.suspend())}At.pendingUnobservations=[]}}function Rt(t){var e=At.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&&At.inBatch>0&&Mt(t),!1)}function jt(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Q.BREAK){var n=[];Ft(oe(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 wt?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function Ft(t,e,n){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(n).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Ft(t,e,n+1)})))}var Vt=function(){function t(t,e,n,r){void 0===t&&(t="Reaction@"+o()),void 0===r&&(r=!1),this.name=t,this.onInvalidate=e,this.errorHandler=n,this.requiresObservable=r,this.observing=[],this.newObserving=[],this.dependenciesState=Y.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+o(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,At.pendingReactions.push(this),zt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Dt(),this._isScheduled=!1,nt(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Nt()}},t.prototype.track=function(t){if(!this.isDisposed){Dt();false,this._isRunning=!0;var e=it(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ot(this),et(e)&&this.reportExceptionInDerivation(e.cause),Nt()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(At.disableErrorBoundaries)throw t;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";At.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,t),At.globalReactionErrorHandlers.forEach((function(n){return n(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Dt(),ot(this),Nt()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[_]=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=fe(t);if(!r)return s(!1);r.isTracing===Q.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled");r.isTracing=n?Q.BREAK:Q.LOG}(this,t)},t}();var Lt=function(t){return t()};function zt(){At.inBatch>0||At.isRunningReactions||Lt(qt)}function qt(){At.isRunningReactions=!0;for(var t=At.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,i=n.length;r<i;r++)n[r].runReaction()}At.isRunningReactions=!1}var Bt=p("Reaction",Vt);function Ut(t){var e=Lt;Lt=function(n){return t((function(){return e(n)}))}}function $t(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Wt(){s(!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 i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,i.call(this))}}}return Kt(t).apply(this,arguments)}}function Kt(t){return function(e,n,r){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:function(){},set:function(e){f(this,n,Gt(t,e))}})}}var Gt=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 f(t,e,mt(t.name||e,n.value,this))};function Zt(t,e,n){f(t,e,mt(e,n.bind(t)))}function Xt(t,e){void 0===e&&(e=i);var n,r=e&&e.name||t.name||"Autorun@"+o();if(!e.scheduler&&!e.delay)n=new Vt(r,(function(){this.track(u)}),e.onError,e.requiresObservable);else{var s=Qt(e),a=!1;n=new Vt(r,(function(){a||(a=!0,s((function(){a=!1,n.isDisposed||n.track(u)})))}),e.onError,e.requiresObservable)}function u(){t(n)}return n.schedule(),n.getDisposer()}Gt.bound=function(t,e,n,r){return!0===r?(Zt(t,e,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Zt(this,e,n.value||n.initializer.call(this)),this[e]},set:Wt}:{enumerable:!1,configurable:!0,set:function(t){Zt(this,e,t)},get:function(){}}};var Yt=function(t){return t()};function Qt(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Yt}function Jt(t,e,n){return te("onBecomeUnobserved",t,e,n)}function te(t,e,n,r){var i="function"==typeof r?We(e,n):We(e),o="function"==typeof r?r:n,a=t+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[t]?s(!1):function(){var t=i[a];t&&(t.delete(o),0===t.size&&delete i[a])}}function ee(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,i=t.disableErrorBoundaries,o=t.reactionScheduler,a=t.reactionRequiresObservable,u=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((At.pendingReactions.length||At.inBatch||At.isRunningReactions)&&s("isolateGlobalState should be called before MobX is running any reactions"),Et=!0,Ot&&(0==--kt().__mobxInstanceCount&&(kt().__mobxGlobals=void 0),At=new St)),void 0!==e){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:s("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}At.enforceActions=l,At.allowStateChanges=!0!==l&&"strict"!==l}void 0!==n&&(At.computedRequiresReaction=!!n),void 0!==a&&(At.reactionRequiresObservable=!!a),void 0!==u&&(At.observableRequiresReaction=!!u,At.allowStateReads=!At.observableRequiresReaction),void 0!==r&&(At.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),At.disableErrorBoundaries=!!i),o&&Ut(o)}function ne(t,e,n,r){var i=re(r=B(r));return R(t),Le(t,r.name,i.enhancer),e&&ie(t,e,n,i),t}function re(t){return t.defaultDecorator||(!1===t.deep?W:U)}function ie(t,e,n,r){var i,o;Dt();try{var s=b(e);try{for(var a=O(s),u=a.next();!u.done;u=a.next()){var l=u.value,c=Object.getOwnPropertyDescriptor(e,l);0;var h=(n&&l in n?n[l]:c.get?J:r)(t,l,c,!0);h&&Object.defineProperty(t,l,h)}}catch(t){i={error:t}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}finally{Nt()}}function oe(t,e){return se(We(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 ae(){this.message="FLOW_CANCELLED"}function ue(t,e){return null!=t&&(void 0!==e?!!$e(t)&&t[_].values.has(e):$e(t)||!!t[_]||x(t)||Bt(t)||xt(t))}function le(t){return 1!==arguments.length&&s(!1),ue(t)}function ce(t,e,n){if(2!==arguments.length||Fe(t))if($e(t)){var r=t[_],i=r.values.get(e);i?r.write(e,n):r.addObservableProp(e,n,r.defaultEnhancer)}else if(Ne(t))t.set(e,n);else if(Fe(t))t.add(e);else{if(!Pe(t))return s(!1);"number"!=typeof e&&(e=parseInt(e,10)),a(e>=0,"Not a valid index: '"+e+"'"),Dt(),e>=t.length&&(t.length=e+1),t[e]=n,Nt()}else{Dt();var o=e;try{for(var u in o)ce(t,u,o[u])}finally{Nt()}}}function he(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)}ae.prototype=Object.create(Error.prototype);function fe(t){switch(t.length){case 0:return At.trackingDerivation;case 1:return We(t[0]);case 2:return We(t[0],t[1])}}function pe(t,e){void 0===e&&(e=void 0),Dt();try{return t.apply(e)}finally{Nt()}}function de(t){return t[_]}function me(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var ve={has:function(t,e){if(e===_||"constructor"===e||e===P)return!0;var n=de(t);return me(e)?n.has(e):e in t},get:function(t,e){if(e===_||"constructor"===e||e===P)return t[e];var n=de(t),r=n.values.get(e);if(r instanceof w){var i=r.get();return void 0===i&&n.has(e),i}return me(e)&&n.has(e),t[e]},set:function(t,e,n){return!!me(e)&&(ce(t,e,n),!0)},deleteProperty:function(t,e){return!!me(e)&&(de(t).remove(e),!0)},ownKeys:function(t){return de(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return s("Dynamic observable objects cannot be frozen"),!1}};function ge(t){var e=new Proxy(t,ve);return t[_].proxy=e,e}function ye(t){return void 0!==t.interceptors&&t.interceptors.length>0}function be(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),u((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function _e(t,e){var n=at();try{for(var r=A(t.interceptors||[]),i=0,o=r.length;i<o&&(a(!(e=r[i](e))||e.type,"Intercept handlers should return nothing or a change object"),e);i++);return e}finally{ut(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),u((function(){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}))}function Se(t,e){var n=at(),r=t.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](e);ut(n)}}var Te={get:function(t,e){return e===_?t[_]:"length"===e?t[_].getArrayLength():"number"==typeof e?Oe.get.call(t,e):"string"!=typeof e||isNaN(e)?Oe.hasOwnProperty(e)?Oe[e]:t[e]:Oe.get.call(t,parseInt(e))},set:function(t,e,n){return"length"===e&&t[_].setArrayLength(n),"number"==typeof e&&Oe.set.call(t,e,n),"symbol"==typeof e||isNaN(e)?t[e]=n:Oe.set.call(t,parseInt(e),n),!0},preventExtensions:function(t){return s("Observable arrays cannot be frozen"),!1}};function ke(t,e,n,r){void 0===n&&(n="ObservableArray@"+o()),void 0===r&&(r=!1);var i,s,a,u=new Ce(n,e,r);i=u.values,s=_,a=u,Object.defineProperty(i,s,{enumerable:!1,writable:!1,configurable:!0,value:a});var l=new Proxy(u.values,Te);if(u.proxy=l,t&&t.length){var c=yt(!0);u.spliceWithArray(0,0,t),bt(c)}return l}var Ce=function(){function t(t,e,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new w(t||"ObservableArray@"+o()),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 i=this;rt(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=r),ye(this)){var s=_e(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:n});if(!s)return r;e=s.removedCount,n=s.added}n=0===n.length?n:n.map((function(t){return i.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,A([t,e],n));var i=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+e)),i},t.prototype.notifyArrayChildUpdate=function(t,e,n){var r=!this.owned&&!1,i=we(this),o=i||r?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:n}:null;this.atom.reportChanged(),i&&Se(this,o)},t.prototype.notifyArraySplice=function(t,e,n){var r=!this.owned&&!1,i=we(this),o=i||r?{object:this.proxy,type:"splice",index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;this.atom.reportChanged(),i&&Se(this,o)},t}(),Oe={intercept:function(t){return this[_].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[_].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[_];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 i=this[_];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(t);case 2:return i.spliceWithArray(t,e)}return i.spliceWithArray(t,e,n)},spliceWithArray:function(t,e,n){return this[_].spliceWithArray(t,e,n)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this[_];return n.spliceWithArray(n.values.length,0,t),n.values.length},pop:function(){return this.splice(Math.max(this[_].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[_];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[_],n=e.dehanceValues(e.values).indexOf(t);return n>-1&&(this.splice(n,1),!0)},get:function(t){var e=this[_];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[_],r=n.values;if(t<r.length){rt(n.atom);var i=r[t];if(ye(n)){var o=_e(n,{type:"update",object:n.proxy,index:t,newValue:e});if(!o)return;e=o.newValue}(e=n.enhancer(e,i))!==i&&(r[t]=e,n.notifyArrayChildUpdate(t,e,i))}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","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Oe[t]=function(){var e=this[_];e.atom.reportObserved();var n=e.dehanceValues(e.values);return n[t].apply(n,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Oe[t]=function(e,n){var r=this,i=this[_];return i.atom.reportObserved(),i.dehanceValues(i.values)[t]((function(t,i){return e.call(n,t,i,r)}),n)})})),["reduce","reduceRight"].forEach((function(t){Oe[t]=function(){var e=this,n=this[_];n.atom.reportObserved();var r=arguments[0];return arguments[0]=function(t,i,o){return i=n.dehanceValue(i),r(t,i,o,e)},n.values[t].apply(n.values,arguments)}}));var Ee,Ae=p("ObservableArrayAdministration",Ce);function Pe(t){return c(t)&&Ae(t[_])}var Ie,Me={},De=function(){function t(t,e,n){if(void 0===e&&(e=V),void 0===n&&(n="ObservableMap@"+o()),this.enhancer=e,this.name=n,this[Ee]=Me,this._keysAtom=S(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(!At.trackingDerivation)return this._has(t);var n=this._hasMap.get(t);if(!n){var r=n=new _t(this._has(t),L,this.name+"."+g(t)+"?",!1);this._hasMap.set(t,r),Jt(r,(function(){return e._hasMap.delete(t)}))}return n.get()},t.prototype.set=function(t,e){var n=this._has(t);if(ye(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((rt(this._keysAtom),ye(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 pe((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),n&&Se(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))!==At.UNCHANGED){var r=!1,i=we(this),o=i?{type:"update",object:this,oldValue:n.value,name:t,newValue:e}:null;r,n.setNewValue(e),i&&Se(this,o)}},t.prototype._addValue=function(t,e){var n=this;rt(this._keysAtom),pe((function(){var r=new _t(e,n.enhancer,n.name+"."+g(t),!1);n._data.set(t,r),e=r.value,n._updateHasMapEntry(t,!0),n._keysAtom.reportChanged()}));var r=!1,i=we(this),o=i?{type:"add",object:this,name:t,newValue:e}:null;i&&Se(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=this.keys();return Qe({next:function(){var n=e.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:t.get(i)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return Qe({next:function(){var n=e.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,t.get(i)]}}})},t.prototype[(Ee=_,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var n,r;try{for(var i=O(this),o=i.next();!o.done;o=i.next()){var s=E(o.value,2),a=s[0],u=s[1];t.call(e,u,a,this)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.merge=function(t){var e=this;return Ne(t)&&(t=t.toJS()),pe((function(){var n=yt(!0);try{h(t)?v(t).forEach((function(n){return e.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){var n=E(t,2),r=n[0],i=n[1];return e.set(r,i)})):d(t)?(t.constructor!==Map&&s("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,n){return e.set(n,t)}))):null!=t&&s("Cannot initialize map from "+t)}finally{bt(n)}})),this},t.prototype.clear=function(){var t=this;pe((function(){st((function(){var e,n;try{for(var r=O(t.keys()),i=r.next();!i.done;i=r.next()){var o=i.value;t.delete(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return pe((function(){var n,r,i,o,a=function(t){if(d(t)||Ne(t))return t;if(Array.isArray(t))return new Map(t);if(h(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}return s("Cannot convert to map from '"+t+"'")}(t),u=new Map,l=!1;try{for(var c=O(e._data.keys()),f=c.next();!f.done;f=c.next()){var p=f.value;if(!a.has(p))if(e.delete(p))l=!0;else{var m=e._data.get(p);u.set(p,m)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var v=O(a.entries()),g=v.next();!g.done;g=v.next()){var y=E(g.value,2),b=(p=y[0],m=y[1],e._data.has(p));if(e.set(p,m),e._data.has(p)){var _=e._data.get(p);u.set(p,_),b||(l=!0)}}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}if(!l)if(e._data.size!==u.size)e._keysAtom.reportChanged();else for(var w=e._data.keys(),x=u.keys(),S=w.next(),T=x.next();!S.done;){if(S.value!==T.value){e._keysAtom.reportChanged();break}S=w.next(),T=x.next()}e._data=u})),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=O(this),i=r.next();!i.done;i=r.next()){var o=E(i.value,2),s=o[0],a=o[1];n["symbol"==typeof s?s:g(s)]=a}}catch(e){t={error:e}}finally{try{i&&!i.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 g(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}(),Ne=p("ObservableMap",De),Re={},je=function(){function t(t,e,n){if(void 0===e&&(e=V),void 0===n&&(n="ObservableSet@"+o()),this.name=n,this[Ie]=Re,this._data=new Set,this._atom=S(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;pe((function(){st((function(){var e,n;try{for(var r=O(t._data.values()),i=r.next();!i.done;i=r.next()){var o=i.value;t.delete(o)}}catch(t){e={error:t}}finally{try{i&&!i.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 i=O(this),o=i.next();!o.done;o=i.next()){var s=o.value;t.call(e,s,s,this)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}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((rt(this._atom),ye(this))&&!(i=_e(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){pe((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var n=!1,r=we(this),i=r?{type:"add",object:this,newValue:t}:null;n,r&&Se(this,i)}return this},t.prototype.delete=function(t){var e=this;if(ye(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 pe((function(){e._atom.reportChanged(),e._data.delete(t)})),n&&Se(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 Qe({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 Qe({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()),pe((function(){var n=yt(!0);try{Array.isArray(t)||m(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&s("Cannot initialize set from "+t)}finally{bt(n)}})),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[(Ie=_,Symbol.iterator)]=function(){return this.values()},t}(),Fe=p("ObservableSet",je),Ve=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 w(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 wt)r.set(e);else{if(ye(this)){if(!(s=_e(this,{type:"update",object:this.proxy||n,name:t,newValue:e})))return;e=s.newValue}if((e=r.prepareNewValue(e))!==At.UNCHANGED){var i=we(this),o=!1,s=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:t,newValue:e}:null;o,r.setNewValue(e),i&&Se(this,s)}}},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 _t(r,L,this.name+"."+g(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(ye(this)){var i=_e(this,{object:this.proxy||r,name:t,type:"add",newValue:e});if(!i)return;e=i.newValue}var o=new _t(e,n,this.name+"."+g(t),!1);this.values.set(t,o),e=o.value,Object.defineProperty(r,t,function(t){return ze[t]||(ze[t]={configurable:!0,enumerable:!0,get:function(){return this[_].read(t)},set:function(e){this[_].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,n){var r,i,o,s=this.target;n.name=n.name||this.name+"."+g(e),this.values.set(e,new wt(n)),(t===s||(r=t,i=e,!(o=Object.getOwnPropertyDescriptor(r,i))||!1!==o.configurable&&!1!==o.writable))&&Object.defineProperty(t,e,function(t){return qe[t]||(qe[t]={configurable:At.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(ye(this))if(!(a=_e(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Dt();var n=we(this),r=!1,i=this.values.get(t),o=i&&i.get();if(i&&i.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var s=this.pendingKeys.get(t);s&&s.set(!1)}delete this.target[t];var a=n?{type:"remove",object:this.proxy||e,oldValue:o,name:t}:null;r,n&&Se(this,a)}finally{Nt()}}},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&&Se(this,r),this.pendingKeys){var i=this.pendingKeys.get(t);i&&i.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var n=[];try{for(var r=O(this.values),i=r.next();!i.done;i=r.next()){var o=E(i.value,2),s=o[0];o[1]instanceof _t&&n.push(s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},t}();function Le(t,e,n){if(void 0===e&&(e=""),void 0===n&&(n=V),Object.prototype.hasOwnProperty.call(t,_))return t[_];h(t)||(e=(t.constructor.name||"ObservableObject")+"@"+o()),e||(e="ObservableObject@"+o());var r=new Ve(t,new Map,g(e),n);return f(t,_,r),r}var ze=Object.create(null),qe=Object.create(null);function Be(t){var e=t[_];return e||(R(t),t[_])}var Ue=p("ObservableObjectAdministration",Ve);function $e(t){return!!c(t)&&(R(t),Ue(t[_]))}function We(t,e){if("object"==typeof t&&null!==t){if(Pe(t))return void 0!==e&&s(!1),t[_].atom;if(Fe(t))return t[_];if(Ne(t)){var n=t;return void 0===e?n._keysAtom:((r=n._data.get(e)||n._hasMap.get(e))||s(!1),r)}var r;if(R(t),e&&!t[_]&&t[e],$e(t))return e?((r=t[_].values.get(e))||s(!1),r):s(!1);if(x(t)||xt(t)||Bt(t))return t}else if("function"==typeof t&&Bt(t[_]))return t[_];return s(!1)}function He(t,e){return t||s("Expecting some object"),void 0!==e?He(We(t,e)):x(t)||xt(t)||Bt(t)||Ne(t)||Fe(t)?t:(R(t),t[_]?t[_]:void s(!1))}var Ke=Object.prototype.toString;function Ge(t,e,n){return void 0===n&&(n=-1),Ze(t,e,n)}function Ze(t,e,n,r,i){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof e)return!1;var s=Ke.call(t);if(s!==Ke.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++}t=Xe(t),e=Xe(e);var a="[object Array]"===s;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var u=t.constructor,l=e.constructor;if(u!==l&&!("function"==typeof u&&u instanceof u&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in e)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var c=(r=r||[]).length;c--;)if(r[c]===t)return i[c]===e;if(r.push(t),i.push(e),a){if((c=t.length)!==e.length)return!1;for(;c--;)if(!Ze(t[c],e[c],n-1,r,i))return!1}else{var h=Object.keys(t),f=void 0;if(c=h.length,Object.keys(e).length!==c)return!1;for(;c--;)if(!Ye(e,f=h[c])||!Ze(t[f],e[f],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function Xe(t){return Pe(t)?t.slice():d(t)||Ne(t)||m(t)||Fe(t)?Array.from(t.entries()):t}function Ye(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Qe(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:$t,extras:{getDebugName:function(t,e){return(void 0!==e?We(t,e):$e(t)||Ne(t)||Fe(t)?He(t):We(t)).name}},$mobx:_})},7418:t=>{"use strict";var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(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,o){for(var s,a,u=i(t),l=1;l<arguments.length;l++){for(var c in s=Object(arguments[l]))n.call(s,c)&&(u[c]=s[c]);if(e){a=e(s);for(var h=0;h<a.length;h++)r.call(s,a[h])&&(u[a[h]]=s[a[h]])}}return u}},4779:(t,e,n)=>{var r=n(6173);t.exports=p,t.exports.parse=o,t.exports.compile=function(t,e){return a(o(t,e),e)},t.exports.tokensToFunction=a,t.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,s=0,a="",c=e&&e.delimiter||"/";null!=(n=i.exec(t));){var h=n[0],f=n[1],p=n.index;if(a+=t.slice(s,p),s=p+h.length,f)a+=f[1];else{var d=t[s],m=n[2],v=n[3],g=n[4],y=n[5],b=n[6],_=n[7];a&&(r.push(a),a="");var w=null!=m&&null!=d&&d!==m,x="+"===b||"*"===b,S="?"===b||"*"===b,T=n[2]||c,k=g||y;r.push({name:v||o++,prefix:m||"",delimiter:T,optional:S,repeat:x,partial:w,asterisk:!!_,pattern:k?l(k):_?".*":"[^"+u(T)+"]+?"})}}return s<t.length&&(a+=t.substr(s)),a&&r.push(a),r}function s(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function a(t,e){for(var n=new Array(t.length),i=0;i<t.length;i++)"object"==typeof t[i]&&(n[i]=new RegExp("^(?:"+t[i].pattern+")$",h(e)));return function(e,i){for(var o="",a=e||{},u=(i||{}).pretty?s:encodeURIComponent,l=0;l<t.length;l++){var c=t[l];if("string"!=typeof c){var h,f=a[c.name];if(null==f){if(c.optional){c.partial&&(o+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(f)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(f)+"`");if(0===f.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var p=0;p<f.length;p++){if(h=u(f[p]),!n[l].test(h))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(h)+"`");o+=(0===p?c.prefix:c.delimiter)+h}}else{if(h=c.asterisk?encodeURI(f).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(f),!n[l].test(h))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+h+'"');o+=c.prefix+h}}else o+=c}return o}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function l(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function c(t,e){return t.keys=e,t}function h(t){return t&&t.sensitive?"":"i"}function f(t,e,n){r(e)||(n=e||n,e=[]);for(var i=(n=n||{}).strict,o=!1!==n.end,s="",a=0;a<t.length;a++){var l=t[a];if("string"==typeof l)s+=u(l);else{var f=u(l.prefix),p="(?:"+l.pattern+")";e.push(l),l.repeat&&(p+="(?:"+f+p+")*"),s+=p=l.optional?l.partial?f+"("+p+")?":"(?:"+f+"("+p+"))?":f+"("+p+")"}}var d=u(n.delimiter||"/"),m=s.slice(-d.length)===d;return i||(s=(m?s.slice(0,-d.length):s)+"(?:"+d+"(?=$))?"),s+=o?"$":i&&m?"":"(?="+d+"|$)",c(new RegExp("^"+s,h(n)),e)}function p(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 c(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(p(t[i],e,n).source);return c(new RegExp("(?:"+r.join("|")+")",h(n)),e)}(t,e,n):function(t,e,n){return f(o(t,n),e,n)}(t,e,n)}},6173:t=>{t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},2703:(t,e,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}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:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(t,e,n)=>{t.exports=n(2703)()},414:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7893:function(t,e,n){var r;t.exports=(r=n(7294),function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([function(t,e,n){t.exports=n(2)()},function(t,e){t.exports=r},function(t,e,n){"use strict";var r=n(3);function i(){}function o(){}o.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,o,s){if(s!==r){var a=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 a.name="Invariant Violation",a}}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:o,resetWarningCache:i};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,n){"use strict";n.r(e);var r=n(1),i=n.n(r),o=n(0),s=n.n(o),a=function(t){return 0!==t};function u(t){return(u="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})(t)}function l(){return(l=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)}function c(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)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=function(t){!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&&h(t,e)}(s,t);var e,n,r,o=f(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),v(d(e=o.call(this,t)),"continueOpenCollapsible",(function(){var t=d(e).innerRef;e.setState({height:t.scrollHeight,transition:"height ".concat(e.props.transitionTime,"ms ").concat(e.props.easing),isClosed:!1,hasBeenOpened:!0,inTransition:a(t.scrollHeight),shouldOpenOnNextCycle:!1})})),v(d(e),"handleTriggerClick",(function(t){e.props.triggerDisabled||e.state.inTransition||(t.preventDefault(),e.props.handleTriggerClick?e.props.handleTriggerClick(e.props.accordionPosition):!0===e.state.isClosed?(e.openCollapsible(),e.props.onOpening(),e.props.onTriggerOpening()):(e.closeCollapsible(),e.props.onClosing(),e.props.onTriggerClosing()))})),v(d(e),"handleTransitionEnd",(function(t){t.target===e.innerRef&&(e.state.isClosed?(e.setState({inTransition:!1}),e.props.onClose()):(e.setState({height:"auto",overflow:e.props.overflowWhenOpen,inTransition:!1}),e.props.onOpen()))})),v(d(e),"setInnerRef",(function(t){return e.innerRef=t})),e.timeout=void 0,e.contentId="collapsible-content-".concat(Date.now()),e.triggerId=t.triggerElementProps.id||"collapsible-trigger-".concat(Date.now()),t.open?e.state={isClosed:!1,shouldSwitchAutoOnNextCycle:!1,height:"auto",transition:"none",hasBeenOpened:!0,overflow:t.overflowWhenOpen,inTransition:!1}:e.state={isClosed:!0,shouldSwitchAutoOnNextCycle:!1,height:0,transition:"height ".concat(t.transitionTime,"ms ").concat(t.easing),hasBeenOpened:!1,overflow:"hidden",inTransition:!1},e}return e=s,(n=[{key:"componentDidUpdate",value:function(t,e){var n=this;this.state.shouldOpenOnNextCycle&&this.continueOpenCollapsible(),"auto"!==e.height&&0!==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(){var t=this.innerRef;this.setState({shouldSwitchAutoOnNextCycle:!0,height:t.scrollHeight,transition:"height ".concat(this.props.transitionCloseTime?this.props.transitionCloseTime:this.props.transitionTime,"ms ").concat(this.props.easing),inTransition:a(t.scrollHeight)})}},{key:"openCollapsible",value:function(){this.setState({inTransition:a(this.innerRef.scrollHeight),shouldOpenOnNextCycle:!0})}},{key:"renderNonClickableTriggerElement",value:function(){return this.props.triggerSibling&&"string"==typeof this.props.triggerSibling?i.a.createElement("span",{className:"".concat(this.props.classParentString,"__trigger-sibling")},this.props.triggerSibling):this.props.triggerSibling&&"function"==typeof this.props.triggerSibling?this.props.triggerSibling():this.props.triggerSibling?i.a.createElement(this.props.triggerSibling,null):null}},{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",r=this.props.triggerDisabled?"is-disabled":"",o=!1===this.state.isClosed&&void 0!==this.props.triggerWhenOpen?this.props.triggerWhenOpen:this.props.trigger,s=this.props.contentContainerTagName,a=this.props.triggerTagName,u=this.props.lazyRender&&!this.state.hasBeenOpened&&this.state.isClosed&&!this.state.inTransition?null:this.props.children,c=this.props,h=c.classParentString,f=c.contentOuterClassName,p=c.contentInnerClassName,d="".concat(h,"__trigger ").concat(n," ").concat(r," ").concat(this.state.isClosed?this.props.triggerClassName:this.props.triggerOpenedClassName),m="".concat(h," ").concat(this.state.isClosed?this.props.className:this.props.openedClassName),v="".concat(h,"__contentOuter ").concat(f),g="".concat(h,"__contentInner ").concat(p);return i.a.createElement(s,l({className:m.trim()},this.props.containerElementProps),i.a.createElement(a,l({id:this.triggerId,className:d.trim(),onClick:this.handleTriggerClick,style:this.props.triggerStyle&&this.props.triggerStyle,onKeyPress:function(e){var n=e.key;(" "===n&&"button"!==t.props.triggerTagName.toLowerCase()||"Enter"===n)&&t.handleTriggerClick(e)},tabIndex:this.props.tabIndex&&this.props.tabIndex,"aria-expanded":!this.state.isClosed,"aria-disabled":this.props.triggerDisabled,"aria-controls":this.contentId,role:"button"},this.props.triggerElementProps),o),this.renderNonClickableTriggerElement(),i.a.createElement("div",{id:this.contentId,className:v.trim(),style:e,onTransitionEnd:this.handleTransitionEnd,ref:this.setInnerRef,hidden:this.props.contentHiddenWhenClosed&&this.state.isClosed&&!this.state.inTransition,role:"region","aria-labelledby":this.triggerId},i.a.createElement("div",{className:g.trim()},u)))}}])&&c(e.prototype,n),r&&c(e,r),s}(r.Component);g.propTypes={transitionTime:s.a.number,transitionCloseTime:s.a.number,triggerTagName:s.a.string,easing:s.a.string,open:s.a.bool,containerElementProps:s.a.object,triggerElementProps:s.a.object,classParentString:s.a.string,className:s.a.string,openedClassName:s.a.string,triggerStyle:s.a.object,triggerClassName:s.a.string,triggerOpenedClassName:s.a.string,contentOuterClassName:s.a.string,contentInnerClassName:s.a.string,accordionPosition:s.a.oneOfType([s.a.string,s.a.number]),handleTriggerClick:s.a.func,onOpen:s.a.func,onClose:s.a.func,onOpening:s.a.func,onClosing:s.a.func,onTriggerOpening:s.a.func,onTriggerClosing:s.a.func,trigger:s.a.oneOfType([s.a.string,s.a.element]),triggerWhenOpen:s.a.oneOfType([s.a.string,s.a.element]),triggerDisabled:s.a.bool,lazyRender:s.a.bool,overflowWhenOpen:s.a.oneOf(["hidden","visible","auto","scroll","inherit","initial","unset"]),contentHiddenWhenClosed:s.a.bool,triggerSibling:s.a.oneOfType([s.a.element,s.a.func]),tabIndex:s.a.number,contentContainerTagName:s.a.string,children:s.a.oneOfType([s.a.string,s.a.element])},g.defaultProps={transitionTime:400,transitionCloseTime:null,triggerTagName:"span",easing:"linear",open:!1,classParentString:"Collapsible",triggerDisabled:!1,lazyRender:!1,overflowWhenOpen:"hidden",contentHiddenWhenClosed:!1,openedClassName:"",triggerStyle:null,triggerClassName:"",triggerOpenedClassName:"",contentOuterClassName:"",contentInnerClassName:"",className:"",triggerSibling:null,onOpen:function(){},onClose:function(){},onOpening:function(){},onClosing:function(){},onTriggerOpening:function(){},onTriggerClosing:function(){},tabIndex:null,contentContainerTagName:"div",triggerElementProps:{}},e.default=g}]))},6812:(t,e,n)=>{"use strict";var r=n(7294);e.Z=function(t){for(var e=t.acceptedCharacters,n=t.length,i=t.value,o=t.onChange,s=function(t,e){for(;t.length<e;)t+=" ";return t.substr(0,e)}(i,n),a=r.useRef(Array.from({length:n})),u=r.useRef(Array.from({length:n})),l=[],c=function(t){var r=u.current[t]=u.current[t]||function(e){a.current[t]=e||void 0},i=" "===s[t]?"":s[t];l.push({ref:r,value:i,onClick:function(t){var e=t.currentTarget;window.requestAnimationFrame((function(){e.setSelectionRange(0,1)}))},onFocus:function(t){t.currentTarget.setSelectionRange(0,1)},onKeyDown:function(r){switch(r.key){case"Backspace":if(r.preventDefault(),i)o(s.substring(0,t)+" "+s.substring(t+1));else if(t>0){o(s.substring(0,t-1)+" "+s.substring(t));var u=a.current[t-1];u&&u.focus()}break;case"ArrowUp":case"ArrowLeft":if(r.preventDefault(),t>0){var l=a.current[t-1];l&&(l.focus(),window.requestAnimationFrame((function(){l.setSelectionRange(0,1)})))}break;case"ArrowDown":case"ArrowRight":if(r.preventDefault(),t+1<n){var c=a.current[t+1];c&&(c.focus(),window.requestAnimationFrame((function(){c.setSelectionRange(0,1)})))}break;default:if(1===r.key.length&&!(r.metaKey||r.altKey||r.ctrlKey)&&(r.preventDefault(),e.test(r.key)))if(o(s.substring(0,t)+r.key+s.substring(t+1)),t+1<n){var h=a.current[t+1];h&&(h.focus(),window.requestAnimationFrame((function(){h.setSelectionRange(0,1)})))}else{var f=r.currentTarget;window.requestAnimationFrame((function(){f.setSelectionRange(0,1)}))}}},onChange:function(r){var i=r.target.value.split("").filter((function(t){return e.test(t)})).join("");if(o((s.substring(0,t)+i+s.substring(t+i.length)).substr(0,n)),t<n-1){var u=a.current[t+i.length<n?t+i.length:n-1];u&&(u.focus(),window.requestAnimationFrame((function(){u.setSelectionRange(0,1)})))}}})},h=0;h<n;h++)c(h);return l}},4448:(t,e,n)=>{"use strict";var r=n(7294),i=n(7418),o=n(3840);function s(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(s(227));function a(t,e,n,r,i,o,s,a,u){var l=Array.prototype.slice.call(arguments,3);try{e.apply(n,l)}catch(t){this.onError(t)}}var u=!1,l=null,c=!1,h=null,f={onError:function(t){u=!0,l=t}};function p(t,e,n,r,i,o,s,c,h){u=!1,l=null,a.apply(f,arguments)}var d=null,m=null,v=null;function g(t,e,n){var r=t.type||"unknown-event";t.currentTarget=v(n),function(t,e,n,r,i,o,a,f,d){if(p.apply(this,arguments),u){if(!u)throw Error(s(198));var m=l;u=!1,l=null,c||(c=!0,h=m)}}(r,e,void 0,t),t.currentTarget=null}var y=null,b={};function _(){if(y)for(var t in b){var e=b[t],n=y.indexOf(t);if(!(-1<n))throw Error(s(96,t));if(!x[n]){if(!e.extractEvents)throw Error(s(97,t));for(var r in x[n]=e,n=e.eventTypes){var i=void 0,o=n[r],a=e,u=r;if(S.hasOwnProperty(u))throw Error(s(99,u));S[u]=o;var l=o.phasedRegistrationNames;if(l){for(i in l)l.hasOwnProperty(i)&&w(l[i],a,u);i=!0}else o.registrationName?(w(o.registrationName,a,u),i=!0):i=!1;if(!i)throw Error(s(98,r,t))}}}}function w(t,e,n){if(T[t])throw Error(s(100,t));T[t]=e,k[t]=e.eventTypes[n].dependencies}var x=[],S={},T={},k={};function C(t){var e,n=!1;for(e in t)if(t.hasOwnProperty(e)){var r=t[e];if(!b.hasOwnProperty(e)||b[e]!==r){if(b[e])throw Error(s(102,e));b[e]=r,n=!0}}n&&_()}var O=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),E=null,A=null,P=null;function I(t){if(t=m(t)){if("function"!=typeof E)throw Error(s(280));var e=t.stateNode;e&&(e=d(e),E(t.stateNode,t.type,e))}}function M(t){A?P?P.push(t):P=[t]:A=t}function D(){if(A){var t=A,e=P;if(P=A=null,I(t),e)for(t=0;t<e.length;t++)I(e[t])}}function N(t,e){return t(e)}function R(t,e,n,r,i){return t(e,n,r,i)}function j(){}var F=N,V=!1,L=!1;function z(){null===A&&null===P||(j(),D())}function q(t,e,n){if(L)return t(e,n);L=!0;try{return F(t,e,n)}finally{L=!1,z()}}var B=/^[: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]*$/,U=Object.prototype.hasOwnProperty,$={},W={};function H(t,e,n,r,i,o){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o}var K={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(t){K[t]=new H(t,0,!1,t,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(t){var e=t[0];K[e]=new H(e,1,!1,t[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(t){K[t]=new H(t,2,!1,t.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(t){K[t]=new H(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){K[t]=new H(t,3,!1,t.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(t){K[t]=new H(t,3,!0,t,null,!1)})),["capture","download"].forEach((function(t){K[t]=new H(t,4,!1,t,null,!1)})),["cols","rows","size","span"].forEach((function(t){K[t]=new H(t,6,!1,t,null,!1)})),["rowSpan","start"].forEach((function(t){K[t]=new H(t,5,!1,t.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function Z(t){return t[1].toUpperCase()}"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(G,Z);K[e]=new H(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(G,Z);K[e]=new H(e,1,!1,t,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(t){var e=t.replace(G,Z);K[e]=new H(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(t){K[t]=new H(t,1,!1,t.toLowerCase(),null,!1)})),K.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(t){K[t]=new H(t,1,!1,t.toLowerCase(),null,!0)}));var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(t,e,n,r){var i=K.hasOwnProperty(e)?K[e]:null;(null!==i?0===i.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,i,r)&&(n=null),r||null===i?function(t){return!!U.call(W,t)||!U.call($,t)&&(B.test(t)?W[t]=!0:($[t]=!0,!1))}(e)&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=null===n?3!==i.type&&"":n:(e=i.attributeName,r=i.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var Q=/^(.*)[\\\/]/,J="function"==typeof Symbol&&Symbol.for,tt=J?Symbol.for("react.element"):60103,et=J?Symbol.for("react.portal"):60106,nt=J?Symbol.for("react.fragment"):60107,rt=J?Symbol.for("react.strict_mode"):60108,it=J?Symbol.for("react.profiler"):60114,ot=J?Symbol.for("react.provider"):60109,st=J?Symbol.for("react.context"):60110,at=J?Symbol.for("react.concurrent_mode"):60111,ut=J?Symbol.for("react.forward_ref"):60112,lt=J?Symbol.for("react.suspense"):60113,ct=J?Symbol.for("react.suspense_list"):60120,ht=J?Symbol.for("react.memo"):60115,ft=J?Symbol.for("react.lazy"):60116,pt=J?Symbol.for("react.block"):60121,dt="function"==typeof Symbol&&Symbol.iterator;function mt(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=dt&&t[dt]||t["@@iterator"])?t:null}function vt(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 nt:return"Fragment";case et:return"Portal";case it:return"Profiler";case rt:return"StrictMode";case lt:return"Suspense";case ct:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case st:return"Context.Consumer";case ot:return"Context.Provider";case ut:var e=t.render;return e=e.displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case ht:return vt(t.type);case pt:return vt(t.render);case ft:if(t=1===t._status?t._result:null)return vt(t)}return null}function gt(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,i=t._debugSource,o=vt(t.type);n=null,r&&(n=vt(r.type)),r=o,o="",i?o=" (at "+i.fileName.replace(Q,"")+":"+i.lineNumber+")":n&&(o=" (created by "+n+")"),n="\n in "+(r||"Unknown")+o}e+=n,t=t.return}while(t);return e}function yt(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 i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.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 i({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function St(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=yt(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 Tt(t,e){null!=(e=e.checked)&&Y(t,"checked",e,!1)}function kt(t,e){Tt(t,e);var n=yt(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")?Ot(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ot(t,e.type,yt(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function Ct(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 Ot(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=i({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 i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+yt(n),e=null,i=0;i<t.length;i++){if(t[i].value===n)return t[i].selected=!0,void(r&&(t[i].defaultSelected=!0));null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function Pt(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(s(91));return i({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function It(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(s(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(s(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:yt(n)}}function Mt(t,e){var n=yt(e.value),r=yt(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 Dt(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}var Nt="http://www.w3.org/1999/xhtml",Rt="http://www.w3.org/2000/svg";function jt(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?jt(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var Vt,Lt,zt=(Lt=function(t,e){if(t.namespaceURI!==Rt||"innerHTML"in t)t.innerHTML=e;else{for((Vt=Vt||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Vt.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction((function(){return Lt(t,e)}))}:Lt);function qt(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 Bt(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var Ut={animationend:Bt("Animation","AnimationEnd"),animationiteration:Bt("Animation","AnimationIteration"),animationstart:Bt("Animation","AnimationStart"),transitionend:Bt("Transition","TransitionEnd")},$t={},Wt={};function Ht(t){if($t[t])return $t[t];if(!Ut[t])return t;var e,n=Ut[t];for(e in n)if(n.hasOwnProperty(e)&&e in Wt)return $t[t]=n[e];return t}O&&(Wt=document.createElement("div").style,"AnimationEvent"in window||(delete Ut.animationend.animation,delete Ut.animationiteration.animation,delete Ut.animationstart.animation),"TransitionEvent"in window||delete Ut.transitionend.transition);var Kt=Ht("animationend"),Gt=Ht("animationiteration"),Zt=Ht("animationstart"),Xt=Ht("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(" "),Qt=new("function"==typeof WeakMap?WeakMap:Map);function Jt(t){var e=Qt.get(t);return void 0===e&&(e=new Map,Qt.set(t,e)),e}function te(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 ee(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 ne(t){if(te(t)!==t)throw Error(s(188))}function re(t){if(t=function(t){var e=t.alternate;if(!e){if(null===(e=te(t)))throw Error(s(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return ne(i),t;if(o===r)return ne(i),e;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,u=i.child;u;){if(u===n){a=!0,n=i,r=o;break}if(u===r){a=!0,r=i,n=o;break}u=u.sibling}if(!a){for(u=o.child;u;){if(u===n){a=!0,n=o,r=i;break}if(u===r){a=!0,r=o,n=i;break}u=u.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?t:e}(t),!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 ie(t,e){if(null==e)throw Error(s(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 se=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++)g(t,e[r],n[r]);else e&&g(t,e,n);t._dispatchListeners=null,t._dispatchInstances=null,t.isPersistent()||t.constructor.release(t)}}function ue(t){if(null!==t&&(se=ie(se,t)),t=se,se=null,t){if(oe(t,ae),se)throw Error(s(95));if(c)throw t=h,c=!1,h=null,t}}function le(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}function ce(t){if(!O)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 he=[];function fe(t){t.topLevelType=null,t.nativeEvent=null,t.targetInst=null,t.ancestors.length=0,10>he.length&&he.push(t)}function pe(t,e,n,r){if(he.length){var i=he.pop();return i.topLevelType=t,i.eventSystemFlags=r,i.nativeEvent=e,i.targetInst=n,i}return{topLevelType:t,eventSystemFlags:r,nativeEvent:e,targetInst:n,ancestors:[]}}function de(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=In(r)}while(n);for(n=0;n<t.ancestors.length;n++){e=t.ancestors[n];var i=le(t.nativeEvent);r=t.topLevelType;var o=t.nativeEvent,s=t.eventSystemFlags;0===n&&(s|=64);for(var a=null,u=0;u<x.length;u++){var l=x[u];l&&(l=l.extractEvents(r,e,o,i,s))&&(a=ie(a,l))}ue(a)}}function me(t,e,n){if(!n.has(t)){switch(t){case"scroll":Ze(e,"scroll",!0);break;case"focus":case"blur":Ze(e,"focus",!0),Ze(e,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":ce(t)&&Ze(e,t,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Yt.indexOf(t)&&Ge(t,e)}n.set(t,null)}}var ve,ge,ye,be=!1,_e=[],we=null,xe=null,Se=null,Te=new Map,ke=new Map,Ce=[],Oe="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(" "),Ee="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ae(t,e,n,r,i){return{blockedOn:t,topLevelType:e,eventSystemFlags:32|n,nativeEvent:i,container:r}}function Pe(t,e){switch(t){case"focus":case"blur":we=null;break;case"dragenter":case"dragleave":xe=null;break;case"mouseover":case"mouseout":Se=null;break;case"pointerover":case"pointerout":Te.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ke.delete(e.pointerId)}}function Ie(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t=Ae(e,n,r,i,o),null!==e&&(null!==(e=Mn(e))&&ge(e)),t):(t.eventSystemFlags|=r,t)}function Me(t){var e=In(t.target);if(null!==e){var n=te(e);if(null!==n)if(13===(e=n.tag)){if(null!==(e=ee(n)))return t.blockedOn=e,void o.unstable_runWithPriority(t.priority,(function(){ye(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=Mn(e);return null!==n&&ge(n),t.blockedOn=e,!1}return!0}function Ne(t,e,n){De(t)&&n.delete(e)}function Re(){for(be=!1;0<_e.length;){var t=_e[0];if(null!==t.blockedOn){null!==(t=Mn(t.blockedOn))&&ve(t);break}var e=Je(t.topLevelType,t.eventSystemFlags,t.container,t.nativeEvent);null!==e?t.blockedOn=e:_e.shift()}null!==we&&De(we)&&(we=null),null!==xe&&De(xe)&&(xe=null),null!==Se&&De(Se)&&(Se=null),Te.forEach(Ne),ke.forEach(Ne)}function je(t,e){t.blockedOn===e&&(t.blockedOn=null,be||(be=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Re)))}function Fe(t){function e(e){return je(e,t)}if(0<_e.length){je(_e[0],t);for(var n=1;n<_e.length;n++){var r=_e[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==we&&je(we,t),null!==xe&&je(xe,t),null!==Se&&je(Se,t),Te.forEach(e),ke.forEach(e),n=0;n<Ce.length;n++)(r=Ce[n]).blockedOn===t&&(r.blockedOn=null);for(;0<Ce.length&&null===(n=Ce[0]).blockedOn;)Me(n),null===n.blockedOn&&Ce.shift()}var Ve={},Le=new Map,ze=new Map,qe=["abort","abort",Kt,"animationEnd",Gt,"animationIteration",Zt,"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",Xt,"transitionEnd","waiting","waiting"];function Be(t,e){for(var n=0;n<t.length;n+=2){var r=t[n],i=t[n+1],o="on"+(i[0].toUpperCase()+i.slice(1));o={phasedRegistrationNames:{bubbled:o,captured:o+"Capture"},dependencies:[r],eventPriority:e},ze.set(r,e),Le.set(r,o),Ve[i]=o}}Be("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),Be("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),Be(qe,2);for(var Ue="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),$e=0;$e<Ue.length;$e++)ze.set(Ue[$e],0);var We=o.unstable_UserBlockingPriority,He=o.unstable_runWithPriority,Ke=!0;function Ge(t,e){Ze(e,t,!1)}function Ze(t,e,n){var r=ze.get(e);switch(void 0===r?2:r){case 0:r=Xe.bind(null,e,1,t);break;case 1:r=Ye.bind(null,e,1,t);break;default:r=Qe.bind(null,e,1,t)}n?t.addEventListener(e,r,!0):t.addEventListener(e,r,!1)}function Xe(t,e,n,r){V||j();var i=Qe,o=V;V=!0;try{R(i,t,e,n,r)}finally{(V=o)||z()}}function Ye(t,e,n,r){He(We,Qe.bind(null,t,e,n,r))}function Qe(t,e,n,r){if(Ke)if(0<_e.length&&-1<Oe.indexOf(t))t=Ae(null,t,e,n,r),_e.push(t);else{var i=Je(t,e,n,r);if(null===i)Pe(t,r);else if(-1<Oe.indexOf(t))t=Ae(i,t,e,n,r),_e.push(t);else if(!function(t,e,n,r,i){switch(e){case"focus":return we=Ie(we,t,e,n,r,i),!0;case"dragenter":return xe=Ie(xe,t,e,n,r,i),!0;case"mouseover":return Se=Ie(Se,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return Te.set(o,Ie(Te.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ke.set(o,Ie(ke.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r)){Pe(t,r),t=pe(t,r,null,e);try{q(de,t)}finally{fe(t)}}}}function Je(t,e,n,r){if(null!==(n=In(n=le(r)))){var i=te(n);if(null===i)n=null;else{var o=i.tag;if(13===o){if(null!==(n=ee(i)))return n;n=null}else if(3===o){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}t=pe(t,r,n,e);try{q(de,t)}finally{fe(t)}return null}var tn={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},en=["Webkit","ms","Moz","O"];function nn(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||tn.hasOwnProperty(t)&&tn[t]?(""+e).trim():e+"px"}function rn(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=nn(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(tn).forEach((function(t){en.forEach((function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),tn[e]=tn[t]}))}));var on=i({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 sn(t,e){if(e){if(on[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(s(137,t,""));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(s(60));if("object"!=typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=e.style&&"object"!=typeof e.style)throw Error(s(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 un=Nt;function ln(t,e){var n=Jt(t=9===t.nodeType||11===t.nodeType?t:t.ownerDocument);e=k[e];for(var r=0;r<e.length;r++)me(e[r],t,n)}function cn(){}function hn(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 dn(t,e){return!(!t||!e)&&(t===e||(!t||3!==t.nodeType)&&(e&&3===e.nodeType?dn(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}function mn(){for(var t=window,e=hn();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(!n)break;e=hn((t=e.contentWindow).document)}return e}function vn(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 gn="$?",yn="$!",bn=null,_n=null;function wn(t,e){switch(t){case"button":case"input":case"select":case"textarea":return!!e.autoFocus}return!1}function xn(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 Sn="function"==typeof setTimeout?setTimeout:void 0,Tn="function"==typeof clearTimeout?clearTimeout:void 0;function kn(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break}return t}function Cn(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||n===yn||n===gn){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var On=Math.random().toString(36).slice(2),En="__reactInternalInstance$"+On,An="__reactEventHandlers$"+On,Pn="__reactContainere$"+On;function In(t){var e=t[En];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Pn]||n[En]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=Cn(t);null!==t;){if(n=t[En])return n;t=Cn(t)}return e}n=(t=n).parentNode}return null}function Mn(t){return!(t=t[En]||t[Pn])||5!==t.tag&&6!==t.tag&&13!==t.tag&&3!==t.tag?null:t}function Dn(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(s(33))}function Nn(t){return t[An]||null}function Rn(t){do{t=t.return}while(t&&5!==t.tag);return t||null}function jn(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(s(231,e,typeof n));return n}function Fn(t,e,n){(e=jn(t,n.dispatchConfig.phasedRegistrationNames[e]))&&(n._dispatchListeners=ie(n._dispatchListeners,e),n._dispatchInstances=ie(n._dispatchInstances,t))}function Vn(t){if(t&&t.dispatchConfig.phasedRegistrationNames){for(var e=t._targetInst,n=[];e;)n.push(e),e=Rn(e);for(e=n.length;0<e--;)Fn(n[e],"captured",t);for(e=0;e<n.length;e++)Fn(n[e],"bubbled",t)}}function Ln(t,e,n){t&&n&&n.dispatchConfig.registrationName&&(e=jn(t,n.dispatchConfig.registrationName))&&(n._dispatchListeners=ie(n._dispatchListeners,e),n._dispatchInstances=ie(n._dispatchInstances,t))}function zn(t){t&&t.dispatchConfig.registrationName&&Ln(t._targetInst,null,t)}function qn(t){oe(t,Vn)}var Bn=null,Un=null,$n=null;function Wn(){if($n)return $n;var t,e,n=Un,r=n.length,i="value"in Bn?Bn.value:Bn.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var s=r-t;for(e=1;e<=s&&n[r-e]===i[o-e];e++);return $n=i.slice(t,1<e?1-e:void 0)}function Hn(){return!0}function Kn(){return!1}function Gn(t,e,n,r){for(var i in this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n,t=this.constructor.Interface)t.hasOwnProperty(i)&&((e=t[i])?this[i]=e(n):"target"===i?this.target=r:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Hn:Kn,this.isPropagationStopped=Kn,this}function Zn(t,e,n,r){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,t,e,n,r),i}return new this(t,e,n,r)}function Xn(t){if(!(t instanceof this))throw Error(s(279));t.destructor(),10>this.eventPool.length&&this.eventPool.push(t)}function Yn(t){t.eventPool=[],t.getPooled=Zn,t.release=Xn}i(Gn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=Hn)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=Hn)},persist:function(){this.isPersistent=Hn},isPersistent:Kn,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=Kn,this._dispatchInstances=this._dispatchListeners=null}}),Gn.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},Gn.extend=function(t){function e(){}function n(){return r.apply(this,arguments)}var r=this;e.prototype=r.prototype;var o=new e;return i(o,n.prototype),n.prototype=o,n.prototype.constructor=n,n.Interface=i({},r.Interface,t),n.extend=r.extend,Yn(n),n},Yn(Gn);var Qn=Gn.extend({data:null}),Jn=Gn.extend({data:null}),tr=[9,13,27,32],er=O&&"CompositionEvent"in window,nr=null;O&&"documentMode"in document&&(nr=document.documentMode);var rr=O&&"TextEvent"in window&&!nr,ir=O&&(!er||nr&&8<nr&&11>=nr),or=String.fromCharCode(32),sr={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(" ")}},ar=!1;function ur(t,e){switch(t){case"keyup":return-1!==tr.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function lr(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var cr=!1;var hr={eventTypes:sr,extractEvents:function(t,e,n,r){var i;if(er)t:{switch(t){case"compositionstart":var o=sr.compositionStart;break t;case"compositionend":o=sr.compositionEnd;break t;case"compositionupdate":o=sr.compositionUpdate;break t}o=void 0}else cr?ur(t,n)&&(o=sr.compositionEnd):"keydown"===t&&229===n.keyCode&&(o=sr.compositionStart);return o?(ir&&"ko"!==n.locale&&(cr||o!==sr.compositionStart?o===sr.compositionEnd&&cr&&(i=Wn()):(Un="value"in(Bn=r)?Bn.value:Bn.textContent,cr=!0)),o=Qn.getPooled(o,e,n,r),i?o.data=i:null!==(i=lr(n))&&(o.data=i),qn(o),i=o):i=null,(t=rr?function(t,e){switch(t){case"compositionend":return lr(e);case"keypress":return 32!==e.which?null:(ar=!0,or);case"textInput":return(t=e.data)===or&&ar?null:t;default:return null}}(t,n):function(t,e){if(cr)return"compositionend"===t||!er&&ur(t,e)?(t=Wn(),$n=Un=Bn=null,cr=!1,t):null;switch(t){default: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 ir&&"ko"!==e.locale?null:e.data}}(t,n))?((e=Jn.getPooled(sr.beforeInput,e,n,r)).data=t,qn(e)):e=null,null===i?e:null===e?i:[i,e]}},fr={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 pr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!fr[t.type]:"textarea"===e}var dr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function mr(t,e,n){return(t=Gn.getPooled(dr.change,t,e,n)).type="change",M(n),qn(t),t}var vr=null,gr=null;function yr(t){ue(t)}function br(t){if(wt(Dn(t)))return t}function _r(t,e){if("change"===t)return e}var wr=!1;function xr(){vr&&(vr.detachEvent("onpropertychange",Sr),gr=vr=null)}function Sr(t){if("value"===t.propertyName&&br(gr))if(t=mr(gr,t,le(t)),V)ue(t);else{V=!0;try{N(yr,t)}finally{V=!1,z()}}}function Tr(t,e,n){"focus"===t?(xr(),gr=n,(vr=e).attachEvent("onpropertychange",Sr)):"blur"===t&&xr()}function kr(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return br(gr)}function Cr(t,e){if("click"===t)return br(e)}function Or(t,e){if("input"===t||"change"===t)return br(e)}O&&(wr=ce("input")&&(!document.documentMode||9<document.documentMode));var Er={eventTypes:dr,_isInputEventSupported:wr,extractEvents:function(t,e,n,r){var i=e?Dn(e):window,o=i.nodeName&&i.nodeName.toLowerCase();if("select"===o||"input"===o&&"file"===i.type)var s=_r;else if(pr(i))if(wr)s=Or;else{s=kr;var a=Tr}else(o=i.nodeName)&&"input"===o.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(s=Cr);if(s&&(s=s(t,e)))return mr(s,n,r);a&&a(t,i,e),"blur"===t&&(t=i._wrapperState)&&t.controlled&&"number"===i.type&&Ot(i,"number",i.value)}},Ar=Gn.extend({view:null,detail:null}),Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ir(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=Pr[t])&&!!e[t]}function Mr(){return Ir}var Dr=0,Nr=0,Rr=!1,jr=!1,Fr=Ar.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Mr,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=Dr;return Dr=t.screenX,Rr?"mousemove"===t.type?t.screenX-e:0:(Rr=!0,0)},movementY:function(t){if("movementY"in t)return t.movementY;var e=Nr;return Nr=t.screenY,jr?"mousemove"===t.type?t.screenY-e:0:(jr=!0,0)}}),Vr=Fr.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Lr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},zr={eventTypes:Lr,extractEvents:function(t,e,n,r,i){var o="mouseover"===t||"pointerover"===t,s="mouseout"===t||"pointerout"===t;if(o&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!s&&!o)return null;(o=r.window===r?r:(o=r.ownerDocument)?o.defaultView||o.parentWindow:window,s)?(s=e,null!==(e=(e=n.relatedTarget||n.toElement)?In(e):null)&&(e!==te(e)||5!==e.tag&&6!==e.tag)&&(e=null)):s=null;if(s===e)return null;if("mouseout"===t||"mouseover"===t)var a=Fr,u=Lr.mouseLeave,l=Lr.mouseEnter,c="mouse";else"pointerout"!==t&&"pointerover"!==t||(a=Vr,u=Lr.pointerLeave,l=Lr.pointerEnter,c="pointer");if(t=null==s?o:Dn(s),o=null==e?o:Dn(e),(u=a.getPooled(u,s,n,r)).type=c+"leave",u.target=t,u.relatedTarget=o,(n=a.getPooled(l,e,n,r)).type=c+"enter",n.target=o,n.relatedTarget=t,c=e,(r=s)&&c)t:{for(l=c,s=0,t=a=r;t;t=Rn(t))s++;for(t=0,e=l;e;e=Rn(e))t++;for(;0<s-t;)a=Rn(a),s--;for(;0<t-s;)l=Rn(l),t--;for(;s--;){if(a===l||a===l.alternate)break t;a=Rn(a),l=Rn(l)}a=null}else a=null;for(l=a,a=[];r&&r!==l&&(null===(s=r.alternate)||s!==l);)a.push(r),r=Rn(r);for(r=[];c&&c!==l&&(null===(s=c.alternate)||s!==l);)r.push(c),c=Rn(c);for(c=0;c<a.length;c++)Ln(a[c],"bubbled",u);for(c=r.length;0<c--;)Ln(r[c],"captured",n);return 0==(64&i)?[u]:[u,n]}};var qr="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},Br=Object.prototype.hasOwnProperty;function Ur(t,e){if(qr(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(!Br.call(e,n[r])||!qr(t[n[r]],e[n[r]]))return!1;return!0}var $r=O&&"documentMode"in document&&11>=document.documentMode,Wr={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Hr=null,Kr=null,Gr=null,Zr=!1;function Xr(t,e){var n=e.window===e?e.document:9===e.nodeType?e:e.ownerDocument;return Zr||null==Hr||Hr!==hn(n)?null:("selectionStart"in(n=Hr)&&vn(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},Gr&&Ur(Gr,n)?null:(Gr=n,(t=Gn.getPooled(Wr.select,Kr,t,e)).type="select",t.target=Hr,qn(t),t))}var Yr={eventTypes:Wr,extractEvents:function(t,e,n,r,i,o){if(!(o=!(i=o||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){t:{i=Jt(i),o=k.onSelect;for(var s=0;s<o.length;s++)if(!i.has(o[s])){i=!1;break t}i=!0}o=!i}if(o)return null;switch(i=e?Dn(e):window,t){case"focus":(pr(i)||"true"===i.contentEditable)&&(Hr=i,Kr=e,Gr=null);break;case"blur":Gr=Kr=Hr=null;break;case"mousedown":Zr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Zr=!1,Xr(n,r);case"selectionchange":if($r)break;case"keydown":case"keyup":return Xr(n,r)}return null}},Qr=Gn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Jr=Gn.extend({clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ti=Ar.extend({relatedTarget:null});function ei(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 ni={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ri={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"},ii=Ar.extend({key:function(t){if(t.key){var e=ni[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=ei(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?ri[t.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Mr,charCode:function(t){return"keypress"===t.type?ei(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?ei(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}}),oi=Fr.extend({dataTransfer:null}),si=Ar.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Mr}),ai=Gn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ui=Fr.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}),li={eventTypes:Ve,extractEvents:function(t,e,n,r){var i=Le.get(t);if(!i)return null;switch(t){case"keypress":if(0===ei(n))return null;case"keydown":case"keyup":t=ii;break;case"blur":case"focus":t=ti;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=Fr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":t=oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":t=si;break;case Kt:case Gt:case Zt:t=Qr;break;case Xt:t=ai;break;case"scroll":t=Ar;break;case"wheel":t=ui;break;case"copy":case"cut":case"paste":t=Jr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":t=Vr;break;default:t=Gn}return qn(e=t.getPooled(i,e,n,r)),e}};if(y)throw Error(s(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),d=Nn,m=Mn,v=Dn,C({SimpleEventPlugin:li,EnterLeaveEventPlugin:zr,ChangeEventPlugin:Er,SelectEventPlugin:Yr,BeforeInputEventPlugin:hr});var ci=[],hi=-1;function fi(t){0>hi||(t.current=ci[hi],ci[hi]=null,hi--)}function pi(t,e){hi++,ci[hi]=t.current,t.current=e}var di={},mi={current:di},vi={current:!1},gi=di;function yi(t,e){var n=t.type.contextTypes;if(!n)return di;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function bi(t){return null!=(t=t.childContextTypes)}function _i(){fi(vi),fi(mi)}function wi(t,e,n){if(mi.current!==di)throw Error(s(168));pi(mi,e),pi(vi,n)}function xi(t,e,n){var r=t.stateNode;if(t=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(s(108,vt(e)||"Unknown",o));return i({},n,{},r)}function Si(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||di,gi=mi.current,pi(mi,t),pi(vi,vi.current),!0}function Ti(t,e,n){var r=t.stateNode;if(!r)throw Error(s(169));n?(t=xi(t,e,gi),r.__reactInternalMemoizedMergedChildContext=t,fi(vi),fi(mi),pi(mi,t)):fi(vi),pi(vi,n)}var ki=o.unstable_runWithPriority,Ci=o.unstable_scheduleCallback,Oi=o.unstable_cancelCallback,Ei=o.unstable_requestPaint,Ai=o.unstable_now,Pi=o.unstable_getCurrentPriorityLevel,Ii=o.unstable_ImmediatePriority,Mi=o.unstable_UserBlockingPriority,Di=o.unstable_NormalPriority,Ni=o.unstable_LowPriority,Ri=o.unstable_IdlePriority,ji={},Fi=o.unstable_shouldYield,Vi=void 0!==Ei?Ei:function(){},Li=null,zi=null,qi=!1,Bi=Ai(),Ui=1e4>Bi?Ai:function(){return Ai()-Bi};function $i(){switch(Pi()){case Ii:return 99;case Mi:return 98;case Di:return 97;case Ni:return 96;case Ri:return 95;default:throw Error(s(332))}}function Wi(t){switch(t){case 99:return Ii;case 98:return Mi;case 97:return Di;case 96:return Ni;case 95:return Ri;default:throw Error(s(332))}}function Hi(t,e){return t=Wi(t),ki(t,e)}function Ki(t,e,n){return t=Wi(t),Ci(t,e,n)}function Gi(t){return null===Li?(Li=[t],zi=Ci(Ii,Xi)):Li.push(t),ji}function Zi(){if(null!==zi){var t=zi;zi=null,Oi(t)}Xi()}function Xi(){if(!qi&&null!==Li){qi=!0;var t=0;try{var e=Li;Hi(99,(function(){for(;t<e.length;t++){var n=e[t];do{n=n(!0)}while(null!==n)}})),Li=null}catch(e){throw null!==Li&&(Li=Li.slice(t+1)),Ci(Ii,Zi),e}finally{qi=!1}}}function Yi(t,e,n){return 1073741821-(1+((1073741821-t+e/10)/(n/=10)|0))*n}function Qi(t,e){if(t&&t.defaultProps)for(var n in e=i({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var Ji={current:null},to=null,eo=null,no=null;function ro(){no=eo=to=null}function io(t){var e=Ji.current;fi(Ji),t.type._context._currentValue=e}function oo(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 so(t,e){to=t,no=eo=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(t.expirationTime>=e&&(Ns=!0),t.firstContext=null)}function ao(t,e){if(no!==t&&!1!==e&&0!==e)if("number"==typeof e&&1073741823!==e||(no=t,e=1073741823),e={context:t,observedBits:e,next:null},null===eo){if(null===to)throw Error(s(308));eo=e,to.dependencies={expirationTime:0,firstContext:e,responders:null}}else eo=eo.next=e;return t._currentValue}var uo=!1;function lo(t){t.updateQueue={baseState:t.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function co(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,baseQueue:t.baseQueue,shared:t.shared,effects:t.effects})}function ho(t,e){return(t={expirationTime:t,suspenseConfig:e,tag:0,payload:null,callback:null,next:null}).next=t}function fo(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 po(t,e){var n=t.alternate;null!==n&&co(n,t),null===(n=(t=t.updateQueue).baseQueue)?(t.baseQueue=e.next=e,e.next=e):(e.next=n.next,n.next=e)}function mo(t,e,n,r){var o=t.updateQueue;uo=!1;var s=o.baseQueue,a=o.shared.pending;if(null!==a){if(null!==s){var u=s.next;s.next=a.next,a.next=u}s=a,o.shared.pending=null,null!==(u=t.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=a))}if(null!==s){u=s.next;var l=o.baseState,c=0,h=null,f=null,p=null;if(null!==u)for(var d=u;;){if((a=d.expirationTime)<r){var m={expirationTime:d.expirationTime,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null};null===p?(f=p=m,h=l):p=p.next=m,a>c&&(c=a)}else{null!==p&&(p=p.next={expirationTime:1073741823,suspenseConfig:d.suspenseConfig,tag:d.tag,payload:d.payload,callback:d.callback,next:null}),pu(a,d.suspenseConfig);t:{var v=t,g=d;switch(a=e,m=n,g.tag){case 1:if("function"==typeof(v=g.payload)){l=v.call(m,l,a);break t}l=v;break t;case 3:v.effectTag=-4097&v.effectTag|64;case 0:if(null==(a="function"==typeof(v=g.payload)?v.call(m,l,a):v))break t;l=i({},l,a);break t;case 2:uo=!0}}null!==d.callback&&(t.effectTag|=32,null===(a=o.effects)?o.effects=[d]:a.push(d))}if(null===(d=d.next)||d===u){if(null===(a=o.shared.pending))break;d=s.next=a.next,a.next=u,o.baseQueue=s=a,o.shared.pending=null}}null===p?h=l:p.next=f,o.baseState=h,o.baseQueue=p,du(c),t.expirationTime=c,t.memoizedState=l}}function vo(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=i,i=n,"function"!=typeof r)throw Error(s(191,r));r.call(i)}}}var go=X.ReactCurrentBatchConfig,yo=(new r.Component).refs;function bo(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:i({},e,n),t.memoizedState=n,0===t.expirationTime&&(t.updateQueue.baseState=n)}var _o={isMounted:function(t){return!!(t=t._reactInternalFiber)&&te(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternalFiber;var r=tu(),i=go.suspense;(i=ho(r=eu(r,t,i),i)).payload=e,null!=n&&(i.callback=n),fo(t,i),nu(t,r)},enqueueReplaceState:function(t,e,n){t=t._reactInternalFiber;var r=tu(),i=go.suspense;(i=ho(r=eu(r,t,i),i)).tag=1,i.payload=e,null!=n&&(i.callback=n),fo(t,i),nu(t,r)},enqueueForceUpdate:function(t,e){t=t._reactInternalFiber;var n=tu(),r=go.suspense;(r=ho(n=eu(n,t,r),r)).tag=2,null!=e&&(r.callback=e),fo(t,r),nu(t,n)}};function wo(t,e,n,r,i,o,s){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,s):!e.prototype||!e.prototype.isPureReactComponent||(!Ur(n,r)||!Ur(i,o))}function xo(t,e,n){var r=!1,i=di,o=e.contextType;return"object"==typeof o&&null!==o?o=ao(o):(i=bi(e)?gi:mi.current,o=(r=null!=(r=e.contextTypes))?yi(t,i):di),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=_o,t.stateNode=e,e._reactInternalFiber=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function So(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&&_o.enqueueReplaceState(e,e.state,null)}function To(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=yo,lo(t);var o=e.contextType;"object"==typeof o&&null!==o?i.context=ao(o):(o=bi(e)?gi:mi.current,i.context=yi(t,o)),mo(t,n,i,r),i.state=t.memoizedState,"function"==typeof(o=e.getDerivedStateFromProps)&&(bo(t,e,o,n),i.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(e=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&_o.enqueueReplaceState(i,i.state,null),mo(t,n,i,r),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.effectTag|=4)}var ko=Array.isArray;function Co(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(s(309));var r=n.stateNode}if(!r)throw Error(s(147,t));var i=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===i?e.ref:(e=function(t){var e=r.refs;e===yo&&(e=r.refs={}),null===t?delete e[i]:e[i]=t},e._stringRef=i,e)}if("string"!=typeof t)throw Error(s(284));if(!n._owner)throw Error(s(290,t))}return t}function Oo(t,e){if("textarea"!==t.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(e)?"object with keys {"+Object.keys(e).join(", ")+"}":e,""))}function Eo(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 i(t,e){return(t=Nu(t,e)).index=0,t.sibling=null,t}function o(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 a(e){return t&&null===e.alternate&&(e.effectTag=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=Fu(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function l(t,e,n,r){return null!==e&&e.elementType===n.type?((r=i(e,n.props)).ref=Co(t,e,n),r.return=t,r):((r=Ru(n.type,n.key,n.props,null,t.mode,r)).ref=Co(t,e,n),r.return=t,r)}function c(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=Vu(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function h(t,e,n,r,o){return null===e||7!==e.tag?((e=ju(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function f(t,e,n){if("string"==typeof e||"number"==typeof e)return(e=Fu(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case tt:return(n=Ru(e.type,e.key,e.props,null,t.mode,n)).ref=Co(t,null,e),n.return=t,n;case et:return(e=Vu(e,t.mode,n)).return=t,e}if(ko(e)||mt(e))return(e=ju(e,t.mode,n,null)).return=t,e;Oo(t,e)}return null}function p(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:u(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case tt:return n.key===i?n.type===nt?h(t,e,n.props.children,r,i):l(t,e,n,r):null;case et:return n.key===i?c(t,e,n,r):null}if(ko(n)||mt(n))return null!==i?null:h(t,e,n,r,null);Oo(t,n)}return null}function d(t,e,n,r,i){if("string"==typeof r||"number"==typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case tt:return t=t.get(null===r.key?n:r.key)||null,r.type===nt?h(e,t,r.props.children,i,r.key):l(e,t,r,i);case et:return c(e,t=t.get(null===r.key?n:r.key)||null,r,i)}if(ko(r)||mt(r))return h(e,t=t.get(n)||null,r,i,null);Oo(e,r)}return null}function m(i,s,a,u){for(var l=null,c=null,h=s,m=s=0,v=null;null!==h&&m<a.length;m++){h.index>m?(v=h,h=null):v=h.sibling;var g=p(i,h,a[m],u);if(null===g){null===h&&(h=v);break}t&&h&&null===g.alternate&&e(i,h),s=o(g,s,m),null===c?l=g:c.sibling=g,c=g,h=v}if(m===a.length)return n(i,h),l;if(null===h){for(;m<a.length;m++)null!==(h=f(i,a[m],u))&&(s=o(h,s,m),null===c?l=h:c.sibling=h,c=h);return l}for(h=r(i,h);m<a.length;m++)null!==(v=d(h,i,m,a[m],u))&&(t&&null!==v.alternate&&h.delete(null===v.key?m:v.key),s=o(v,s,m),null===c?l=v:c.sibling=v,c=v);return t&&h.forEach((function(t){return e(i,t)})),l}function v(i,a,u,l){var c=mt(u);if("function"!=typeof c)throw Error(s(150));if(null==(u=c.call(u)))throw Error(s(151));for(var h=c=null,m=a,v=a=0,g=null,y=u.next();null!==m&&!y.done;v++,y=u.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=p(i,m,y.value,l);if(null===b){null===m&&(m=g);break}t&&m&&null===b.alternate&&e(i,m),a=o(b,a,v),null===h?c=b:h.sibling=b,h=b,m=g}if(y.done)return n(i,m),c;if(null===m){for(;!y.done;v++,y=u.next())null!==(y=f(i,y.value,l))&&(a=o(y,a,v),null===h?c=y:h.sibling=y,h=y);return c}for(m=r(i,m);!y.done;v++,y=u.next())null!==(y=d(m,i,v,y.value,l))&&(t&&null!==y.alternate&&m.delete(null===y.key?v:y.key),a=o(y,a,v),null===h?c=y:h.sibling=y,h=y);return t&&m.forEach((function(t){return e(i,t)})),c}return function(t,r,o,u){var l="object"==typeof o&&null!==o&&o.type===nt&&null===o.key;l&&(o=o.props.children);var c="object"==typeof o&&null!==o;if(c)switch(o.$$typeof){case tt:t:{for(c=o.key,l=r;null!==l;){if(l.key===c){if(7===l.tag){if(o.type===nt){n(t,l.sibling),(r=i(l,o.props.children)).return=t,t=r;break t}}else if(l.elementType===o.type){n(t,l.sibling),(r=i(l,o.props)).ref=Co(t,l,o),r.return=t,t=r;break t}n(t,l);break}e(t,l),l=l.sibling}o.type===nt?((r=ju(o.props.children,t.mode,u,o.key)).return=t,t=r):((u=Ru(o.type,o.key,o.props,null,t.mode,u)).ref=Co(t,r,o),u.return=t,t=u)}return a(t);case et:t:{for(l=o.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(t,r.sibling),(r=i(r,o.children||[])).return=t,t=r;break t}n(t,r);break}e(t,r),r=r.sibling}(r=Vu(o,t.mode,u)).return=t,t=r}return a(t)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(t,r.sibling),(r=i(r,o)).return=t,t=r):(n(t,r),(r=Fu(o,t.mode,u)).return=t,t=r),a(t);if(ko(o))return m(t,r,o,u);if(mt(o))return v(t,r,o,u);if(c&&Oo(t,o),void 0===o&&!l)switch(t.tag){case 1:case 0:throw t=t.type,Error(s(152,t.displayName||t.name||"Component"))}return n(t,r)}}var Ao=Eo(!0),Po=Eo(!1),Io={},Mo={current:Io},Do={current:Io},No={current:Io};function Ro(t){if(t===Io)throw Error(s(174));return t}function jo(t,e){switch(pi(No,e),pi(Do,t),pi(Mo,Io),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)}fi(Mo),pi(Mo,e)}function Fo(){fi(Mo),fi(Do),fi(No)}function Vo(t){Ro(No.current);var e=Ro(Mo.current),n=Ft(e,t.type);e!==n&&(pi(Do,t),pi(Mo,n))}function Lo(t){Do.current===t&&(fi(Mo),fi(Do))}var zo={current:0};function qo(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===gn||n.data===yn))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 Bo(t,e){return{responder:t,props:e}}var Uo=X.ReactCurrentDispatcher,$o=X.ReactCurrentBatchConfig,Wo=0,Ho=null,Ko=null,Go=null,Zo=!1;function Xo(){throw Error(s(321))}function Yo(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!qr(t[n],e[n]))return!1;return!0}function Qo(t,e,n,r,i,o){if(Wo=o,Ho=e,e.memoizedState=null,e.updateQueue=null,e.expirationTime=0,Uo.current=null===t||null===t.memoizedState?ws:xs,t=n(r,i),e.expirationTime===Wo){o=0;do{if(e.expirationTime=0,!(25>o))throw Error(s(301));o+=1,Go=Ko=null,e.updateQueue=null,Uo.current=Ss,t=n(r,i)}while(e.expirationTime===Wo)}if(Uo.current=_s,e=null!==Ko&&null!==Ko.next,Wo=0,Go=Ko=Ho=null,Zo=!1,e)throw Error(s(300));return t}function Jo(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Go?Ho.memoizedState=Go=t:Go=Go.next=t,Go}function ts(){if(null===Ko){var t=Ho.alternate;t=null!==t?t.memoizedState:null}else t=Ko.next;var e=null===Go?Ho.memoizedState:Go.next;if(null!==e)Go=e,Ko=t;else{if(null===t)throw Error(s(310));t={memoizedState:(Ko=t).memoizedState,baseState:Ko.baseState,baseQueue:Ko.baseQueue,queue:Ko.queue,next:null},null===Go?Ho.memoizedState=Go=t:Go=Go.next=t}return Go}function es(t,e){return"function"==typeof e?e(t):e}function ns(t){var e=ts(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var r=Ko,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var u=a=o=null,l=i;do{var c=l.expirationTime;if(c<Wo){var h={expirationTime:l.expirationTime,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(a=u=h,o=r):u=u.next=h,c>Ho.expirationTime&&(Ho.expirationTime=c,du(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:l.suspenseConfig,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),pu(c,l.suspenseConfig),r=l.eagerReducer===t?l.eagerState:t(r,l.action);l=l.next}while(null!==l&&l!==i);null===u?o=r:u.next=a,qr(r,e.memoizedState)||(Ns=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=u,n.lastRenderedState=r}return[e.memoizedState,n.dispatch]}function rs(t){var e=ts(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=t(o,a.action),a=a.next}while(a!==i);qr(o,e.memoizedState)||(Ns=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function is(t){var e=Jo();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t=(t=e.queue={pending:null,dispatch:null,lastRenderedReducer:es,lastRenderedState:t}).dispatch=bs.bind(null,Ho,t),[e.memoizedState,t]}function os(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Ho.updateQueue)?(e={lastEffect:null},Ho.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 ss(){return ts().memoizedState}function as(t,e,n,r){var i=Jo();Ho.effectTag|=t,i.memoizedState=os(1|e,n,void 0,void 0===r?null:r)}function us(t,e,n,r){var i=ts();r=void 0===r?null:r;var o=void 0;if(null!==Ko){var s=Ko.memoizedState;if(o=s.destroy,null!==r&&Yo(r,s.deps))return void os(e,n,o,r)}Ho.effectTag|=t,i.memoizedState=os(1|e,n,o,r)}function ls(t,e){return as(516,4,t,e)}function cs(t,e){return us(516,4,t,e)}function hs(t,e){return us(4,2,t,e)}function fs(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 ps(t,e,n){return n=null!=n?n.concat([t]):null,us(4,2,fs.bind(null,e,t),n)}function ds(){}function ms(t,e){return Jo().memoizedState=[t,void 0===e?null:e],t}function vs(t,e){var n=ts();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Yo(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function gs(t,e){var n=ts();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Yo(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ys(t,e,n){var r=$i();Hi(98>r?98:r,(function(){t(!0)})),Hi(97<r?97:r,(function(){var r=$o.suspense;$o.suspense=void 0===e?null:e;try{t(!1),n()}finally{$o.suspense=r}}))}function bs(t,e,n){var r=tu(),i=go.suspense;i={expirationTime:r=eu(r,t,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var o=e.pending;if(null===o?i.next=i:(i.next=o.next,o.next=i),e.pending=i,o=t.alternate,t===Ho||null!==o&&o===Ho)Zo=!0,i.expirationTime=Wo,Ho.expirationTime=Wo;else{if(0===t.expirationTime&&(null===o||0===o.expirationTime)&&null!==(o=e.lastRenderedReducer))try{var s=e.lastRenderedState,a=o(s,n);if(i.eagerReducer=o,i.eagerState=a,qr(a,s))return}catch(t){}nu(t,r)}}var _s={readContext:ao,useCallback:Xo,useContext:Xo,useEffect:Xo,useImperativeHandle:Xo,useLayoutEffect:Xo,useMemo:Xo,useReducer:Xo,useRef:Xo,useState:Xo,useDebugValue:Xo,useResponder:Xo,useDeferredValue:Xo,useTransition:Xo},ws={readContext:ao,useCallback:ms,useContext:ao,useEffect:ls,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,as(4,2,fs.bind(null,e,t),n)},useLayoutEffect:function(t,e){return as(4,2,t,e)},useMemo:function(t,e){var n=Jo();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Jo();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=bs.bind(null,Ho,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Jo().memoizedState=t},useState:is,useDebugValue:ds,useResponder:Bo,useDeferredValue:function(t,e){var n=is(t),r=n[0],i=n[1];return ls((function(){var n=$o.suspense;$o.suspense=void 0===e?null:e;try{i(t)}finally{$o.suspense=n}}),[t,e]),r},useTransition:function(t){var e=is(!1),n=e[0];return e=e[1],[ms(ys.bind(null,e,t),[e,t]),n]}},xs={readContext:ao,useCallback:vs,useContext:ao,useEffect:cs,useImperativeHandle:ps,useLayoutEffect:hs,useMemo:gs,useReducer:ns,useRef:ss,useState:function(){return ns(es)},useDebugValue:ds,useResponder:Bo,useDeferredValue:function(t,e){var n=ns(es),r=n[0],i=n[1];return cs((function(){var n=$o.suspense;$o.suspense=void 0===e?null:e;try{i(t)}finally{$o.suspense=n}}),[t,e]),r},useTransition:function(t){var e=ns(es),n=e[0];return e=e[1],[vs(ys.bind(null,e,t),[e,t]),n]}},Ss={readContext:ao,useCallback:vs,useContext:ao,useEffect:cs,useImperativeHandle:ps,useLayoutEffect:hs,useMemo:gs,useReducer:rs,useRef:ss,useState:function(){return rs(es)},useDebugValue:ds,useResponder:Bo,useDeferredValue:function(t,e){var n=rs(es),r=n[0],i=n[1];return cs((function(){var n=$o.suspense;$o.suspense=void 0===e?null:e;try{i(t)}finally{$o.suspense=n}}),[t,e]),r},useTransition:function(t){var e=rs(es),n=e[0];return e=e[1],[vs(ys.bind(null,e,t),[e,t]),n]}},Ts=null,ks=null,Cs=!1;function Os(t,e){var n=Mu(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 Es(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);default:return!1}}function As(t){if(Cs){var e=ks;if(e){var n=e;if(!Es(t,e)){if(!(e=kn(n.nextSibling))||!Es(t,e))return t.effectTag=-1025&t.effectTag|2,Cs=!1,void(Ts=t);Os(Ts,n)}Ts=t,ks=kn(e.firstChild)}else t.effectTag=-1025&t.effectTag|2,Cs=!1,Ts=t}}function Ps(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;Ts=t}function Is(t){if(t!==Ts)return!1;if(!Cs)return Ps(t),Cs=!0,!1;var e=t.type;if(5!==t.tag||"head"!==e&&"body"!==e&&!xn(e,t.memoizedProps))for(e=ks;e;)Os(t,e),e=kn(e.nextSibling);if(Ps(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(s(317));t:{for(t=t.nextSibling,e=0;t;){if(8===t.nodeType){var n=t.data;if("/$"===n){if(0===e){ks=kn(t.nextSibling);break t}e--}else"$"!==n&&n!==yn&&n!==gn||e++}t=t.nextSibling}ks=null}}else ks=Ts?kn(t.stateNode.nextSibling):null;return!0}function Ms(){ks=Ts=null,Cs=!1}var Ds=X.ReactCurrentOwner,Ns=!1;function Rs(t,e,n,r){e.child=null===t?Po(e,null,n,r):Ao(e,t.child,n,r)}function js(t,e,n,r,i){n=n.render;var o=e.ref;return so(e,i),r=Qo(t,e,n,r,o,i),null===t||Ns?(e.effectTag|=1,Rs(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Qs(t,e,i))}function Fs(t,e,n,r,i,o){if(null===t){var s=n.type;return"function"!=typeof s||Du(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=Ru(n.type,null,r,null,e.mode,o)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=s,Vs(t,e,s,r,i,o))}return s=t.child,i<o&&(i=s.memoizedProps,(n=null!==(n=n.compare)?n:Ur)(i,r)&&t.ref===e.ref)?Qs(t,e,o):(e.effectTag|=1,(t=Nu(s,r)).ref=e.ref,t.return=e,e.child=t)}function Vs(t,e,n,r,i,o){return null!==t&&Ur(t.memoizedProps,r)&&t.ref===e.ref&&(Ns=!1,i<o)?(e.expirationTime=t.expirationTime,Qs(t,e,o)):zs(t,e,n,r,o)}function Ls(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.effectTag|=128)}function zs(t,e,n,r,i){var o=bi(n)?gi:mi.current;return o=yi(e,o),so(e,i),n=Qo(t,e,n,r,o,i),null===t||Ns?(e.effectTag|=1,Rs(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.effectTag&=-517,t.expirationTime<=i&&(t.expirationTime=0),Qs(t,e,i))}function qs(t,e,n,r,i){if(bi(n)){var o=!0;Si(e)}else o=!1;if(so(e,i),null===e.stateNode)null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),xo(e,n,r),To(e,n,r,i),r=!0;else if(null===t){var s=e.stateNode,a=e.memoizedProps;s.props=a;var u=s.context,l=n.contextType;"object"==typeof l&&null!==l?l=ao(l):l=yi(e,l=bi(n)?gi:mi.current);var c=n.getDerivedStateFromProps,h="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||u!==l)&&So(e,s,r,l),uo=!1;var f=e.memoizedState;s.state=f,mo(e,r,s,i),u=e.memoizedState,a!==r||f!==u||vi.current||uo?("function"==typeof c&&(bo(e,n,c,r),u=e.memoizedState),(a=uo||wo(e,n,a,r,f,u,l))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(e.effectTag|=4)):("function"==typeof s.componentDidMount&&(e.effectTag|=4),e.memoizedProps=r,e.memoizedState=u),s.props=r,s.state=u,s.context=l,r=a):("function"==typeof s.componentDidMount&&(e.effectTag|=4),r=!1)}else s=e.stateNode,co(t,e),a=e.memoizedProps,s.props=e.type===e.elementType?a:Qi(e.type,a),u=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=ao(l):l=yi(e,l=bi(n)?gi:mi.current),(h="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||u!==l)&&So(e,s,r,l),uo=!1,u=e.memoizedState,s.state=u,mo(e,r,s,i),f=e.memoizedState,a!==r||u!==f||vi.current||uo?("function"==typeof c&&(bo(e,n,c,r),f=e.memoizedState),(c=uo||wo(e,n,a,r,u,f,l))?(h||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(e.effectTag|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(e.effectTag|=256)):("function"!=typeof s.componentDidUpdate||a===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),e.memoizedProps=r,e.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===t.memoizedProps&&u===t.memoizedState||(e.effectTag|=256),r=!1);return Bs(t,e,n,r,o,i)}function Bs(t,e,n,r,i,o){Ls(t,e);var s=0!=(64&e.effectTag);if(!r&&!s)return i&&Ti(e,n,!1),Qs(t,e,o);r=e.stateNode,Ds.current=e;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.effectTag|=1,null!==t&&s?(e.child=Ao(e,t.child,null,o),e.child=Ao(e,null,a,o)):Rs(t,e,a,o),e.memoizedState=r.state,i&&Ti(e,n,!0),e.child}function Us(t){var e=t.stateNode;e.pendingContext?wi(0,e.pendingContext,e.pendingContext!==e.context):e.context&&wi(0,e.context,!1),jo(t,e.containerInfo)}var $s,Ws,Hs,Ks={dehydrated:null,retryTime:0};function Gs(t,e,n){var r,i=e.mode,o=e.pendingProps,s=zo.current,a=!1;if((r=0!=(64&e.effectTag))||(r=0!=(2&s)&&(null===t||null!==t.memoizedState)),r?(a=!0,e.effectTag&=-65):null!==t&&null===t.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(s|=1),pi(zo,1&s),null===t){if(void 0!==o.fallback&&As(e),a){if(a=o.fallback,(o=ju(null,i,0,null)).return=e,0==(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=ju(a,i,n,null)).return=e,o.sibling=n,e.memoizedState=Ks,e.child=o,n}return i=o.children,e.memoizedState=null,e.child=Po(e,null,i,n)}if(null!==t.memoizedState){if(i=(t=t.child).sibling,a){if(o=o.fallback,(n=Nu(t,t.pendingProps)).return=e,0==(2&e.mode)&&(a=null!==e.memoizedState?e.child.child:e.child)!==t.child)for(n.child=a;null!==a;)a.return=n,a=a.sibling;return(i=Nu(i,o)).return=e,n.sibling=i,n.childExpirationTime=0,e.memoizedState=Ks,e.child=n,i}return n=Ao(e,t.child,o.children,n),e.memoizedState=null,e.child=n}if(t=t.child,a){if(a=o.fallback,(o=ju(null,i,0,null)).return=e,o.child=t,null!==t&&(t.return=o),0==(2&e.mode))for(t=null!==e.memoizedState?e.child.child:e.child,o.child=t;null!==t;)t.return=o,t=t.sibling;return(n=ju(a,i,n,null)).return=e,o.sibling=n,n.effectTag|=2,o.childExpirationTime=0,e.memoizedState=Ks,e.child=o,n}return e.memoizedState=null,e.child=Ao(e,t,o.children,n)}function Zs(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e),oo(t.return,e)}function Xs(t,e,n,r,i,o){var s=t.memoizedState;null===s?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:i,lastEffect:o}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailExpiration=0,s.tailMode=i,s.lastEffect=o)}function Ys(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Rs(t,e,r.children,n),0!=(2&(r=zo.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&&Zs(t,n);else if(19===t.tag)Zs(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(pi(zo,r),0==(2&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===qo(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Xs(e,!1,i,n,o,e.lastEffect);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===qo(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Xs(e,!0,n,null,o,e.lastEffect);break;case"together":Xs(e,!1,null,null,void 0,e.lastEffect);break;default:e.memoizedState=null}return e.child}function Qs(t,e,n){null!==t&&(e.dependencies=t.dependencies);var r=e.expirationTime;if(0!==r&&du(r),e.childExpirationTime<n)return null;if(null!==t&&e.child!==t.child)throw Error(s(153));if(null!==e.child){for(n=Nu(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=Nu(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function Js(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 ta(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:case 17:return bi(e.type)&&_i(),null;case 3:return Fo(),fi(vi),fi(mi),(n=e.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||!Is(e)||(e.effectTag|=4),null;case 5:Lo(e),n=Ro(No.current);var o=e.type;if(null!==t&&null!=e.stateNode)Ws(t,e,o,r,n),t.ref!==e.ref&&(e.effectTag|=128);else{if(!r){if(null===e.stateNode)throw Error(s(166));return null}if(t=Ro(Mo.current),Is(e)){r=e.stateNode,o=e.type;var a=e.memoizedProps;switch(r[En]=e,r[An]=a,o){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":St(r,a),Ge("invalid",r),ln(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Ge("invalid",r),ln(n,"onChange");break;case"textarea":It(r,a),Ge("invalid",r),ln(n,"onChange")}for(var u in sn(o,a),t=null,a)if(a.hasOwnProperty(u)){var l=a[u];"children"===u?"string"==typeof l?r.textContent!==l&&(t=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(t=["children",""+l]):T.hasOwnProperty(u)&&null!=l&&ln(n,u)}switch(o){case"input":_t(r),Ct(r,a,!0);break;case"textarea":_t(r),Dt(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=cn)}n=t,e.updateQueue=n,null!==n&&(e.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,t===un&&(t=jt(o)),t===un?"script"===o?((t=u.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=u.createElement(o,{is:r.is}):(t=u.createElement(o),"select"===o&&(u=t,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):t=u.createElementNS(t,o),t[En]=e,t[An]=r,$s(t,e),e.stateNode=t,u=an(o,r),o){case"iframe":case"object":case"embed":Ge("load",t),l=r;break;case"video":case"audio":for(l=0;l<Yt.length;l++)Ge(Yt[l],t);l=r;break;case"source":Ge("error",t),l=r;break;case"img":case"image":case"link":Ge("error",t),Ge("load",t),l=r;break;case"form":Ge("reset",t),Ge("submit",t),l=r;break;case"details":Ge("toggle",t),l=r;break;case"input":St(t,r),l=xt(t,r),Ge("invalid",t),ln(n,"onChange");break;case"option":l=Et(t,r);break;case"select":t._wrapperState={wasMultiple:!!r.multiple},l=i({},r,{value:void 0}),Ge("invalid",t),ln(n,"onChange");break;case"textarea":It(t,r),l=Pt(t,r),Ge("invalid",t),ln(n,"onChange");break;default:l=r}sn(o,l);var c=l;for(a in c)if(c.hasOwnProperty(a)){var h=c[a];"style"===a?rn(t,h):"dangerouslySetInnerHTML"===a?null!=(h=h?h.__html:void 0)&&zt(t,h):"children"===a?"string"==typeof h?("textarea"!==o||""!==h)&&qt(t,h):"number"==typeof h&&qt(t,""+h):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(T.hasOwnProperty(a)?null!=h&&ln(n,a):null!=h&&Y(t,a,h,u))}switch(o){case"input":_t(t),Ct(t,r,!1);break;case"textarea":_t(t),Dt(t);break;case"option":null!=r.value&&t.setAttribute("value",""+yt(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 l.onClick&&(t.onclick=cn)}wn(o,r)&&(e.effectTag|=4)}null!==e.ref&&(e.effectTag|=128)}return null;case 6:if(t&&null!=e.stateNode)Hs(0,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(s(166));n=Ro(No.current),Ro(Mo.current),Is(e)?(n=e.stateNode,r=e.memoizedProps,n[En]=e,n.nodeValue!==r&&(e.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[En]=e,e.stateNode=n)}return null;case 13:return fi(zo),r=e.memoizedState,0!=(64&e.effectTag)?(e.expirationTime=n,e):(n=null!==r,r=!1,null===t?void 0!==e.memoizedProps.fallback&&Is(e):(r=null!==(o=t.memoizedState),n||null===o||null!==(o=t.child.sibling)&&(null!==(a=e.firstEffect)?(e.firstEffect=o,o.nextEffect=a):(e.firstEffect=e.lastEffect=o,o.nextEffect=null),o.effectTag=8)),n&&!r&&0!=(2&e.mode)&&(null===t&&!0!==e.memoizedProps.unstable_avoidThisFallback||0!=(1&zo.current)?Ra===Ea&&(Ra=Aa):(Ra!==Ea&&Ra!==Aa||(Ra=Pa),0!==za&&null!==Ma&&(qu(Ma,Na),Bu(Ma,za)))),(n||r)&&(e.effectTag|=4),null);case 4:return Fo(),null;case 10:return io(e),null;case 19:if(fi(zo),null===(r=e.memoizedState))return null;if(o=0!=(64&e.effectTag),null===(a=r.rendering)){if(o)Js(r,!1);else if(Ra!==Ea||null!==t&&0!=(64&t.effectTag))for(a=e.child;null!==a;){if(null!==(t=qo(a))){for(e.effectTag|=64,Js(r,!1),null!==(o=t.updateQueue)&&(e.updateQueue=o,e.effectTag|=4),null===r.lastEffect&&(e.firstEffect=null),e.lastEffect=r.lastEffect,r=e.child;null!==r;)a=n,(o=r).effectTag&=2,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null,null===(t=o.alternate)?(o.childExpirationTime=0,o.expirationTime=a,o.child=null,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null):(o.childExpirationTime=t.childExpirationTime,o.expirationTime=t.expirationTime,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=null===a?null:{expirationTime:a.expirationTime,firstContext:a.firstContext,responders:a.responders}),r=r.sibling;return pi(zo,1&zo.current|2),e.child}a=a.sibling}}else{if(!o)if(null!==(t=qo(a))){if(e.effectTag|=64,o=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.effectTag|=4),Js(r,!0),null===r.tail&&"hidden"===r.tailMode&&!a.alternate)return null!==(e=e.lastEffect=r.lastEffect)&&(e.nextEffect=null),null}else 2*Ui()-r.renderingStartTime>r.tailExpiration&&1<n&&(e.effectTag|=64,o=!0,Js(r,!1),e.expirationTime=e.childExpirationTime=n-1);r.isBackwards?(a.sibling=e.child,e.child=a):(null!==(n=r.last)?n.sibling=a:e.child=a,r.last=a)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=Ui()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=e.lastEffect,r.renderingStartTime=Ui(),n.sibling=null,e=zo.current,pi(zo,o?1&e|2:1&e),n):null}throw Error(s(156,e.tag))}function ea(t){switch(t.tag){case 1:bi(t.type)&&_i();var e=t.effectTag;return 4096&e?(t.effectTag=-4097&e|64,t):null;case 3:if(Fo(),fi(vi),fi(mi),0!=(64&(e=t.effectTag)))throw Error(s(285));return t.effectTag=-4097&e|64,t;case 5:return Lo(t),null;case 13:return fi(zo),4096&(e=t.effectTag)?(t.effectTag=-4097&e|64,t):null;case 19:return fi(zo),null;case 4:return Fo(),null;case 10:return io(t),null;default:return null}}function na(t,e){return{value:t,source:e,stack:gt(e)}}$s=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}},Ws=function(t,e,n,r,o){var s=t.memoizedProps;if(s!==r){var a,u,l=e.stateNode;switch(Ro(Mo.current),t=null,n){case"input":s=xt(l,s),r=xt(l,r),t=[];break;case"option":s=Et(l,s),r=Et(l,r),t=[];break;case"select":s=i({},s,{value:void 0}),r=i({},r,{value:void 0}),t=[];break;case"textarea":s=Pt(l,s),r=Pt(l,r),t=[];break;default:"function"!=typeof s.onClick&&"function"==typeof r.onClick&&(l.onclick=cn)}for(a in sn(n,r),n=null,s)if(!r.hasOwnProperty(a)&&s.hasOwnProperty(a)&&null!=s[a])if("style"===a)for(u in l=s[a])l.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(T.hasOwnProperty(a)?t||(t=[]):(t=t||[]).push(a,null));for(a in r){var c=r[a];if(l=null!=s?s[a]:void 0,r.hasOwnProperty(a)&&c!==l&&(null!=c||null!=l))if("style"===a)if(l){for(u in l)!l.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&l[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(t||(t=[]),t.push(a,n)),n=c;else"dangerouslySetInnerHTML"===a?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(t=t||[]).push(a,c)):"children"===a?l===c||"string"!=typeof c&&"number"!=typeof c||(t=t||[]).push(a,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(T.hasOwnProperty(a)?(null!=c&&ln(o,a),t||l===c||(t=[])):(t=t||[]).push(a,c))}n&&(t=t||[]).push("style",n),o=t,(e.updateQueue=o)&&(e.effectTag|=4)}},Hs=function(t,e,n,r){n!==r&&(e.effectTag|=4)};var ra="function"==typeof WeakSet?WeakSet:Set;function ia(t,e){var n=e.source,r=e.stack;null===r&&null!==n&&(r=gt(n)),null!==n&&vt(n.type),e=e.value,null!==t&&1===t.tag&&vt(t.type);try{console.error(e)}catch(t){setTimeout((function(){throw t}))}}function oa(t){var e=t.ref;if(null!==e)if("function"==typeof e)try{e(null)}catch(e){Cu(t,e)}else e.current=null}function sa(t,e){switch(e.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17: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:Qi(e.type,n),r),t.__reactInternalSnapshotBeforeUpdate=e}return}throw Error(s(163))}function aa(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 ua(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 la(t,e,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ua(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:Qi(n.type,e.memoizedProps);t.componentDidUpdate(r,e.memoizedState,t.__reactInternalSnapshotBeforeUpdate)}return void(null!==(e=n.updateQueue)&&vo(n,e,t));case 3:if(null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 5:case 1:t=n.child.stateNode}vo(n,e,t)}return;case 5:return t=n.stateNode,void(null===e&&4&n.effectTag&&wn(n.type,n.memoizedProps)&&t.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Fe(n)))))}throw Error(s(163))}function ca(t,e,n){switch("function"==typeof Pu&&Pu(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;Hi(97<n?97:n,(function(){var t=r;do{var n=t.destroy;if(void 0!==n){var i=e;try{n()}catch(t){Cu(i,t)}}t=t.next}while(t!==r)}))}break;case 1:oa(e),"function"==typeof(n=e.stateNode).componentWillUnmount&&function(t,e){try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Cu(t,e)}}(e,n);break;case 5:oa(e);break;case 4:va(t,e,n)}}function ha(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&&ha(e)}function fa(t){return 5===t.tag||3===t.tag||4===t.tag}function pa(t){t:{for(var e=t.return;null!==e;){if(fa(e)){var n=e;break t}e=e.return}throw Error(s(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(s(161))}16&n.effectTag&&(qt(e,""),n.effectTag&=-17);t:e:for(n=t;;){for(;null===n.sibling;){if(null===n.return||fa(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?da(t,n,e):ma(t,n,e)}function da(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?8===n.nodeType?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(8===n.nodeType?(e=n.parentNode).insertBefore(t,n):(e=n).appendChild(t),null!=(n=n._reactRootContainer)||null!==e.onclick||(e.onclick=cn));else if(4!==r&&null!==(t=t.child))for(da(t,e,n),t=t.sibling;null!==t;)da(t,e,n),t=t.sibling}function ma(t,e,n){var r=t.tag,i=5===r||6===r;if(i)t=i?t.stateNode:t.stateNode.instance,e?n.insertBefore(t,e):n.appendChild(t);else if(4!==r&&null!==(t=t.child))for(ma(t,e,n),t=t.sibling;null!==t;)ma(t,e,n),t=t.sibling}function va(t,e,n){for(var r,i,o=e,a=!1;;){if(!a){a=o.return;t:for(;;){if(null===a)throw Error(s(160));switch(r=a.stateNode,a.tag){case 5:i=!1;break t;case 3:case 4:r=r.containerInfo,i=!0;break t}a=a.return}a=!0}if(5===o.tag||6===o.tag){t:for(var u=t,l=o,c=n,h=l;;)if(ca(u,h,c),null!==h.child&&4!==h.tag)h.child.return=h,h=h.child;else{if(h===l)break t;for(;null===h.sibling;){if(null===h.return||h.return===l)break t;h=h.return}h.sibling.return=h.return,h=h.sibling}i?(u=r,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):r.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(ca(t,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;4===(o=o.return).tag&&(a=!1)}o.sibling.return=o.return,o=o.sibling}}function ga(t,e){switch(e.tag){case 0:case 11:case 14:case 15:case 22:return void aa(3,e);case 1:case 12:case 17:return;case 5:var n=e.stateNode;if(null!=n){var r=e.memoizedProps,i=null!==t?t.memoizedProps:r;t=e.type;var o=e.updateQueue;if(e.updateQueue=null,null!==o){for(n[An]=r,"input"===t&&"radio"===r.type&&null!=r.name&&Tt(n,r),an(t,i),e=an(t,r),i=0;i<o.length;i+=2){var a=o[i],u=o[i+1];"style"===a?rn(n,u):"dangerouslySetInnerHTML"===a?zt(n,u):"children"===a?qt(n,u):Y(n,a,u,e)}switch(t){case"input":kt(n,r);break;case"textarea":Mt(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(s(162));return void(e.stateNode.nodeValue=e.memoizedProps);case 3:return void((e=e.stateNode).hydrate&&(e.hydrate=!1,Fe(e.containerInfo)));case 13:if(n=e,null===e.memoizedState?r=!1:(r=!0,n=e.child,Ba=Ui()),null!==n)t:for(t=n;;){if(5===t.tag)o=t.stateNode,r?"function"==typeof(o=o.style).setProperty?o.setProperty("display","none","important"):o.display="none":(o=t.stateNode,i=null!=(i=t.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,o.style.display=nn("display",i));else if(6===t.tag)t.stateNode.nodeValue=r?"":t.memoizedProps;else{if(13===t.tag&&null!==t.memoizedState&&null===t.memoizedState.dehydrated){(o=t.child.sibling).return=t,t=o;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 ya(e);case 19:return void ya(e)}throw Error(s(163))}function ya(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new ra),e.forEach((function(e){var r=Eu.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}var ba="function"==typeof WeakMap?WeakMap:Map;function _a(t,e,n){(n=ho(n,null)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){$a||($a=!0,Wa=r),ia(t,e)},n}function wa(t,e,n){(n=ho(n,null)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return ia(t,e),r(i)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Ha?Ha=new Set([this]):Ha.add(this),ia(t,e));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}var xa,Sa=Math.ceil,Ta=X.ReactCurrentDispatcher,ka=X.ReactCurrentOwner,Ca=16,Oa=32,Ea=0,Aa=3,Pa=4,Ia=0,Ma=null,Da=null,Na=0,Ra=Ea,ja=null,Fa=1073741823,Va=1073741823,La=null,za=0,qa=!1,Ba=0,Ua=null,$a=!1,Wa=null,Ha=null,Ka=!1,Ga=null,Za=90,Xa=null,Ya=0,Qa=null,Ja=0;function tu(){return 0!=(48&Ia)?1073741821-(Ui()/10|0):0!==Ja?Ja:Ja=1073741821-(Ui()/10|0)}function eu(t,e,n){if(0==(2&(e=e.mode)))return 1073741823;var r=$i();if(0==(4&e))return 99===r?1073741823:1073741822;if(0!=(Ia&Ca))return Na;if(null!==n)t=Yi(t,0|n.timeoutMs||5e3,250);else switch(r){case 99:t=1073741823;break;case 98:t=Yi(t,150,100);break;case 97:case 96:t=Yi(t,5e3,250);break;case 95:t=2;break;default:throw Error(s(326))}return null!==Ma&&t===Na&&--t,t}function nu(t,e){if(50<Ya)throw Ya=0,Qa=null,Error(s(185));if(null!==(t=ru(t,e))){var n=$i();1073741823===e?0!=(8&Ia)&&0==(48&Ia)?au(t):(ou(t),0===Ia&&Zi()):ou(t),0==(4&Ia)||98!==n&&99!==n||(null===Xa?Xa=new Map([[t,e]]):(void 0===(n=Xa.get(t))||n>e)&&Xa.set(t,e))}}function ru(t,e){t.expirationTime<e&&(t.expirationTime=e);var n=t.alternate;null!==n&&n.expirationTime<e&&(n.expirationTime=e);var r=t.return,i=null;if(null===r&&3===t.tag)i=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){i=r.stateNode;break}r=r.return}return null!==i&&(Ma===i&&(du(e),Ra===Pa&&qu(i,Na)),Bu(i,e)),i}function iu(t){var e=t.lastExpiredTime;if(0!==e)return e;if(!zu(t,e=t.firstPendingTime))return e;var n=t.lastPingedTime;return 2>=(t=n>(t=t.nextKnownPendingLevel)?n:t)&&e!==t?0:t}function ou(t){if(0!==t.lastExpiredTime)t.callbackExpirationTime=1073741823,t.callbackPriority=99,t.callbackNode=Gi(au.bind(null,t));else{var e=iu(t),n=t.callbackNode;if(0===e)null!==n&&(t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90);else{var r=tu();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 i=t.callbackPriority;if(t.callbackExpirationTime===e&&i>=r)return;n!==ji&&Oi(n)}t.callbackExpirationTime=e,t.callbackPriority=r,e=1073741823===e?Gi(au.bind(null,t)):Ki(r,su.bind(null,t),{timeout:10*(1073741821-e)-Ui()}),t.callbackNode=e}}}function su(t,e){if(Ja=0,e)return Uu(t,e=tu()),ou(t),null;var n=iu(t);if(0!==n){if(e=t.callbackNode,0!=(48&Ia))throw Error(s(327));if(Su(),t===Ma&&n===Na||cu(t,n),null!==Da){var r=Ia;Ia|=Ca;for(var i=fu();;)try{vu();break}catch(e){hu(t,e)}if(ro(),Ia=r,Ta.current=i,1===Ra)throw e=ja,cu(t,n),qu(t,n),ou(t),e;if(null===Da)switch(i=t.finishedWork=t.current.alternate,t.finishedExpirationTime=n,r=Ra,Ma=null,r){case Ea:case 1:throw Error(s(345));case 2:Uu(t,2<n?2:n);break;case Aa:if(qu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=bu(i)),1073741823===Fa&&10<(i=Ba+500-Ui())){if(qa){var o=t.lastPingedTime;if(0===o||o>=n){t.lastPingedTime=n,cu(t,n);break}}if(0!==(o=iu(t))&&o!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}t.timeoutHandle=Sn(_u.bind(null,t),i);break}_u(t);break;case Pa:if(qu(t,n),n===(r=t.lastSuspendedTime)&&(t.nextKnownPendingLevel=bu(i)),qa&&(0===(i=t.lastPingedTime)||i>=n)){t.lastPingedTime=n,cu(t,n);break}if(0!==(i=iu(t))&&i!==n)break;if(0!==r&&r!==n){t.lastPingedTime=r;break}if(1073741823!==Va?r=10*(1073741821-Va)-Ui():1073741823===Fa?r=0:(r=10*(1073741821-Fa)-5e3,0>(r=(i=Ui())-r)&&(r=0),(n=10*(1073741821-n)-i)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sa(r/1960))-r)&&(r=n)),10<r){t.timeoutHandle=Sn(_u.bind(null,t),r);break}_u(t);break;case 5:if(1073741823!==Fa&&null!==La){o=Fa;var a=La;if(0>=(r=0|a.busyMinDurationMs)?r=0:(i=0|a.busyDelayMs,r=(o=Ui()-(10*(1073741821-o)-(0|a.timeoutMs||5e3)))<=i?0:i+r-o),10<r){qu(t,n),t.timeoutHandle=Sn(_u.bind(null,t),r);break}}_u(t);break;default:throw Error(s(329))}if(ou(t),t.callbackNode===e)return su.bind(null,t)}}return null}function au(t){var e=t.lastExpiredTime;if(e=0!==e?e:1073741823,0!=(48&Ia))throw Error(s(327));if(Su(),t===Ma&&e===Na||cu(t,e),null!==Da){var n=Ia;Ia|=Ca;for(var r=fu();;)try{mu();break}catch(e){hu(t,e)}if(ro(),Ia=n,Ta.current=r,1===Ra)throw n=ja,cu(t,e),qu(t,e),ou(t),n;if(null!==Da)throw Error(s(261));t.finishedWork=t.current.alternate,t.finishedExpirationTime=e,Ma=null,_u(t),ou(t)}return null}function uu(t,e){var n=Ia;Ia|=1;try{return t(e)}finally{0===(Ia=n)&&Zi()}}function lu(t,e){var n=Ia;Ia&=-2,Ia|=8;try{return t(e)}finally{0===(Ia=n)&&Zi()}}function cu(t,e){t.finishedWork=null,t.finishedExpirationTime=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,Tn(n)),null!==Da)for(n=Da.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&_i();break;case 3:Fo(),fi(vi),fi(mi);break;case 5:Lo(r);break;case 4:Fo();break;case 13:case 19:fi(zo);break;case 10:io(r)}n=n.return}Ma=t,Da=Nu(t.current,null),Na=e,Ra=Ea,ja=null,Va=Fa=1073741823,La=null,za=0,qa=!1}function hu(t,e){for(;;){try{if(ro(),Uo.current=_s,Zo)for(var n=Ho.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Wo=0,Go=Ko=Ho=null,Zo=!1,null===Da||null===Da.return)return Ra=1,ja=e,Da=null;t:{var i=t,o=Da.return,s=Da,a=e;if(e=Na,s.effectTag|=2048,s.firstEffect=s.lastEffect=null,null!==a&&"object"==typeof a&&"function"==typeof a.then){var u=a;if(0==(2&s.mode)){var l=s.alternate;l?(s.updateQueue=l.updateQueue,s.memoizedState=l.memoizedState,s.expirationTime=l.expirationTime):(s.updateQueue=null,s.memoizedState=null)}var c=0!=(1&zo.current),h=o;do{var f;if(f=13===h.tag){var p=h.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var d=h.memoizedProps;f=void 0!==d.fallback&&(!0!==d.unstable_avoidThisFallback||!c)}}if(f){var m=h.updateQueue;if(null===m){var v=new Set;v.add(u),h.updateQueue=v}else m.add(u);if(0==(2&h.mode)){if(h.effectTag|=64,s.effectTag&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=ho(1073741823,null);g.tag=2,fo(s,g)}s.expirationTime=1073741823;break t}a=void 0,s=e;var y=i.pingCache;if(null===y?(y=i.pingCache=new ba,a=new Set,y.set(u,a)):void 0===(a=y.get(u))&&(a=new Set,y.set(u,a)),!a.has(s)){a.add(s);var b=Ou.bind(null,i,u,s);u.then(b,b)}h.effectTag|=4096,h.expirationTime=e;break t}h=h.return}while(null!==h);a=Error((vt(s.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."+gt(s))}5!==Ra&&(Ra=2),a=na(a,s),h=o;do{switch(h.tag){case 3:u=a,h.effectTag|=4096,h.expirationTime=e,po(h,_a(h,u,e));break t;case 1:u=a;var _=h.type,w=h.stateNode;if(0==(64&h.effectTag)&&("function"==typeof _.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===Ha||!Ha.has(w)))){h.effectTag|=4096,h.expirationTime=e,po(h,wa(h,u,e));break t}}h=h.return}while(null!==h)}Da=yu(Da)}catch(t){e=t;continue}break}}function fu(){var t=Ta.current;return Ta.current=_s,null===t?_s:t}function pu(t,e){t<Fa&&2<t&&(Fa=t),null!==e&&t<Va&&2<t&&(Va=t,La=e)}function du(t){t>za&&(za=t)}function mu(){for(;null!==Da;)Da=gu(Da)}function vu(){for(;null!==Da&&!Fi();)Da=gu(Da)}function gu(t){var e=xa(t.alternate,t,Na);return t.memoizedProps=t.pendingProps,null===e&&(e=yu(t)),ka.current=null,e}function yu(t){Da=t;do{var e=Da.alternate;if(t=Da.return,0==(2048&Da.effectTag)){if(e=ta(e,Da,Na),1===Na||1!==Da.childExpirationTime){for(var n=0,r=Da.child;null!==r;){var i=r.expirationTime,o=r.childExpirationTime;i>n&&(n=i),o>n&&(n=o),r=r.sibling}Da.childExpirationTime=n}if(null!==e)return e;null!==t&&0==(2048&t.effectTag)&&(null===t.firstEffect&&(t.firstEffect=Da.firstEffect),null!==Da.lastEffect&&(null!==t.lastEffect&&(t.lastEffect.nextEffect=Da.firstEffect),t.lastEffect=Da.lastEffect),1<Da.effectTag&&(null!==t.lastEffect?t.lastEffect.nextEffect=Da:t.firstEffect=Da,t.lastEffect=Da))}else{if(null!==(e=ea(Da)))return e.effectTag&=2047,e;null!==t&&(t.firstEffect=t.lastEffect=null,t.effectTag|=2048)}if(null!==(e=Da.sibling))return e;Da=t}while(null!==Da);return Ra===Ea&&(Ra=5),null}function bu(t){var e=t.expirationTime;return e>(t=t.childExpirationTime)?e:t}function _u(t){var e=$i();return Hi(99,wu.bind(null,t,e)),null}function wu(t,e){do{Su()}while(null!==Ga);if(0!=(48&Ia))throw Error(s(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(s(177));t.callbackNode=null,t.callbackExpirationTime=0,t.callbackPriority=90,t.nextKnownPendingLevel=0;var i=bu(n);if(t.firstPendingTime=i,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===Ma&&(Da=Ma=null,Na=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var o=Ia;Ia|=Oa,ka.current=null,bn=Ke;var a=mn();if(vn(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else t:{var l=(u=(u=a.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(l&&0!==l.rangeCount){u=l.anchorNode;var c=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{u.nodeType,h.nodeType}catch(t){u=null;break t}var f=0,p=-1,d=-1,m=0,v=0,g=a,y=null;e:for(;;){for(var b;g!==u||0!==c&&3!==g.nodeType||(p=f+c),g!==h||0!==l&&3!==g.nodeType||(d=f+l),3===g.nodeType&&(f+=g.nodeValue.length),null!==(b=g.firstChild);)y=g,g=b;for(;;){if(g===a)break e;if(y===u&&++m===c&&(p=f),y===h&&++v===l&&(d=f),null!==(b=g.nextSibling))break;y=(g=y).parentNode}g=b}u=-1===p||-1===d?null:{start:p,end:d}}else u=null}u=u||{start:0,end:0}}else u=null;_n={activeElementDetached:null,focusedElem:a,selectionRange:u},Ke=!1,Ua=i;do{try{xu()}catch(t){if(null===Ua)throw Error(s(330));Cu(Ua,t),Ua=Ua.nextEffect}}while(null!==Ua);Ua=i;do{try{for(a=t,u=e;null!==Ua;){var _=Ua.effectTag;if(16&_&&qt(Ua.stateNode,""),128&_){var w=Ua.alternate;if(null!==w){var x=w.ref;null!==x&&("function"==typeof x?x(null):x.current=null)}}switch(1038&_){case 2:pa(Ua),Ua.effectTag&=-3;break;case 6:pa(Ua),Ua.effectTag&=-3,ga(Ua.alternate,Ua);break;case 1024:Ua.effectTag&=-1025;break;case 1028:Ua.effectTag&=-1025,ga(Ua.alternate,Ua);break;case 4:ga(Ua.alternate,Ua);break;case 8:va(a,c=Ua,u),ha(c)}Ua=Ua.nextEffect}}catch(t){if(null===Ua)throw Error(s(330));Cu(Ua,t),Ua=Ua.nextEffect}}while(null!==Ua);if(x=_n,w=mn(),_=x.focusedElem,u=x.selectionRange,w!==_&&_&&_.ownerDocument&&dn(_.ownerDocument.documentElement,_)){null!==u&&vn(_)&&(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(),c=_.textContent.length,a=Math.min(u.start,c),u=void 0===u.end?a:Math.min(u.end,c),!x.extend&&a>u&&(c=u,u=a,a=c),c=pn(_,a),h=pn(_,u),c&&h&&(1!==x.rangeCount||x.anchorNode!==c.node||x.anchorOffset!==c.offset||x.focusNode!==h.node||x.focusOffset!==h.offset)&&((w=w.createRange()).setStart(c.node,c.offset),x.removeAllRanges(),a>u?(x.addRange(w),x.extend(h.node,h.offset)):(w.setEnd(h.node,h.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}Ke=!!bn,_n=bn=null,t.current=n,Ua=i;do{try{for(_=t;null!==Ua;){var S=Ua.effectTag;if(36&S&&la(_,Ua.alternate,Ua),128&S){w=void 0;var T=Ua.ref;if(null!==T){var k=Ua.stateNode;Ua.tag,w=k,"function"==typeof T?T(w):T.current=w}}Ua=Ua.nextEffect}}catch(t){if(null===Ua)throw Error(s(330));Cu(Ua,t),Ua=Ua.nextEffect}}while(null!==Ua);Ua=null,Vi(),Ia=o}else t.current=n;if(Ka)Ka=!1,Ga=t,Za=e;else for(Ua=i;null!==Ua;)e=Ua.nextEffect,Ua.nextEffect=null,Ua=e;if(0===(e=t.firstPendingTime)&&(Ha=null),1073741823===e?t===Qa?Ya++:(Ya=0,Qa=t):Ya=0,"function"==typeof Au&&Au(n.stateNode,r),ou(t),$a)throw $a=!1,t=Wa,Wa=null,t;return 0!=(8&Ia)||Zi(),null}function xu(){for(;null!==Ua;){var t=Ua.effectTag;0!=(256&t)&&sa(Ua.alternate,Ua),0==(512&t)||Ka||(Ka=!0,Ki(97,(function(){return Su(),null}))),Ua=Ua.nextEffect}}function Su(){if(90!==Za){var t=97<Za?97:Za;return Za=90,Hi(t,Tu)}}function Tu(){if(null===Ga)return!1;var t=Ga;if(Ga=null,0!=(48&Ia))throw Error(s(331));var e=Ia;for(Ia|=Oa,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:aa(5,n),ua(5,n)}}catch(e){if(null===t)throw Error(s(330));Cu(t,e)}n=t.nextEffect,t.nextEffect=null,t=n}return Ia=e,Zi(),!0}function ku(t,e,n){fo(t,e=_a(t,e=na(n,e),1073741823)),null!==(t=ru(t,1073741823))&&ou(t)}function Cu(t,e){if(3===t.tag)ku(t,t,e);else for(var n=t.return;null!==n;){if(3===n.tag){ku(n,t,e);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ha||!Ha.has(r))){fo(n,t=wa(n,t=na(e,t),1073741823)),null!==(n=ru(n,1073741823))&&ou(n);break}}n=n.return}}function Ou(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),Ma===t&&Na===n?Ra===Pa||Ra===Aa&&1073741823===Fa&&Ui()-Ba<500?cu(t,Na):qa=!0:zu(t,n)&&(0!==(e=t.lastPingedTime)&&e<n||(t.lastPingedTime=n,ou(t)))}function Eu(t,e){var n=t.stateNode;null!==n&&n.delete(e),0===(e=0)&&(e=eu(e=tu(),t,null)),null!==(t=ru(t,e))&&ou(t)}xa=function(t,e,n){var r=e.expirationTime;if(null!==t){var i=e.pendingProps;if(t.memoizedProps!==i||vi.current)Ns=!0;else{if(r<n){switch(Ns=!1,e.tag){case 3:Us(e),Ms();break;case 5:if(Vo(e),4&e.mode&&1!==n&&i.hidden)return e.expirationTime=e.childExpirationTime=1,null;break;case 1:bi(e.type)&&Si(e);break;case 4:jo(e,e.stateNode.containerInfo);break;case 10:r=e.memoizedProps.value,i=e.type._context,pi(Ji,i._currentValue),i._currentValue=r;break;case 13:if(null!==e.memoizedState)return 0!==(r=e.child.childExpirationTime)&&r>=n?Gs(t,e,n):(pi(zo,1&zo.current),null!==(e=Qs(t,e,n))?e.sibling:null);pi(zo,1&zo.current);break;case 19:if(r=e.childExpirationTime>=n,0!=(64&t.effectTag)){if(r)return Ys(t,e,n);e.effectTag|=64}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null),pi(zo,zo.current),!r)return null}return Qs(t,e,n)}Ns=!1}}else Ns=!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,i=yi(e,mi.current),so(e,n),i=Qo(null,e,r,t,i,n),e.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(e.tag=1,e.memoizedState=null,e.updateQueue=null,bi(r)){var o=!0;Si(e)}else o=!1;e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,lo(e);var a=r.getDerivedStateFromProps;"function"==typeof a&&bo(e,r,a,t),i.updater=_o,e.stateNode=i,i._reactInternalFiber=e,To(e,r,t,n),e=Bs(null,e,r,!0,o,n)}else e.tag=0,Rs(null,e,i,n),e=e.child;return e;case 16:t:{if(i=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)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,e.type=i,o=e.tag=function(t){if("function"==typeof t)return Du(t)?1:0;if(null!=t){if((t=t.$$typeof)===ut)return 11;if(t===ht)return 14}return 2}(i),t=Qi(i,t),o){case 0:e=zs(null,e,i,t,n);break t;case 1:e=qs(null,e,i,t,n);break t;case 11:e=js(null,e,i,t,n);break t;case 14:e=Fs(null,e,i,Qi(i.type,t),r,n);break t}throw Error(s(306,i,""))}return e;case 0:return r=e.type,i=e.pendingProps,zs(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 1:return r=e.type,i=e.pendingProps,qs(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 3:if(Us(e),r=e.updateQueue,null===t||null===r)throw Error(s(282));if(r=e.pendingProps,i=null!==(i=e.memoizedState)?i.element:null,co(t,e),mo(e,r,null,n),(r=e.memoizedState.element)===i)Ms(),e=Qs(t,e,n);else{if((i=e.stateNode.hydrate)&&(ks=kn(e.stateNode.containerInfo.firstChild),Ts=e,i=Cs=!0),i)for(n=Po(e,null,r,n),e.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Rs(t,e,r,n),Ms();e=e.child}return e;case 5:return Vo(e),null===t&&As(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,a=i.children,xn(r,i)?a=null:null!==o&&xn(r,o)&&(e.effectTag|=16),Ls(t,e),4&e.mode&&1!==n&&i.hidden?(e.expirationTime=e.childExpirationTime=1,e=null):(Rs(t,e,a,n),e=e.child),e;case 6:return null===t&&As(e),null;case 13:return Gs(t,e,n);case 4:return jo(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Ao(e,null,r,n):Rs(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,js(t,e,r,i=e.elementType===r?i:Qi(r,i),n);case 7:return Rs(t,e,e.pendingProps,n),e.child;case 8:case 12:return Rs(t,e,e.pendingProps.children,n),e.child;case 10:t:{r=e.type._context,i=e.pendingProps,a=e.memoizedProps,o=i.value;var u=e.type._context;if(pi(Ji,u._currentValue),u._currentValue=o,null!==a)if(u=a.value,0===(o=qr(u,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,o):1073741823))){if(a.children===i.children&&!vi.current){e=Qs(t,e,n);break t}}else for(null!==(u=e.child)&&(u.return=e);null!==u;){var l=u.dependencies;if(null!==l){a=u.child;for(var c=l.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&o)){1===u.tag&&((c=ho(n,null)).tag=2,fo(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),oo(u.return,n),l.expirationTime<n&&(l.expirationTime=n);break}c=c.next}}else a=10===u.tag&&u.type===e.type?null:u.child;if(null!==a)a.return=u;else for(a=u;null!==a;){if(a===e){a=null;break}if(null!==(u=a.sibling)){u.return=a.return,a=u;break}a=a.return}u=a}Rs(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=(o=e.pendingProps).children,so(e,n),r=r(i=ao(i,o.unstable_observedBits)),e.effectTag|=1,Rs(t,e,r,n),e.child;case 14:return o=Qi(i=e.type,e.pendingProps),Fs(t,e,i,o=Qi(i.type,o),r,n);case 15:return Vs(t,e,e.type,e.pendingProps,r,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Qi(r,i),null!==t&&(t.alternate=null,e.alternate=null,e.effectTag|=2),e.tag=1,bi(r)?(t=!0,Si(e)):t=!1,so(e,n),xo(e,r,i),To(e,r,i,n),Bs(null,e,r,!0,t,n);case 19:return Ys(t,e,n)}throw Error(s(156,e.tag))};var Au=null,Pu=null;function Iu(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 Mu(t,e,n,r){return new Iu(t,e,n,r)}function Du(t){return!(!(t=t.prototype)||!t.isReactComponent)}function Nu(t,e){var n=t.alternate;return null===n?((n=Mu(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 Ru(t,e,n,r,i,o){var a=2;if(r=t,"function"==typeof t)Du(t)&&(a=1);else if("string"==typeof t)a=5;else t:switch(t){case nt:return ju(n.children,i,o,e);case at:a=8,i|=7;break;case rt:a=8,i|=1;break;case it:return(t=Mu(12,n,e,8|i)).elementType=it,t.type=it,t.expirationTime=o,t;case lt:return(t=Mu(13,n,e,i)).type=lt,t.elementType=lt,t.expirationTime=o,t;case ct:return(t=Mu(19,n,e,i)).elementType=ct,t.expirationTime=o,t;default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case ot:a=10;break t;case st:a=9;break t;case ut:a=11;break t;case ht:a=14;break t;case ft:a=16,r=null;break t;case pt:a=22;break t}throw Error(s(130,null==t?t:typeof t,""))}return(e=Mu(a,n,e,i)).elementType=t,e.type=r,e.expirationTime=o,e}function ju(t,e,n,r){return(t=Mu(7,t,r,e)).expirationTime=n,t}function Fu(t,e,n){return(t=Mu(6,t,null,e)).expirationTime=n,t}function Vu(t,e,n){return(e=Mu(4,null!==t.children?t.children:[],t.key,e)).expirationTime=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Lu(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 zu(t,e){var n=t.firstSuspendedTime;return t=t.lastSuspendedTime,0!==n&&n>=e&&t<=e}function qu(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 Bu(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 Uu(t,e){var n=t.lastExpiredTime;(0===n||n>e)&&(t.lastExpiredTime=e)}function $u(t,e,n,r){var i=e.current,o=tu(),a=go.suspense;o=eu(o,i,a);t:if(n){e:{if(te(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(s(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(bi(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(null!==u);throw Error(s(171))}if(1===n.tag){var l=n.type;if(bi(l)){n=xi(n,l,u);break t}}n=u}else n=di;return null===e.context?e.context=n:e.pendingContext=n,(e=ho(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),fo(i,e),nu(i,o),o}function Wu(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function Hu(t,e){null!==(t=t.memoizedState)&&null!==t.dehydrated&&t.retryTime<e&&(t.retryTime=e)}function Ku(t,e){Hu(t,e),(t=t.alternate)&&Hu(t,e)}function Gu(t,e,n){var r=new Lu(t,e,n=null!=n&&!0===n.hydrate),i=Mu(3,null,null,2===e?7:1===e?3:0);r.current=i,i.stateNode=r,lo(i),t[Pn]=r.current,n&&0!==e&&function(t,e){var n=Jt(e);Oe.forEach((function(t){me(t,e,n)})),Ee.forEach((function(t){me(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 Xu(t,e,n,r,i){var o=n._reactRootContainer;if(o){var s=o._internalRoot;if("function"==typeof i){var a=i;i=function(){var t=Wu(s);a.call(t)}}$u(e,s,t,i)}else{if(o=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 Gu(t,0,e?{hydrate:!0}:void 0)}(n,r),s=o._internalRoot,"function"==typeof i){var u=i;i=function(){var t=Wu(s);u.call(t)}}lu((function(){$u(e,s,t,i)}))}return Wu(s)}function Yu(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:et,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}function Qu(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zu(e))throw Error(s(200));return Yu(t,e,null,n)}Gu.prototype.render=function(t){$u(t,this._internalRoot,null,null)},Gu.prototype.unmount=function(){var t=this._internalRoot,e=t.containerInfo;$u(null,t,null,(function(){e[Pn]=null}))},ve=function(t){if(13===t.tag){var e=Yi(tu(),150,100);nu(t,e),Ku(t,e)}},ge=function(t){13===t.tag&&(nu(t,3),Ku(t,3))},ye=function(t){if(13===t.tag){var e=tu();nu(t,e=eu(e,t,null)),Ku(t,e)}},E=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 i=Nn(r);if(!i)throw Error(s(90));wt(r),kt(r,i)}}}break;case"textarea":Mt(t,n);break;case"select":null!=(e=n.value)&&At(t,!!n.multiple,e,!1)}},N=uu,R=function(t,e,n,r,i){var o=Ia;Ia|=4;try{return Hi(98,t.bind(null,e,n,r,i))}finally{0===(Ia=o)&&Zi()}},j=function(){0==(49&Ia)&&(function(){if(null!==Xa){var t=Xa;Xa=null,t.forEach((function(t,e){Uu(e,t),ou(e)})),Zi()}}(),Su())},F=function(t,e){var n=Ia;Ia|=2;try{return t(e)}finally{0===(Ia=n)&&Zi()}};var Ju={Events:[Mn,Dn,Nn,C,S,qn,function(t){oe(t,zn)},M,D,Qe,ue,Su,{current:!1}]};!function(t){var e=t.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);Au=function(t){try{e.onCommitFiberRoot(n,t,void 0,64==(64&t.current.effectTag))}catch(t){}},Pu=function(t){try{e.onCommitFiberUnmount(n,t)}catch(t){}}}catch(t){}})(i({},t,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=re(t))?null:t.stateNode},findFiberByHostInstance:function(t){return e?e(t):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:In,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),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(s(188));throw Error(s(268,Object.keys(t)))}return t=null===(t=re(e))?null:t.stateNode},e.render=function(t,e,n){if(!Zu(e))throw Error(s(200));return Xu(null,t,e,!1,n)},e.unstable_batchedUpdates=uu},3935:(t,e,n)=>{"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(4448)},7804:(t,e,n)=>{"use strict";n.d(e,{vj:()=>M});var r=n(7294);let i,o="key",s=o,a=!1,u=!1,l=!1;const c=t=>{a=!0,o="touch",window.clearTimeout(i),i=window.setTimeout((()=>{a=!1}),t)};let h;const f=()=>{u=!0,o="mouse",window.clearTimeout(h),h=window.setTimeout((()=>{u=!1}),200)},p=t=>()=>c(t),d=t=>e=>{switch(e.pointerType){case"mouse":f();break;case"pen":case"touch":c(t)}},m=()=>{a||f()},v=()=>{o="key"};let g;const y=t=>{t.target!==window&&t.target!==document||(l=!0,window.clearTimeout(g),g=window.setTimeout((()=>{l=!1}),300))},b={capture:!0,passive:!0},_=[["touchstart",p(750)],["touchend",p(300)],["touchcancel",p(300)],["pointerenter",d(300)],["pointerover",d(300)],["pointerout",d(300)],["pointerleave",d(300)],["pointerdown",d(750)],["pointerup",d(300)],["pointercancel",d(300)],["mouseenter",m],["mouseover",m],["mouseout",m],["mouseleave",m],["mousedown",m],["mouseup",m],["keydown",v],["keyup",v],["focus",()=>{(!l||u||a)&&(s=o)}]];"undefined"!=typeof window&&"undefined"!=typeof document&&(_.forEach((([t,e])=>{document.addEventListener(t,e,b)})),window.addEventListener("focus",y,b));const w=t=>{switch(t.pointerType){case"mouse":f();break;case"pen":case"touch":a?o="touch":c(300)}return/mouse/.test(t.type)&&!a&&f(),/touch/.test(t.type)&&(a?o="touch":c(300)),/focus/.test(t.type)?s:o},x=({tagName:t,type:e})=>"SELECT"!==t&&("INPUT"!==t||"checkbox"!==e&&"radio"!==e),S=({tagName:t,type:e})=>["BUTTON","SELECT"].includes(t)||"INPUT"===t&&["checkbox","radio","submit"].includes(e),T=({tagName:t})=>["BUTTON","INPUT","SELECT","TEXTAREA","FIELDSET"].includes(t),k=t=>"string"==typeof t||"object"==typeof t&&null!==t||"number"==typeof t||"bigint"==typeof t?String(t):"";let C=!1;const O=()=>{C=!0,window.setTimeout((()=>{C&&(document.body.style.userSelect="",document.body.style.webkitUserSelect="")}),250)},E={hover:!1,active:!1,focus:!1},A={mouseover:"onMouseOver",mouseleave:"onMouseLeave",mousedown:"onMouseDown",mouseup:"onMouseUp",pointerover:"onPointerOver",pointerleave:"onPointerLeave",pointerdown:"onPointerDown",pointerup:"onPointerUp",pointercancel:"onPointerCancel",touchstart:"onTouchStart",touchend:"onTouchEnd",touchcancel:"onTouchCancel",keydown:"onKeyDown",keyup:"onKeyUp",focus:"onFocus",blur:"onBlur",dragstart:"onDragStart",dragend:"onDragEnd"},P=Object.values(A),I=r.forwardRef((function({as:t,children:e,onStateChange:n,disabled:i=!1,useExtendedTouchActive:o=!1,hoverClassName:s="hover",activeClassName:a="active",mouseActiveClassName:u="mouseActive",touchActiveClassName:l="touchActive",keyActiveClassName:c="keyActive",focusClassName:h="focus",focusFromKeyClassName:f="focusFromKey",focusFromMouseClassName:p="focusFromMouse",focusFromTouchClassName:d="focusFromTouch",disabledClassName:m="disabled",hoverStyle:v,activeStyle:g,mouseActiveStyle:y,touchActiveStyle:b,keyActiveStyle:_,focusStyle:I,focusFromKeyStyle:M,focusFromMouseStyle:D,focusFromTouchStyle:N,disabledStyle:R,...j},F){const V=t||"button",[L,z]=r.useState({state:E,prevState:E}),q="touchActive"===L.state.active;r.useEffect((()=>{n&&n(L)}),[L.state.hover,L.state.active,L.state.focus]);const B=r.useRef(!1);B.current=i&&"string"!=typeof V;const[,U]=r.useState(!1),$=r.useRef(null),W=r.useCallback((t=>{$.current=t,"function"==typeof F?F(t):F&&(F.current=t),B.current&&U((t=>!t))}),[F]),H=r.useRef({enterKeyDown:!1,spaceKeyDown:!1}),K=r.useRef({isDragging:!1}),G=r.useCallback(((...t)=>{z((e=>{const n={...e.state};t.forEach((({iStateKey:t,state:r,action:i})=>{"enter"===i?n[t]=r:"exit"!==i||e.state[t]!==r||K.current.isDragging&&"active"===t||(n[t]=!1)}));const r={state:n,prevState:e.state};return(({state:t,prevState:e})=>t.hover!==e.hover||t.active!==e.active||t.focus!==e.focus)(r)?r:e}))}),[]),Z=r.useCallback((()=>{H.current.enterKeyDown=!1,H.current.spaceKeyDown=!1,G({iStateKey:"focus",state:!1,action:"enter"},{iStateKey:"active",state:"keyActive",action:"exit"})}),[G]);r.useEffect((()=>{i&&L.state.focus&&(T($.current||{})||"string"==typeof V)&&($.current&&"function"==typeof $.current.blur&&$.current.blur(),Z())}),[i,L.state.focus,Z,V]);const X=r.useCallback((t=>{switch(t.type){case"focus":t.target===$.current&&G({iStateKey:"focus",state:`focusFrom${w(t).replace(/^\w/,(t=>t.toUpperCase()))}`,action:"enter"});break;case"blur":Z();break;case"keydown":case"keyup":if(" "===t.key)H.current.spaceKeyDown="keydown"===t.type;else{if("Enter"!==t.key)break;H.current.enterKeyDown="keydown"===t.type}G({iStateKey:"active",state:"keyActive",action:H.current.enterKeyDown&&x($.current||{})||H.current.spaceKeyDown&&S($.current||{})?"enter":"exit"});break;case"dragstart":K.current.isDragging=!0,G({iStateKey:"active",state:`${w(t)}Active`,action:"enter"});break;case"dragend":K.current.isDragging=!1,G({iStateKey:"active",state:!1,action:"enter"});break;default:switch(w(t)){case"mouse":switch(t.type){case"mouseover":case"pointerover":G({iStateKey:"hover",state:!0,action:"enter"});break;case"mouseleave":case"pointerleave":case"pointercancel":G({iStateKey:"hover",state:!1,action:"enter"},{iStateKey:"active",state:"mouseActive",action:"exit"});break;case"mousedown":case"pointerdown":G({iStateKey:"active",state:"mouseActive",action:"enter"});break;case"mouseup":case"pointerup":G({iStateKey:"active",state:"mouseActive",action:"exit"})}break;case"touch":switch(t.type){case"touchstart":case"pointerdown":G({iStateKey:"active",state:"touchActive",action:"enter"});break;case"touchend":case"touchcancel":case"pointerup":case"pointercancel":case"mouseover":o&&!["touchend","touchcancel"].includes(t.type)||G({iStateKey:"active",state:"touchActive",action:"exit"});break;case"mouseleave":G({iStateKey:"hover",state:!1,action:"enter"},{iStateKey:"active",state:"mouseActive",action:"exit"})}}}j[A[t.type]]&&j[A[t.type]](t)}),[...P.map((t=>j[t])),o,G,Z]),Y={};P.forEach((t=>{Y[t]=X}));const Q=r.useRef(void 0);r.useEffect((()=>{if(q&&!o)return Q.current=window.setTimeout((()=>{G({iStateKey:"active",state:"touchActive",action:"exit"})}),750),()=>window.clearTimeout(Q.current)}),[q,o,G]),r.useEffect((()=>{if(q&&o)return C=!1,document.body.style.userSelect="none",document.body.style.webkitUserSelect="none",O}),[q,o]);let J=k(j.className);const tt={};!i&&(({tagName:t,type:e},n)=>["BUTTON","A","AREA","SELECT"].includes(t)||"INPUT"===t&&["checkbox","radio","submit"].includes(e)||"INPUT"!==t&&"TEXTAREA"!==t&&n)($.current||{},Boolean(j.onClick||j.onClickCapture))&&(tt.cursor="pointer"),Object.assign(tt,j.style);const et=(t,e)=>{J=[J,k(t)].filter((t=>t)).join(" "),Object.assign(tt,e)};if(i)et(m,R);else{if(L.state.hover&&et(s,v),L.state.active)switch(et(a,g),L.state.active){case"mouseActive":et(u,y);break;case"touchActive":et(l,b);break;case"keyActive":et(c,_)}if(L.state.focus)switch(et(h,I),L.state.focus){case"focusFromMouse":et(p,D);break;case"focusFromTouch":et(d,N);break;case"focusFromKey":et(f,M)}}const nt=r.useMemo((()=>tt),[Object.entries(tt).join()]);let rt=null;return i&&(rt={onClick:void 0,onClickCapture:void 0,onDoubleClick:void 0,onDoubleClickCapture:void 0,tabIndex:void 0,href:void 0},T("string"==typeof V?{tagName:V.toUpperCase()}:$.current||{})&&(rt.disabled=!0)),r.createElement(V,Object.assign({},j,Y,rt,{className:""===J?void 0:J,style:nt,ref:W}),"function"==typeof e?e(L.state):e)})),M=Object.assign(r.memo(I),{Button:r.memo(I),A:D("a"),Input:D("input"),Select:D("select"),Div:D("div"),Span:D("span")});function D(t){return r.forwardRef((function(e,n){return r.createElement(M,Object.assign({},e,{as:t,ref:n}))}))}},9921:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118;function b(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case c:case h:case o:case a:case s:case p:return t;default:switch(t=t&&t.$$typeof){case l:case f:case u:return t;default:return e}}case v:case m:case i:return e}}}function _(t){return b(t)===h}e.typeOf=b,e.AsyncMode=c,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=u,e.Element=r,e.ForwardRef=f,e.Fragment=o,e.Lazy=v,e.Memo=m,e.Portal=i,e.Profiler=a,e.StrictMode=s,e.Suspense=p,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===a||t===s||t===p||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===m||t.$$typeof===u||t.$$typeof===l||t.$$typeof===f||t.$$typeof===g||t.$$typeof===y)},e.isAsyncMode=function(t){return _(t)||b(t)===c},e.isConcurrentMode=_,e.isContextConsumer=function(t){return b(t)===l},e.isContextProvider=function(t){return b(t)===u},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return b(t)===f},e.isFragment=function(t){return b(t)===o},e.isLazy=function(t){return b(t)===v},e.isMemo=function(t){return b(t)===m},e.isPortal=function(t){return b(t)===i},e.isProfiler=function(t){return b(t)===a},e.isStrictMode=function(t){return b(t)===s},e.isSuspense=function(t){return b(t)===p}},9864:(t,e,n)=>{"use strict";t.exports=n(9921)},8949:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m});var r=n(7294),i=n(3935);function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a(t,e,n){return t===e||(t.correspondingElement?t.correspondingElement.classList.contains(n):t.classList.contains(n))}var u,l,c=(void 0===u&&(u=0),function(){return++u}),h={},f={},p=["touchstart","touchmove"];function d(t,e){var n=null;return-1!==p.indexOf(e)&&l&&(n={passive:!t.props.preventDefault}),n}const m=function(t,e){var n,u,p=t.displayName||t.name||"Component";return u=n=function(n){var u,m;function v(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: "+p+" 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():(0,i.findDOMNode)(t)},r.enableOnClickOutside=function(){if("undefined"!=typeof document&&!f[r._uid]){void 0===l&&(l=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}}()),f[r._uid]=!0;var t=r.props.eventTypes;t.forEach||(t=[t]),h[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||t.host;){if(t.parentNode&&a(t,e,n))return!0;t=t.parentNode||t.host}return t}(t.composed&&t.composedPath&&t.composedPath().shift()||t.target,r.componentNode,r.props.outsideClickIgnoreClass)===document&&r.__outsideClickHandler(t))},t.forEach((function(t){document.addEventListener(t,h[r._uid],d(s(r),t))}))}},r.disableOnClickOutside=function(){delete f[r._uid];var t=h[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,d(s(r),e))})),delete h[r._uid]}},r.getRef=function(t){return r.instanceRef=t},r._uid=c(),r}m=n,(u=v).prototype=Object.create(m.prototype),u.prototype.constructor=u,o(u,m);var g=v.prototype;return g.getInstance=function(){if(t.prototype&&!t.prototype.isReactComponent)return this;var e=this.instanceRef;return e.getInstance?e.getInstance():e},g.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: "+p+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},g.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},g.componentWillUnmount=function(){this.disableOnClickOutside()},g.render=function(){var e=this.props;e.excludeScrollbar;var n=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(e,["excludeScrollbar"]);return t.prototype&&t.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,(0,r.createElement)(t,n)},v}(r.Component),n.displayName="OnClickOutside("+p+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:e&&e.excludeScrollbar||!1,outsideClickIgnoreClass:"ignore-react-onclickoutside",preventDefault:!1,stopPropagation:!1},n.getClass=function(){return t.getClass?t.getClass():t},u}},5934:t=>{"use strict";t.exports=function(t){var e=0;function n(t,r){if(!t.fn||"function"!=typeof t.fn)return r;if(!(t.regex&&t.regex instanceof RegExp))return r;if("string"==typeof r){for(var i=t.regex,o=null,s=[];null!==(o=i.exec(r));){var a=o.index,u=o[0];s.push(r.substring(0,a)),s.push(t.fn(++e,o)),r=r.substring(a+u.length,r.length+1),i.lastIndex=0}return s.push(r),s}return Array.isArray(r)?r.map((function(e){return n(t,e)})):r}return function(e){return t&&Array.isArray(t)&&t.length?(t.forEach((function(t){return e=n(t,e)})),e):e}}},3727:(t,e,n)=>{"use strict";n.d(e,{VK:()=>c,rU:()=>v});var r=n(5977),i=n(1721),o=n(7294),s=n(71),a=(n(5697),n(7462)),u=n(3366),l=n(2177),c=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).history=(0,s.lX)(e.props),e}return(0,i.Z)(e,t),e.prototype.render=function(){return o.createElement(r.F0,{history:this.history,children:this.props.children})},e}(o.Component);o.Component;var h=function(t,e){return"function"==typeof t?t(e):t},f=function(t,e){return"string"==typeof t?(0,s.ob)(t,null,null,e):t},p=function(t){return t},d=o.forwardRef;void 0===d&&(d=p);var m=d((function(t,e){var n=t.innerRef,r=t.navigate,i=t.onClick,s=(0,u.Z)(t,["innerRef","navigate","onClick"]),l=s.target,c=(0,a.Z)({},s,{onClick:function(t){try{i&&i(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||l&&"_self"!==l||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return c.ref=p!==d&&e||n,o.createElement("a",c)}));var v=d((function(t,e){var n=t.component,i=void 0===n?m:n,c=t.replace,v=t.to,g=t.innerRef,y=(0,u.Z)(t,["component","replace","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(t){t||(0,l.Z)(!1);var n=t.history,r=f(h(v,t.location),t.location),u=r?n.createHref(r):"",m=(0,a.Z)({},y,{href:u,navigate:function(){var e=h(v,t.location),r=(0,s.Ep)(t.location)===(0,s.Ep)(f(e));(c||r?n.replace:n.push)(e)}});return p!==d?m.ref=e||g:m.innerRef=g,o.createElement(i,m)}))})),g=function(t){return t},y=o.forwardRef;void 0===y&&(y=g);y((function(t,e){var n=t["aria-current"],i=void 0===n?"page":n,s=t.activeClassName,c=void 0===s?"active":s,p=t.activeStyle,d=t.className,m=t.exact,b=t.isActive,_=t.location,w=t.sensitive,x=t.strict,S=t.style,T=t.to,k=t.innerRef,C=(0,u.Z)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return o.createElement(r.s6.Consumer,null,(function(t){t||(0,l.Z)(!1);var n=_||t.location,s=f(h(T,n),n),u=s.pathname,O=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),E=O?(0,r.LX)(n.pathname,{path:O,exact:m,sensitive:w,strict:x}):null,A=!!(b?b(E,n):E),P="function"==typeof d?d(A):d,I="function"==typeof S?S(A):S;A&&(P=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(" ")}(P,c),I=(0,a.Z)({},I,p));var M=(0,a.Z)({"aria-current":A&&i||null,className:P,style:I,to:s},C);return g!==y?M.ref=e||k:M.innerRef=k,o.createElement(v,M)}))}))},5977:(t,e,n)=>{"use strict";n.d(e,{l_:()=>C,AW:()=>P,F0:()=>w,rs:()=>j,s6:()=>_,LX:()=>A});var r=n(1721),i=n(7294),o=n(5697),s=n.n(o),a=n(71),u=1073741823,l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function c(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 h=i.createContext||function(t,e){var n,o,a="__create-react-context-"+function(){var t="__global_unique_id__";return l[t]=(l[t]||0)+1}()+"__",h=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=c(e.props.value),e}(0,r.Z)(n,t);var i=n.prototype;return i.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},i.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(s=i)?0!==o||1/o==1/s:o!=o&&s!=s)?n=0:(n="function"==typeof e?e(r,i):u,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,s},i.render=function(){return this.props.children},n}(i.Component);h.childContextTypes=((n={})[a]=s().object.isRequired,n);var f=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}(0,r.Z)(n,e);var i=n.prototype;return i.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?u:e},i.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?u:t},i.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},i.getValue=function(){return this.context[a]?this.context[a].get():t},i.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(i.Component);return f.contextTypes=((o={})[a]=s().object,o),{Provider:h,Consumer:f}};const f=h;var p=n(2177),d=n(7462),m=n(4779),v=n.n(m),g=(n(9864),n(3366)),y=(n(8679),function(t){var e=f();return e.displayName=t,e}),b=y("Router-History"),_=y("Router"),w=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}(0,r.Z)(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(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return i.createElement(_.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.createElement(b.Provider,{children:this.props.children||null,value:this.props.history}))},e}(i.Component);i.Component;var x=function(t){function e(){return t.apply(this,arguments)||this}(0,r.Z)(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.Component);var S={},T=0;function k(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(S[t])return S[t];var e=v().compile(t);return T<1e4&&(S[t]=e,T++),e}(t)(e,{pretty:!0})}function C(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return i.createElement(_.Consumer,null,(function(t){t||(0,p.Z)(!1);var r=t.history,s=t.staticContext,u=o?r.push:r.replace,l=(0,a.ob)(e?"string"==typeof n?k(n,e.params):(0,d.Z)({},n,{pathname:k(n.pathname,e.params)}):n);return s?(u(l),null):i.createElement(x,{onMount:function(){u(l)},onUpdate:function(t,e){var n=(0,a.ob)(e.to);(0,a.Hp)(n,(0,d.Z)({},l,{key:n.key}))||u(l)},to:n})}))}var O={},E=0;function A(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,i=n.exact,o=void 0!==i&&i,s=n.strict,a=void 0!==s&&s,u=n.sensitive,l=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=O[n]||(O[n]={});if(r[t])return r[t];var i=[],o={regexp:v()(t,i,e),keys:i};return E<1e4&&(r[t]=o,E++),o}(n,{end:o,strict:a,sensitive:l}),i=r.regexp,s=r.keys,u=i.exec(t);if(!u)return null;var c=u[0],h=u.slice(1),f=t===c;return o&&!f?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:f,params:s.reduce((function(t,e,n){return t[e.name]=h[n],t}),{})}}),null)}var P=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.Z)(e,t),e.prototype.render=function(){var t=this;return i.createElement(_.Consumer,null,(function(e){e||(0,p.Z)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?A(n.pathname,t.props):e.match,o=(0,d.Z)({},e,{location:n,match:r}),s=t.props,a=s.children,u=s.component,l=s.render;return Array.isArray(a)&&function(t){return 0===i.Children.count(t)}(a)&&(a=null),i.createElement(_.Provider,{value:o},o.match?a?"function"==typeof a?a(o):a:u?i.createElement(u,o):l?l(o):null:"function"==typeof a?a(o):null)}))},e}(i.Component);function I(t){return"/"===t.charAt(0)?t:"/"+t}function M(t,e){if(!t)return e;var n=I(t);return 0!==e.pathname.indexOf(n)?e:(0,d.Z)({},e,{pathname:e.pathname.substr(n.length)})}function D(t){return"string"==typeof t?t:(0,a.Ep)(t)}function N(t){return function(){(0,p.Z)(!1)}}function R(){}i.Component;var j=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.Z)(e,t),e.prototype.render=function(){var t=this;return i.createElement(_.Consumer,null,(function(e){e||(0,p.Z)(!1);var n,r,o=t.props.location||e.location;return i.Children.forEach(t.props.children,(function(t){if(null==r&&i.isValidElement(t)){n=t;var s=t.props.path||t.props.from;r=s?A(o.pathname,(0,d.Z)({},t.props,{path:s})):e.match}})),r?i.cloneElement(n,{location:o,computedMatch:r}):null}))},e}(i.Component);i.useContext},2408:(t,e,n)=>{"use strict";var r=n(7418),i="function"==typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,s=i?Symbol.for("react.portal"):60106,a=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,f=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,d=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,v="function"==typeof Symbol&&Symbol.iterator;function g(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 y={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||y}function w(){}function x(t,e,n){this.props=t,this.context=e,this.refs=b,this.updater=n||y}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(g(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},w.prototype=_.prototype;var S=x.prototype=new w;S.constructor=x,r(S,_.prototype),S.isPureReactComponent=!0;var T={current:null},k=Object.prototype.hasOwnProperty,C={key:!0,ref:!0,__self:!0,__source:!0};function O(t,e,n){var r,i={},s=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(s=""+e.key),e)k.call(e,r)&&!C.hasOwnProperty(r)&&(i[r]=e[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in u=t.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:t,key:s,ref:a,props:i,_owner:T.current}}function E(t){return"object"==typeof t&&null!==t&&t.$$typeof===o}var A=/\/+/g,P=[];function I(t,e,n,r){if(P.length){var i=P.pop();return i.result=t,i.keyPrefix=e,i.func=n,i.context=r,i.count=0,i}return{result:t,keyPrefix:e,func:n,context:r,count:0}}function M(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>P.length&&P.push(t)}function D(t,e,n,r){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case o:case s:a=!0}}if(a)return n(r,t,""===e?"."+R(t,0):e),1;if(a=0,e=""===e?".":e+":",Array.isArray(t))for(var u=0;u<t.length;u++){var l=e+R(i=t[u],u);a+=D(i,l,n,r)}else if(null===t||"object"!=typeof t?l=null:l="function"==typeof(l=v&&t[v]||t["@@iterator"])?l:null,"function"==typeof l)for(t=l.call(t),u=0;!(i=t.next()).done;)a+=D(i=i.value,l=e+R(i,u++),n,r);else if("object"===i)throw n=""+t,Error(g(31,"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,""));return a}function N(t,e,n){return null==t?0:D(t,"",e,n)}function R(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 j(t,e){t.func.call(t.context,e,t.count++)}function F(t,e,n){var r=t.result,i=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?V(t,r,n,(function(t){return t})):null!=t&&(E(t)&&(t=function(t,e){return{$$typeof:o,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,i+(!t.key||e&&e.key===t.key?"":(""+t.key).replace(A,"$&/")+"/")+n)),r.push(t))}function V(t,e,n,r,i){var o="";null!=n&&(o=(""+n).replace(A,"$&/")+"/"),N(t,F,e=I(e,o,r,i)),M(e)}var L={current:null};function z(){var t=L.current;if(null===t)throw Error(g(321));return t}var q={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:T,IsSomeRendererActing:{current:!1},assign:r};e.Children={map:function(t,e,n){if(null==t)return t;var r=[];return V(t,r,null,e,n),r},forEach:function(t,e,n){if(null==t)return t;N(t,j,e=I(null,null,e,n)),M(e)},count:function(t){return N(t,(function(){return null}),null)},toArray:function(t){var e=[];return V(t,e,null,(function(t){return t})),e},only:function(t){if(!E(t))throw Error(g(143));return t}},e.Component=_,e.Fragment=a,e.Profiler=l,e.PureComponent=x,e.StrictMode=u,e.Suspense=p,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,e.cloneElement=function(t,e,n){if(null==t)throw Error(g(267,t));var i=r({},t.props),s=t.key,a=t.ref,u=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,u=T.current),void 0!==e.key&&(s=""+e.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in e)k.call(e,c)&&!C.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==l?l[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var h=0;h<c;h++)l[h]=arguments[h+2];i.children=l}return{$$typeof:o,type:t.type,key:s,ref:a,props:i,_owner:u}},e.createContext=function(t,e){return void 0===e&&(e=null),(t={$$typeof:h,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:t},t.Consumer=t},e.createElement=O,e.createFactory=function(t){var e=O.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:f,render:t}},e.isValidElement=E,e.lazy=function(t){return{$$typeof:m,_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 z().useCallback(t,e)},e.useContext=function(t,e){return z().useContext(t,e)},e.useDebugValue=function(){},e.useEffect=function(t,e){return z().useEffect(t,e)},e.useImperativeHandle=function(t,e,n){return z().useImperativeHandle(t,e,n)},e.useLayoutEffect=function(t,e){return z().useLayoutEffect(t,e)},e.useMemo=function(t,e){return z().useMemo(t,e)},e.useReducer=function(t,e,n){return z().useReducer(t,e,n)},e.useRef=function(t){return z().useRef(t)},e.useState=function(t){return z().useState(t)},e.version="16.14.0"},7294:(t,e,n)=>{"use strict";t.exports=n(2408)},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),s=new E(r||[]);return o._invoke=function(t,e,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===m)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(t,e,n);if("normal"===u.type){if(r=n.done?d:f,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h="suspendedStart",f="suspendedYield",p="executing",d="completed",m={};function v(){}function g(){}function y(){}var b={};b[o]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(A([])));w&&w!==n&&r.call(w,o)&&(b=w);var x=y.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,o,s,a){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,a)}))}a(u.arg)}var i;this._invoke=function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}}function k(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return s.next=s}}return{next:P}}function P(){return{value:e,done:!0}}return g.prototype=x.constructor=y,y.constructor=g,g.displayName=u(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,a,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(T.prototype),T.prototype[s]=function(){return this},t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new T(l(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},S(x),u(x,a,"Generator"),x[o]=function(){return this},x.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=A,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function i(r,i){return a.type="throw",a.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var u=r.call(s,"catchLoc"),l=r.call(s,"finallyLoc");if(u&&l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},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),m},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),O(n),m}},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 i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},53:(t,e)=>{"use strict";var n,r,i,o,s;if("undefined"==typeof window||"function"!=typeof MessageChannel){var a=null,u=null,l=function(){if(null!==a)try{var t=e.unstable_now();a(!0,t),a=null}catch(t){throw setTimeout(l,0),t}},c=Date.now();e.unstable_now=function(){return Date.now()-c},n=function(t){null!==a?setTimeout(n,0,t):(a=t,setTimeout(l,0))},r=function(t,e){u=setTimeout(t,e)},i=function(){clearTimeout(u)},o=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,f=window.Date,p=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var m=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 m&&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 h&&"function"==typeof h.now)e.unstable_now=function(){return h.now()};else{var v=f.now();e.unstable_now=function(){return f.now()-v}}var g=!1,y=null,b=-1,_=5,w=0;o=function(){return e.unstable_now()>=w},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"):_=0<t?Math.floor(1e3/t):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==y){var t=e.unstable_now();w=t+_;try{y(!0,t)?S.postMessage(null):(g=!1,y=null)}catch(t){throw S.postMessage(null),t}}else g=!1},n=function(t){y=t,g||(g=!0,S.postMessage(null))},r=function(t,n){b=p((function(){t(e.unstable_now())}),n)},i=function(){d(b),b=-1}}function T(t,e){var n=t.length;t.push(e);t:for(;;){var r=n-1>>>1,i=t[r];if(!(void 0!==i&&0<O(i,e)))break t;t[r]=e,t[n]=i,n=r}}function k(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,i=t.length;r<i;){var o=2*(r+1)-1,s=t[o],a=o+1,u=t[a];if(void 0!==s&&0>O(s,n))void 0!==u&&0>O(u,s)?(t[r]=u,t[a]=n,r=a):(t[r]=s,t[o]=n,r=o);else{if(!(void 0!==u&&0>O(u,n)))break t;t[r]=u,t[a]=n,r=a}}}return e}return null}function O(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var E=[],A=[],P=1,I=null,M=3,D=!1,N=!1,R=!1;function j(t){for(var e=k(A);null!==e;){if(null===e.callback)C(A);else{if(!(e.startTime<=t))break;C(A),e.sortIndex=e.expirationTime,T(E,e)}e=k(A)}}function F(t){if(R=!1,j(t),!N)if(null!==k(E))N=!0,n(V);else{var e=k(A);null!==e&&r(F,e.startTime-t)}}function V(t,n){N=!1,R&&(R=!1,i()),D=!0;var s=M;try{for(j(n),I=k(E);null!==I&&(!(I.expirationTime>n)||t&&!o());){var a=I.callback;if(null!==a){I.callback=null,M=I.priorityLevel;var u=a(I.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?I.callback=u:I===k(E)&&C(E),j(n)}else C(E);I=k(E)}if(null!==I)var l=!0;else{var c=k(A);null!==c&&r(F,c.startTime-n),l=!1}return l}finally{I=null,M=s,D=!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(){N||D||(N=!0,n(V))},e.unstable_getCurrentPriorityLevel=function(){return M},e.unstable_getFirstCallbackNode=function(){return k(E)},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,o,s){var a=e.unstable_now();if("object"==typeof s&&null!==s){var u=s.delay;u="number"==typeof u&&0<u?a+u:a,s="number"==typeof s.timeout?s.timeout:L(t)}else s=L(t),u=a;return t={id:P++,callback:o,priorityLevel:t,startTime:u,expirationTime:s=u+s,sortIndex:-1},u>a?(t.sortIndex=u,T(A,t),null===k(E)&&t===k(A)&&(R?i():R=!0,r(F,u-a))):(t.sortIndex=s,T(E,t),N||D||(N=!0,n(V))),t},e.unstable_shouldYield=function(){var t=e.unstable_now();j(t);var n=k(E);return n!==I&&null!==I&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<I.expirationTime||o()},e.unstable_wrapCallback=function(t){var e=M;return function(){var n=M;M=e;try{return t.apply(this,arguments)}finally{M=n}}}},3840:(t,e,n)=>{"use strict";t.exports=n(53)},2177:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r="Invariant failed";const i=function(t,e){if(!t)throw new Error(r)}},8563:(t,e,n)=>{"use strict";n.d(e,{Lz:()=>Uo,WV:()=>jo,qp:()=>Ni,J7:()=>Zo});const r="14.7.77";var i=n(5382);const o=new WeakSet,s=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,d=new WeakMap,m={construct:()=>m},v=/^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]*);?/,g=(t,e)=>{const n=[];let r=t.replace(/^[\s]+/,""),i=r.match(v);for(;null!==i;){const t=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(t,new URL(t,e).toString());n.push(o),r=r.slice(i[0].length).replace(/^[\s]+/,""),i=r.match(v)}return[n.join(";"),r]},y=t=>{if(void 0!==t&&!Array.isArray(t))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},b=t=>{if(!(t=>{try{new new Proxy(t,m)}catch{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.")},_=(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},w=(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},x=(t,e,n,r)=>{const i=_(t,e),o=w(i,(t=>t[0]===n&&t[1]===r));return 0===i.size&&t.delete(e),o},S=t=>_(h,t),T=t=>{if(o.has(t))throw new Error("The AudioNode is already stored.");o.add(t),S(t).forEach((t=>t(!0)))},k=t=>"port"in t,C=t=>{if(!o.has(t))throw new Error("The AudioNode is not stored.");o.delete(t),S(t).forEach((t=>t(!1)))},O=(t,e)=>{!k(t)&&e.every((t=>0===t.size))&&C(t)},E={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},A=(t,e)=>t.context===e,P=t=>{try{t.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},I=()=>new DOMException("","IndexSizeError"),M=t=>{var e;t.getChannelData=(e=t.getChannelData,n=>{try{return e.call(t,n)}catch(t){if(12===t.code)throw I();throw t}})},D={numberOfChannels:1},N=-34028234663852886e22,R=-N,j=t=>o.has(t),F={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},V=t=>_(s,t),L=t=>_(u,t),z=(t,e)=>{const{activeInputs:n}=V(t);n.forEach((n=>n.forEach((([n])=>{e.includes(t)||z(n,[...e,t])}))));const r=(t=>"playbackRate"in t)(t)?[t.playbackRate]:k(t)?Array.from(t.parameters.values()):(t=>"frequency"in t&&"gain"in t)(t)?[t.Q,t.detune,t.frequency,t.gain]:(t=>"offset"in t)(t)?[t.offset]:(t=>!("frequency"in t)&&"gain"in t)(t)?[t.gain]:(t=>"detune"in t&&"frequency"in t)(t)?[t.detune,t.frequency]:(t=>"pan"in t)(t)?[t.pan]:[];for(const t of r){const n=L(t);void 0!==n&&n.activeInputs.forEach((([t])=>z(t,e)))}j(t)&&C(t)},q=t=>{z(t.destination,[])},B=t=>void 0===t||"number"==typeof t||"string"==typeof t&&("balanced"===t||"interactive"===t||"playback"===t),U=t=>"context"in t,$=t=>U(t[0]),W=(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},H=(t,e,[n,r],i)=>{W(t,[e,n,r],(t=>t[0]===e&&t[1]===n),i)},K=(t,[e,n,r],i)=>{const o=t.get(e);void 0===o?t.set(e,new Set([[n,r]])):W(o,[n,r],(t=>t[0]===n),i)},G=t=>"inputs"in t,Z=(t,e,n,r)=>{if(G(e)){const i=e.inputs[r];return t.connect(i,n,0),[i,n,0]}return t.connect(e,n,r),[e,n,r]},X=(t,e,n)=>{for(const r of t)if(r[0]===e&&r[1]===n)return t.delete(r),r;return null},Y=(t,e)=>{if(!S(t).delete(e))throw new Error("Missing the expected event listener.")},Q=(t,e,n)=>{const r=_(t,e),i=w(r,(t=>t[0]===n));return 0===r.size&&t.delete(e),i},J=(t,e,n,r)=>{G(e)?t.disconnect(e.inputs[r],n,0):t.disconnect(e,n,r)},tt=t=>_(a,t),et=t=>_(l,t),nt=t=>f.has(t),rt=t=>!o.has(t),it=t=>new Promise((e=>{const n=t.createScriptProcessor(256,1,1),r=t.createGain(),i=t.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const s=t.createBufferSource();s.buffer=i,s.loop=!0,s.connect(n).connect(t.destination),s.connect(r),s.disconnect(r),n.onaudioprocess=r=>{const i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,(t=>1===t))?e(!0):e(!1),s.stop(),n.onaudioprocess=null,s.disconnect(n),n.disconnect(t.destination)},s.start()})),ot=(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)))},st=t=>"context"in t,at=t=>{const e=new Map;t.connect=(t=>(n,r=0,i=0)=>{const o=st(n)?t(n,r,i):t(n,r),s=e.get(n);return void 0===s?e.set(n,[{input:i,output:r}]):s.every((t=>t.input!==i||t.output!==r))&&s.push({input:i,output:r}),o})(t.connect.bind(t)),t.disconnect=(n=>(r,i,o)=>{if(n.apply(t),void 0===r)e.clear();else if("number"==typeof r)for(const[t,n]of e){const i=n.filter((t=>t.output!==r));0===i.length?e.delete(t):e.set(t,i)}else if(e.has(r))if(void 0===i)e.delete(r);else{const t=e.get(r);if(void 0!==t){const n=t.filter((t=>t.output!==i&&(t.input!==o||void 0===o)));0===n.length?e.delete(r):e.set(r,n)}}for(const[n,r]of e)r.forEach((e=>{st(n)?t.connect(n,e.output,e.input):t.connect(n,e.output)}))})(t.disconnect)},ut=(t,e,n,r)=>{const{activeInputs:i,passiveInputs:o}=L(e),{outputs:s}=V(t),a=S(t),u=s=>{const a=tt(t),u=et(e);if(s){const e=Q(o,t,n);H(i,t,e,!1),r||nt(t)||a.connect(u,n)}else{const e=((t,e,n)=>w(t,(t=>t[0]===e&&t[1]===n)))(i,t,n);K(o,e,!1),r||nt(t)||a.disconnect(u,n)}};return!!W(s,[e,n],(t=>t[0]===e&&t[1]===n),!0)&&(a.add(u),j(t)?H(i,t,[n,u],!0):K(o,[t,n,u],!0),!0)},lt=(t,e,n,r,i)=>{const[o,s]=((t,e,n,r)=>{const{activeInputs:i,passiveInputs:o}=V(e),s=X(i[r],t,n);if(null===s)return[x(o,t,n,r)[2],!1];return[s[2],!0]})(t,n,r,i);if(null!==o&&(Y(t,o),!s||e||nt(t)||J(tt(t),tt(n),r,i)),j(n)){const{activeInputs:t}=V(n);O(n,t)}},ct=(t,e,n,r)=>{const[i,o]=((t,e,n)=>{const{activeInputs:r,passiveInputs:i}=L(e),o=X(r,t,n);if(null===o)return[Q(i,t,n)[1],!1];return[o[2],!0]})(t,n,r);null!==i&&(Y(t,i),!o||e||nt(t)||tt(t).disconnect(et(n),r))};class ht{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()}}const ft={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function pt(t,e,n,r,i){if("function"==typeof t.copyFromChannel)0===e[n].byteLength&&(e[n]=new Float32Array(128)),t.copyFromChannel(e[n],r,i);else{const o=t.getChannelData(r);if(0===e[n].byteLength)e[n]=o.slice(i,i+128);else{const t=new Float32Array(o.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);e[n].set(t)}}}const dt=(t,e,n,r,i)=>{"function"==typeof t.copyToChannel?0!==e[n].byteLength&&t.copyToChannel(e[n],r,i):0!==e[n].byteLength&&t.getChannelData(r).set(e[n],i)},mt=(t,e)=>{const n=[];for(let r=0;r<t;r+=1){const t=[],i="number"==typeof e?e:e[r];for(let e=0;e<i;e+=1)t.push(new Float32Array(128));n.push(t)}return n},vt=async(t,e,n,r,i,o,s)=>{const a=null===e?128*Math.ceil(t.context.length/128):e.length,u=r.channelCount*r.numberOfInputs,l=i.reduce(((t,e)=>t+e),0),c=0===l?null:n.createBuffer(l,a,n.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const h=V(t),f=await((t,e)=>{const n=_(d,t),r=tt(e);return _(n,r)})(n,t),p=mt(r.numberOfInputs,r.channelCount),m=mt(r.numberOfOutputs,i),v=Array.from(t.parameters.keys()).reduce(((t,e)=>({...t,[e]:new Float32Array(128)})),{});for(let l=0;l<a;l+=128){if(r.numberOfInputs>0&&null!==e)for(let t=0;t<r.numberOfInputs;t+=1)for(let n=0;n<r.channelCount;n+=1)pt(e,p[t],n,n,l);void 0!==o.parameterDescriptors&&null!==e&&o.parameterDescriptors.forEach((({name:t},n)=>{pt(e,v,t,u+n,l)}));for(let t=0;t<r.numberOfInputs;t+=1)for(let e=0;e<i[t];e+=1)0===m[t][e].byteLength&&(m[t][e]=new Float32Array(128));try{const t=p.map(((t,e)=>0===h.activeInputs[e].size?[]:t)),e=s(l/n.sampleRate,n.sampleRate,(()=>f.process(t,m,v)));if(null!==c)for(let t=0,e=0;t<r.numberOfOutputs;t+=1){for(let n=0;n<i[t];n+=1)dt(c,m[t],n,e+n,l);e+=i[t]}if(!e)break}catch(e){t.dispatchEvent(new ErrorEvent("processorerror",{colno:e.colno,filename:e.filename,lineno:e.lineno,message:e.message}));break}}return c},gt={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},yt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},bt={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},_t={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},wt={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},xt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},St=(t,e,n)=>{const r=e[n];if(void 0===r)throw t();return r},Tt={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},kt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},Ct=()=>new DOMException("","InvalidStateError"),Ot=()=>new DOMException("","InvalidAccessError"),Et={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},At=(t,e,n,r,i,o,s,a,u,l,c)=>{const h=l.length;let f=a;for(let a=0;a<h;a+=1){let h=n[0]*l[a];for(let e=1;e<i;e+=1){const r=f-e&u-1;h+=n[e]*o[r],h-=t[e]*s[r]}for(let t=i;t<r;t+=1)h+=n[t]*o[f-t&u-1];for(let n=i;n<e;n+=1)h-=t[n]*s[f-n&u-1];o[f]=l[a],s[f]=h,f=f+1&u-1,c[a]=h}return f},Pt={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},It=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{}return!1},Mt={numberOfChannels:1},Dt=(t,e,n)=>{const r=e[n];void 0!==r&&r!==t[n]&&(t[n]=r)},Nt=(t,e)=>{Dt(t,e,"channelCount"),Dt(t,e,"channelCountMode"),Dt(t,e,"channelInterpretation")},Rt=t=>"function"==typeof t.getFloatTimeDomainData,jt=(t,e,n)=>{const r=e[n];void 0!==r&&r!==t[n].value&&(t[n].value=r)},Ft=t=>{t.start=(e=>(n=0,r=0,i)=>{if("number"==typeof i&&i<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");e.call(t,n,r,i)})(t.start)},Vt=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)})},Lt=(t,e)=>null===t?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(t*e))))),zt=async(t,e)=>{const n=await(t=>new Promise(((e,n)=>{const{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:t})=>{r.close(),i.close(),e(t)},r.onmessageerror=({data:t})=>{r.close(),i.close(),n(t)},i.postMessage(t)})))(e);return new t(n)},qt=(t,e)=>{const n=t.createBiquadFilter();return Nt(n,e),jt(n,e,"Q"),jt(n,e,"detune"),jt(n,e,"frequency"),jt(n,e,"gain"),Dt(n,e,"type"),n},Bt=(t,e)=>{const n=t.createChannelSplitter(e.numberOfOutputs);return Nt(n,e),(t=>{const e=t.numberOfOutputs;Object.defineProperty(t,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw Ct()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:t=>{if("explicit"!==t)throw Ct()}}),Object.defineProperty(t,"channelInterpretation",{get:()=>"discrete",set:t=>{if("discrete"!==t)throw Ct()}})})(n),n},Ut=(t,e)=>(t.connect=e.connect.bind(e),t.disconnect=e.disconnect.bind(e),t),$t=(t,e)=>{const n=t.createDelay(e.maxDelayTime);return Nt(n,e),jt(n,e,"delayTime"),n},Wt=(t,e)=>{const n=t.createGain();return Nt(n,e),jt(n,e,"gain"),n};function Ht(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 Kt(t,e){let n=[0,0];for(let o=t.length-1;o>=0;o-=1)i=e,n=[(r=n)[0]*i[0]-r[1]*i[1],r[0]*i[1]+r[1]*i[0]],n[0]+=t[o];var r,i;return n}const Gt=(t,e,n,r)=>t.createScriptProcessor(e,n,r),Zt=()=>new DOMException("","NotSupportedError"),Xt={numberOfChannels:1},Yt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},Qt={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},Jt={disableNormalization:!1},te={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},ee=()=>new DOMException("","UnknownError"),ne={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},re=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},ie=(t,e,n,r)=>{let i=Object.getPrototypeOf(t);for(;!i.hasOwnProperty(e);)i=Object.getPrototypeOf(i);const{get:o,set:s}=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,{get:n(o),set:r(s)})},oe=(t,e,n)=>{try{t.setValueAtTime(e,n)}catch(r){if(9!==r.code)throw r;oe(t,e,n+1e-7)}},se=t=>{const e=t.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},ae=t=>{const e=t.createBuffer(1,1,44100),n=t.createBufferSource();n.buffer=e,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},ue=t=>{const e=t.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},le=(t,e)=>{const n=e.createGain();t.connect(n);const r=(e=>()=>{e.call(t,n),t.removeEventListener("ended",r)})(t.disconnect);t.addEventListener("ended",r),Ut(t,n),t.stop=(e=>{let r=!1;return(i=0)=>{if(r)try{e.call(t,i)}catch{n.gain.setValueAtTime(0,i)}else e.call(t,i),r=!0}})(t.stop)},ce=(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)},he=(t=>(e,n,[r,i,o],s)=>{t(e[i],[n,r,o],(t=>t[0]===n&&t[1]===r),s)})(W),fe=(t=>(e,n,[r,i,o],s)=>{const a=e.get(r);void 0===a?e.set(r,new Set([[i,n,o]])):t(a,[i,n,o],(t=>t[0]===i&&t[1]===n),s)})(W),pe=(t=>(e,n,r,i)=>t(e[i],(t=>t[0]===n&&t[1]===r)))(w),de=new WeakMap,me=(t=>e=>{var n;return null!==(n=t.get(e))&&void 0!==n?n:0})(de),ve=(ge=new Map,ye=new WeakMap,(t,e)=>{const n=ye.get(t);if(void 0!==n)return n;const r=ge.get(t);if(void 0!==r)return r;try{const n=e();return n instanceof Promise?(ge.set(t,n),n.catch((()=>!1)).then((e=>(ge.delete(t),ye.set(t,e),e)))):(ye.set(t,n),n)}catch{return ye.set(t,!1),!1}});var ge,ye;const be="undefined"==typeof window?null:window,_e=((t,e)=>(n,r)=>{const i=n.createAnalyser();if(Nt(i,r),!(r.maxDecibels>r.minDecibels))throw e();return Dt(i,r,"fftSize"),Dt(i,r,"maxDecibels"),Dt(i,r,"minDecibels"),Dt(i,r,"smoothingTimeConstant"),t(Rt,(()=>Rt(i)))||(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}})(i),i})(ve,I),we=(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})(V),xe=((t,e,n)=>async(r,i,o,s)=>{const a=t(r),u=[...s,r];await Promise.all(a.activeInputs.map(((t,s)=>Array.from(t).filter((([t])=>!u.includes(t))).map((async([t,a])=>{const l=e(t),c=await l.render(t,i,u),h=r.context.destination;n(t)||r===h&&n(r)||c.connect(o,a,s)})))).reduce(((t,e)=>[...t,...e]),[]))})(V,we,nt),Se=((t,e,n)=>()=>{const r=new WeakMap;return{render(i,o,s){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o,s)=>{let a=e(i);if(!A(a,o)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=t(o,e)}return r.set(o,a),await n(i,o,a,s),a})(i,o,s)}}})(_e,tt,xe),Te=(ke=c,t=>{const e=ke.get(t);if(void 0===e)throw Ct();return e});var ke;const Ce=(t=>null===t?null:t.hasOwnProperty("OfflineAudioContext")?t.OfflineAudioContext:t.hasOwnProperty("webkitOfflineAudioContext")?t.webkitOfflineAudioContext:null)(be),Oe=(t=>e=>null!==t&&e instanceof t)(Ce),Ee=new WeakMap,Ae=(t=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(e,n,r){if(null!==n){let i=this._listeners.get(n);void 0===i&&(i=t(this,n),"function"==typeof n&&this._listeners.set(n,i)),this._nativeEventTarget.addEventListener(e,i,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)}})(ce),Pe=(t=>null===t?null:t.hasOwnProperty("AudioContext")?t.AudioContext:t.hasOwnProperty("webkitAudioContext")?t.webkitAudioContext:null)(be),Ie=(t=>e=>null!==t&&e instanceof t)(Pe),Me=(t=>e=>null!==t&&"function"==typeof t.AudioNode&&e instanceof t.AudioNode)(be),De=(t=>e=>null!==t&&"function"==typeof t.AudioParam&&e instanceof t.AudioParam)(be),Ne=((t,e,n,r,i,o,s,u,l,c,f,p,d,m,v)=>class extends c{constructor(e,r,i,o){super(i),this._context=e,this._nativeAudioNode=i;const s=f(e);p(s)&&!0!==n(it,(()=>it(s)))&&at(i),a.set(this,i),h.set(this,new Set),"closed"!==e.state&&r&&T(this),t(this,o,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,a=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();const u=f(this._context),c=v(u);if(d(t)||m(t))throw o();if(U(t)){const i=tt(t);try{const e=Z(this._nativeAudioNode,i,n,a),r=rt(this);(c||r)&&this._nativeAudioNode.disconnect(...e),"closed"!==this.context.state&&!r&&rt(t)&&T(t)}catch(t){if(12===t.code)throw o();throw t}if(e(this,t,n,a,c)){const e=l([this],t);ot(e,r(c))}return t}const h=et(t);if("playbackRate"===h.name&&1024===h.maxValue)throw s();try{this._nativeAudioNode.connect(h,n),(c||rt(this))&&this._nativeAudioNode.disconnect(h,n)}catch(t){if(12===t.code)throw o();throw t}if(ut(this,t,n,c)){const e=l([this],t);ot(e,r(c))}}disconnect(t,e,n){let r;const s=f(this._context),a=v(s);if(void 0===t)r=((t,e)=>{const n=V(t),r=[];for(const i of n.outputs)$(i)?lt(t,e,...i):ct(t,e,...i),r.push(i[0]);return n.outputs.clear(),r})(this,a);else if("number"==typeof t){if(t<0||t>=this.numberOfOutputs)throw i();r=((t,e,n)=>{const r=V(t),i=[];for(const o of r.outputs)o[1]===n&&($(o)?lt(t,e,...o):ct(t,e,...o),i.push(o[0]),r.outputs.delete(o));return i})(this,a,t)}else{if(void 0!==e&&(e<0||e>=this.numberOfOutputs))throw i();if(U(t)&&void 0!==n&&(n<0||n>=t.numberOfInputs))throw i();if(r=((t,e,n,r,i)=>{const o=V(t);return Array.from(o.outputs).filter((t=>!(t[0]!==n||void 0!==r&&t[1]!==r||void 0!==i&&t[2]!==i))).map((n=>($(n)?lt(t,e,...n):ct(t,e,...n),o.outputs.delete(n),n[0])))})(this,a,t,e,n),0===r.length)throw o()}for(const t of r){const e=l([this],t);ot(e,u)}}})((Re=s,(t,e,n)=>{const r=[];for(let t=0;t<n.numberOfInputs;t+=1)r.push(new Set);Re.set(t,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:e})}),((t,e,n,r,i,o,s,a,u,l,c,h,f)=>{const p=new WeakMap;return(d,m,v,g,y)=>{const{activeInputs:b,passiveInputs:_}=o(m),{outputs:w}=o(d),S=a(d),k=o=>{const a=u(m),l=u(d);if(o){const e=x(_,d,v,g);t(b,d,e,!1),y||h(d)||n(l,a,v,g),f(m)&&T(m)}else{const t=r(b,d,v,g);e(_,g,t,!1),y||h(d)||i(l,a,v,g);const n=s(m);if(0===n)c(m)&&O(m,b);else{const t=p.get(m);void 0!==t&&clearTimeout(t),p.set(m,setTimeout((()=>{c(m)&&O(m,b)}),1e3*n))}}};return!!l(w,[m,v,g],(t=>t[0]===m&&t[1]===v&&t[2]===g),!0)&&(S.add(k),c(d)?t(b,d,[v,g,k],!0):e(_,g,[d,v,k],!0),!0)}})(he,fe,Z,pe,J,V,me,S,tt,W,j,nt,rt),ve,((t,e,n,r,i,o)=>s=>(a,u)=>{const l=t.get(a);if(void 0===l){if(!s&&o(a)){const t=r(a),{outputs:o}=n(a);for(const n of o)if($(n)){const i=r(n[0]);e(t,i,n[1],n[2])}else{const e=i(n[0]);t.disconnect(e,n[1])}}t.set(a,u)}else t.set(a,l+u)})(f,J,V,tt,et,j),I,Ot,Zt,((t,e,n,r,i,o,s,a)=>(u,l)=>{const c=e.get(u);if(void 0===c)throw new Error("Missing the expected cycle count.");const h=o(u.context),f=a(h);if(c===l){if(e.delete(u),!f&&s(u)){const e=r(u),{outputs:o}=n(u);for(const n of o)if($(n)){const i=r(n[0]);t(e,i,n[1],n[2])}else{const t=i(n[0]);e.connect(t,n[1])}}}else e.set(u,c-l)})(Z,f,V,tt,et,Te,j,Oe),((t,e,n)=>function r(i,o){const s=U(o)?o:n(t,o);if((t=>"delayTime"in t)(s))return[];if(i[0]===s)return[i];if(i.includes(s))return[];const{outputs:a}=e(s);return Array.from(a).map((t=>r([...i,s],t[0]))).reduce(((t,e)=>t.concat(e)),[])})(Ee,V,_),Ae,Te,Ie,Me,De,Oe);var Re;const je=((t,e,n,r,i,o)=>class extends t{constructor(t,n){const s=i(t),a={...E,...n},u=r(s,a);super(t,!1,u,o(s)?e():null),this._nativeAnalyserNode=u}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)}})(Ne,Se,I,_e,Te,Oe),Fe=new WeakSet,Ve=(t=>null===t?null:t.hasOwnProperty("AudioBuffer")?t.AudioBuffer:null)(be),Le=(ze=new Uint32Array(1),t=>(ze[0]=t,ze[0]));var ze;const qe=((t,e)=>n=>{n.copyFromChannel=(r,i,o=0)=>{const s=t(o),a=t(i);if(a>=n.numberOfChannels)throw e();const u=n.length,l=n.getChannelData(a),c=r.length;for(let t=s<0?-s:0;t+s<u&&t<c;t+=1)r[t]=l[t+s]},n.copyToChannel=(r,i,o=0)=>{const s=t(o),a=t(i);if(a>=n.numberOfChannels)throw e();const u=n.length,l=n.getChannelData(a),c=r.length;for(let t=s<0?-s:0;t+s<u&&t<c;t+=1)l[t+s]=r[t]}})(Le,I),Be=(t=>e=>{e.copyFromChannel=(n=>(r,i,o=0)=>{const s=t(o),a=t(i);if(s<e.length)return n.call(e,r,a,s)})(e.copyFromChannel),e.copyToChannel=(n=>(r,i,o=0)=>{const s=t(o),a=t(i);if(s<e.length)return n.call(e,r,a,s)})(e.copyToChannel)})(Le),Ue=((t,e,n,r,i,o,s,a)=>{let u=null;return class l{constructor(l){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:c,numberOfChannels:h,sampleRate:f}={...D,...l};null===u&&(u=new i(1,1,44100));const p=null!==r&&e(o,o)?new r({length:c,numberOfChannels:h,sampleRate:f}):u.createBuffer(h,c,f);if(0===p.numberOfChannels)throw n();return"function"!=typeof p.copyFromChannel?(s(p),M(p)):e(P,(()=>P(p)))||a(p),t.add(p),p}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===l.prototype||t.has(e)}}})(Fe,ve,Zt,Ve,Ce,(t=>()=>{if(null===t)return!1;try{new t({length:1,sampleRate:44100})}catch{return!1}return!0})(Ve),qe,Be),$e=(t=>(e,n)=>{const r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});n.connect(r).connect(e.destination);const i=()=>{n.removeEventListener("ended",i),n.disconnect(r),r.disconnect()};n.addEventListener("ended",i)})(Wt),We=((t,e,n)=>async(r,i,o,s)=>{const a=e(r);await Promise.all(Array.from(a.activeInputs).map((async([e,r])=>{const a=t(e),u=await a.render(e,i,s);n(e)||u.connect(o,r)})))})(we,L,nt),He=(t=>(e,n,r,i)=>t(n,e,r,i))(We),Ke=((t,e,n,r,i,o,s,a,u,l,c)=>(h,f)=>{const p=h.createBufferSource();return Nt(p,f),jt(p,f,"playbackRate"),Dt(p,f,"buffer"),Dt(p,f,"loop"),Dt(p,f,"loopEnd"),Dt(p,f,"loopStart"),e(n,(()=>n(h)))||(t=>{t.start=(e=>{let n=!1;return(r=0,i=0,o)=>{if(n)throw Ct();e.call(t,r,i,o),n=!0}})(t.start)})(p),e(r,(()=>r(h)))||u(p),e(i,(()=>i(h)))||l(p,h),e(o,(()=>o(h)))||Ft(p),e(s,(()=>s(h)))||c(p,h),e(a,(()=>a(h)))||Vt(p),t(h,p),p})($e,ve,(t=>{const e=t.createBufferSource();e.start();try{e.start()}catch{return!0}return!1}),(t=>{const e=t.createBufferSource(),n=t.createBuffer(1,1,44100);e.buffer=n;try{e.start(0,1)}catch{return!1}return!0}),(t=>{const e=t.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0}),se,ae,ue,(t=>{t.start=(e=>(n=0,r=0,i)=>{const o=t.buffer,s=null===o?r:Math.min(o.duration,r);null!==o&&s>o.duration-.5/t.context.sampleRate?e.call(t,n,0,0):e.call(t,n,s,i)})(t.start)}),(t=>(e,n)=>{const r=n.createBuffer(1,1,44100);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)))})(ie),le),Ge=((t,e)=>(n,r,i,o)=>(t(r).replay(i),e(r,n,i,o)))((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})(L),We),Ze=((t,e,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(t){s=t},set stop(t){a=t},render(u,l,c){const h=o.get(l);return void 0!==h?Promise.resolve(h):(async(u,l,c)=>{let h=n(u);const f=A(h,l);if(!f){const t={buffer:h.buffer,channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,loop:h.loop,loopEnd:h.loopEnd,loopStart:h.loopStart,playbackRate:h.playbackRate.value};h=e(l,t),null!==s&&h.start(...s),null!==a&&h.stop(a)}return o.set(l,h),f?await t(l,u.playbackRate,h.playbackRate,c):await r(l,u.playbackRate,h.playbackRate,c),await i(u,l,h,c),h})(u,l,c)}}})(He,Ke,tt,Ge,xe),Xe=((t,e,n,r,o,s,a,u,l,c,h,f,p)=>(d,m,v,g=null,y=null)=>{const b=new i.AutomationEventList(v.defaultValue),_=m?r(b):null,w={get defaultValue(){return v.defaultValue},get maxValue(){return null===g?v.maxValue:g},get minValue(){return null===y?v.minValue:y},get value(){return v.value},set value(t){v.value=t,w.setValueAtTime(t,d.context.currentTime)},cancelAndHoldAtTime(t){if("function"==typeof v.cancelAndHoldAtTime)null===_&&b.flush(d.context.currentTime),b.add(o(t)),v.cancelAndHoldAtTime(t);else{const e=Array.from(b).pop();null===_&&b.flush(d.context.currentTime),b.add(o(t));const n=Array.from(b).pop();v.cancelScheduledValues(t),e!==n&&void 0!==n&&("exponentialRampToValue"===n.type?v.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?v.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?v.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&v.setValueCurveAtTime(n.values,n.startTime,n.duration))}return w},cancelScheduledValues:t=>(null===_&&b.flush(d.context.currentTime),b.add(s(t)),v.cancelScheduledValues(t),w),exponentialRampToValueAtTime(t,e){if(0===t)throw new RangeError;if(!Number.isFinite(e)||e<0)throw new RangeError;return null===_&&b.flush(d.context.currentTime),b.add(a(t,e)),v.exponentialRampToValueAtTime(t,e),w},linearRampToValueAtTime:(t,e)=>(null===_&&b.flush(d.context.currentTime),b.add(u(t,e)),v.linearRampToValueAtTime(t,e),w),setTargetAtTime:(t,e,n)=>(null===_&&b.flush(d.context.currentTime),b.add(l(t,e,n)),v.setTargetAtTime(t,e,n),w),setValueAtTime:(t,e)=>(null===_&&b.flush(d.context.currentTime),b.add(c(t,e)),v.setValueAtTime(t,e),w),setValueCurveAtTime(t,e,n){const r=t instanceof Float32Array?t:new Float32Array(t);if(null!==f&&"webkitAudioContext"===f.name){const t=e+n,i=d.context.sampleRate,o=Math.ceil(e*i),s=Math.floor(t*i),a=s-o,u=new Float32Array(a);for(let t=0;t<a;t+=1){const s=(r.length-1)/n*((o+t)/i-e),a=Math.floor(s),l=Math.ceil(s);u[t]=a===l?r[a]:(1-(s-a))*r[a]+(1-(l-s))*r[l]}null===_&&b.flush(d.context.currentTime),b.add(h(u,e,n)),v.setValueCurveAtTime(u,e,n);const l=s/i;l<t&&p(w,u[u.length-1],l),p(w,r[r.length-1],t)}else null===_&&b.flush(d.context.currentTime),b.add(h(r,e,n)),v.setValueCurveAtTime(r,e,n);return w}};return n.set(w,v),e.set(w,d),t(w,_),w})((Ye=u,(t,e)=>{Ye.set(t,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:e})}),Ee,l,(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:i}=n;e.setTargetAtTime(r,t,i)}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:i}=n;e.setValueCurveAtTime(i,r,t)}}}})),i.createCancelAndHoldAutomationEvent,i.createCancelScheduledValuesAutomationEvent,i.createExponentialRampToValueAutomationEvent,i.createLinearRampToValueAutomationEvent,i.createSetTargetAutomationEvent,i.createSetValueAutomationEvent,i.createSetValueCurveAutomationEvent,Pe,oe);var Ye;const Qe=((t,e,n,r,i,o,s,a)=>class extends t{constructor(t,r){const a=o(t),u={...F,...r},l=i(a,u),c=s(a),h=c?e():null;super(t,!1,l,h),this._audioBufferSourceNodeRenderer=h,this._isBufferNullified=!1,this._isBufferSet=null!==u.buffer,this._nativeAudioBufferSourceNode=l,this._onended=null,this._playbackRate=n(this,c,l.playbackRate,R,N)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(t){if(this._nativeAudioBufferSourceNode.buffer=t,null!==t){if(this._isBufferSet)throw r();this._isBufferSet=!0}}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 onended(){return this._onended}set onended(t){const e="function"==typeof t?a(this,t):null;this._nativeAudioBufferSourceNode.onended=e;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===e?t:n}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]),"closed"!==this.context.state){T(this);const t=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",t),j(this)&&C(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeAudioBufferSourceNode.stop(t),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=t)}})(Ne,Ze,Xe,Ct,Ke,Te,Oe,ce),Je=((t,e,n,r,i,o,s,a)=>class extends t{constructor(t,n){const r=o(t),u=s(r),l=i(r,n,u);super(t,!1,l,u?e(a):null),this._isNodeOfNativeOfflineAudioContext=u,this._nativeAudioDestinationNode=l}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}})(Ne,(t=>{let e=null;return{render:(n,r,i)=>(null===e&&(e=(async(e,n,r)=>{const i=n.destination;return await t(e,n,i,r),i})(n,r,i)),e)}}),I,Ct,((t,e)=>(n,r,i)=>{const o=n.destination;if(o.channelCount!==r)try{o.channelCount=r}catch{}i&&"explicit"!==o.channelCountMode&&(o.channelCountMode="explicit"),0===o.maxChannelCount&&Object.defineProperty(o,"maxChannelCount",{value:r});const s=t(n,{channelCount:r,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,gain:1});return e(s,"channelCount",(t=>()=>t.call(s)),(t=>e=>{t.call(s,e);try{o.channelCount=e}catch(t){if(e>o.maxChannelCount)throw t}})),e(s,"channelCountMode",(t=>()=>t.call(s)),(t=>e=>{t.call(s,e),o.channelCountMode=e})),e(s,"channelInterpretation",(t=>()=>t.call(s)),(t=>e=>{t.call(s,e),o.channelInterpretation=e})),Object.defineProperty(s,"maxChannelCount",{get:()=>o.maxChannelCount}),s.connect(o),s})(Wt,ie),Te,Oe,xe),tn=((t,e,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a,u){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a,u)=>{let l=n(s);const c=A(l,a);if(!c){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(a,t)}return o.set(a,l),c?(await t(a,s.Q,l.Q,u),await t(a,s.detune,l.detune,u),await t(a,s.frequency,l.frequency,u),await t(a,s.gain,l.gain,u)):(await r(a,s.Q,l.Q,u),await r(a,s.detune,l.detune,u),await r(a,s.frequency,l.frequency,u),await r(a,s.gain,l.gain,u)),await i(s,a,l,u),l})(s,a,u)}}})(He,qt,tt,Ge,xe),en=(t=>(e,n)=>t.set(e,n))(de),nn=((t,e,n,r,i,o,s,a)=>class extends t{constructor(t,r){const u=o(t),l={...gt,...r},c=i(u,l),h=s(u);super(t,!1,c,h?n():null),this._Q=e(this,h,c.Q,R,N),this._detune=e(this,h,c.detune,1200*Math.log2(R),-1200*Math.log2(R)),this._frequency=e(this,h,c.frequency,t.sampleRate/2,0),this._gain=e(this,h,c.gain,40*Math.log10(R),N),this._nativeBiquadFilterNode=c,a(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(t){this._nativeBiquadFilterNode.type=t}getFrequencyResponse(t,e,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(t,e,n)}catch(t){if(11===t.code)throw r();throw t}if(t.length!==e.length||e.length!==n.length)throw r()}})(Ne,Xe,tn,Ot,qt,Te,Oe,en),rn=((t,e)=>(n,r,i)=>{const o=new Set;return n.connect=(i=>(s,a=0,u=0)=>{const l=0===o.size;if(e(s))return i.call(n,s,a,u),t(o,[s,a,u],(t=>t[0]===s&&t[1]===a&&t[2]===u),!0),l&&r(),s;i.call(n,s,a),t(o,[s,a],(t=>t[0]===s&&t[1]===a),!0),l&&r()})(n.connect),n.disconnect=(t=>(r,s,a)=>{const u=o.size>0;if(void 0===r)t.apply(n),o.clear();else if("number"==typeof r){t.call(n,r);for(const t of o)t[1]===r&&o.delete(t)}else{e(r)?t.call(n,r,s,a):t.call(n,r,s);for(const t of o)t[0]!==r||void 0!==s&&t[1]!==s||void 0!==a&&t[2]!==a||o.delete(t)}const l=0===o.size;u&&l&&i()})(n.disconnect),n})(W,Me),on=((t,e)=>(n,r)=>{r.channelCount=1,r.channelCountMode="explicit",Object.defineProperty(r,"channelCount",{get:()=>1,set:()=>{throw t()}}),Object.defineProperty(r,"channelCountMode",{get:()=>"explicit",set:()=>{throw t()}});const i=n.createBufferSource();e(r,(()=>{const t=r.numberOfInputs;for(let e=0;e<t;e+=1)i.connect(r,0,e)}),(()=>i.disconnect(r)))})(Ct,rn),sn=((t,e)=>(n,r)=>{const i=n.createChannelMerger(r.numberOfInputs);return null!==t&&"webkitAudioContext"===t.name&&e(n,i),Nt(i,r),i})(Pe,on),an=((t,e,n)=>()=>{const r=new WeakMap;return{render(i,o,s){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o,s)=>{let a=e(i);if(!A(a,o)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=t(o,e)}return r.set(o,a),await n(i,o,a,s),a})(i,o,s)}}})(sn,tt,xe),un=((t,e,n,r,i)=>class extends t{constructor(t,o){const s=r(t),a={...yt,...o};super(t,!1,n(s,a),i(s)?e():null)}})(Ne,an,sn,Te,Oe),ln=((t,e,n)=>()=>{const r=new WeakMap;return{render(i,o,s){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o,s)=>{let a=e(i);if(!A(a,o)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=t(o,e)}return r.set(o,a),await n(i,o,a,s),a})(i,o,s)}}})(Bt,tt,xe),cn=((t,e,n,r,i,o)=>class extends t{constructor(t,s){const a=r(t),u=o({...bt,...s});super(t,!1,n(a,u),i(a)?e():null)}})(Ne,ln,Bt,Te,Oe,(t=>({...t,channelCount:t.numberOfOutputs}))),hn=((t,e,n,r)=>(i,{offset:o,...s})=>{const a=i.createBuffer(1,2,44100),u=e(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=n(i,{...s,gain:o}),c=a.getChannelData(0);c[0]=1,c[1]=1,u.buffer=a,u.loop=!0;const h={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(t){l.channelCount=t},get channelCountMode(){return l.channelCountMode},set channelCountMode(t){l.channelCountMode=t},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(t){l.channelInterpretation=t},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.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 t(i,u),r(Ut(h,l),(()=>u.connect(l)),(()=>u.disconnect(l)))})($e,Ke,Wt,rn),fn=((t,e,n,r,i)=>(o,s)=>{if(void 0===o.createConstantSource)return n(o,s);const a=o.createConstantSource();return Nt(a,s),jt(a,s,"offset"),e(r,(()=>r(o)))||Ft(a),e(i,(()=>i(o)))||Vt(a),t(o,a),a})($e,ve,hn,se,ue),pn=((t,e,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(t){s=t},set stop(t){a=t},render(u,l,c){const h=o.get(l);return void 0!==h?Promise.resolve(h):(async(u,l,c)=>{let h=n(u);const f=A(h,l);if(!f){const t={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(l,t),null!==s&&h.start(s),null!==a&&h.stop(a)}return o.set(l,h),f?await t(l,u.offset,h.offset,c):await r(l,u.offset,h.offset,c),await i(u,l,h,c),h})(u,l,c)}}})(He,fn,tt,Ge,xe),dn=((t,e,n,r,i,o,s)=>class extends t{constructor(t,s){const a=i(t),u={..._t,...s},l=r(a,u),c=o(a),h=c?n():null;super(t,!1,l,h),this._constantSourceNodeRenderer=h,this._nativeConstantSourceNode=l,this._offset=e(this,c,l.offset,R,N),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(t){const e="function"==typeof t?s(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),"closed"!==this.context.state){T(this);const t=()=>{this._nativeConstantSourceNode.removeEventListener("ended",t),j(this)&&C(this)};this._nativeConstantSourceNode.addEventListener("ended",t)}}stop(t=0){this._nativeConstantSourceNode.stop(t),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=t)}})(Ne,Xe,pn,fn,Te,Oe,ce),mn=((t,e)=>(n,r)=>{const i=n.createConvolver();if(Nt(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),Dt(i,r,"buffer"),r.channelCount>2)throw t();if(e(i,"channelCount",(t=>()=>t.call(i)),(e=>n=>{if(n>2)throw t();return e.call(i,n)})),"max"===r.channelCountMode)throw t();return e(i,"channelCountMode",(t=>()=>t.call(i)),(e=>n=>{if("max"===n)throw t();return e.call(i,n)})),i})(Zt,ie),vn=((t,e,n)=>()=>{const r=new WeakMap;return{render(i,o,s){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o,s)=>{let a=e(i);if(!A(a,o)){const e={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=t(o,e)}return r.set(o,a),G(a)?await n(i,o,a.inputs[0],s):await n(i,o,a,s),a})(i,o,s)}}})(mn,tt,xe),gn=((t,e,n,r,i,o)=>class extends t{constructor(t,s){const a=r(t),u={...wt,...s},l=n(a,u);super(t,!1,l,i(a)?e():null),this._isBufferNullified=!1,this._nativeConvolverNode=l,null!==u.buffer&&o(this,u.buffer.duration)}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,44100),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(t){this._nativeConvolverNode.normalize=t}})(Ne,vn,mn,Te,Oe,en),yn=((t,e,n,r,i)=>o=>{const s=new WeakMap;return{render(a,u,l){const c=s.get(u);return void 0!==c?Promise.resolve(c):(async(a,u,l)=>{let c=n(a);const h=A(c,u);if(!h){const t={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,delayTime:c.delayTime.value,maxDelayTime:o};c=e(u,t)}return s.set(u,c),h?await t(u,a.delayTime,c.delayTime,l):await r(u,a.delayTime,c.delayTime,l),await i(a,u,c,l),c})(a,u,l)}}})(He,$t,tt,Ge,xe),bn=((t,e,n,r,i,o,s)=>class extends t{constructor(t,a){const u=i(t),l={...xt,...a},c=r(u,l),h=o(u);super(t,!1,c,h?n(l.maxDelayTime):null),this._delayTime=e(this,h,c.delayTime),s(this,l.maxDelayTime)}get delayTime(){return this._delayTime}})(Ne,Xe,yn,$t,Te,Oe,en),_n=(t=>(e,n)=>{const r=e.createDynamicsCompressor();if(Nt(r,n),n.channelCount>2)throw t();if("max"===n.channelCountMode)throw t();return jt(r,n,"attack"),jt(r,n,"knee"),jt(r,n,"ratio"),jt(r,n,"release"),jt(r,n,"threshold"),r})(Zt),wn=((t,e,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a,u){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a,u)=>{let l=n(s);const c=A(l,a);if(!c){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(a,t)}return o.set(a,l),c?(await t(a,s.attack,l.attack,u),await t(a,s.knee,l.knee,u),await t(a,s.ratio,l.ratio,u),await t(a,s.release,l.release,u),await t(a,s.threshold,l.threshold,u)):(await r(a,s.attack,l.attack,u),await r(a,s.knee,l.knee,u),await r(a,s.ratio,l.ratio,u),await r(a,s.release,l.release,u),await r(a,s.threshold,l.threshold,u)),await i(s,a,l,u),l})(s,a,u)}}})(He,_n,tt,Ge,xe),xn=((t,e,n,r,i,o,s,a)=>class extends t{constructor(t,i){const u=o(t),l={...Tt,...i},c=r(u,l),h=s(u);super(t,!1,c,h?n():null),this._attack=e(this,h,c.attack),this._knee=e(this,h,c.knee),this._nativeDynamicsCompressorNode=c,this._ratio=e(this,h,c.ratio),this._release=e(this,h,c.release),this._threshold=e(this,h,c.threshold),a(this,.006)}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}})(Ne,Xe,wn,_n,Zt,Te,Oe,en),Sn=((t,e,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a,u){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a,u)=>{let l=n(s);const c=A(l,a);if(!c){const t={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(a,t)}return o.set(a,l),c?await t(a,s.gain,l.gain,u):await r(a,s.gain,l.gain,u),await i(s,a,l,u),l})(s,a,u)}}})(He,Wt,tt,Ge,xe),Tn=((t,e,n,r,i,o)=>class extends t{constructor(t,s){const a=i(t),u={...kt,...s},l=r(a,u),c=o(a);super(t,!1,l,c?n():null),this._gain=e(this,c,l.gain,R,N)}get gain(){return this._gain}})(Ne,Xe,Sn,Wt,Te,Oe),kn=((t,e,n,r)=>(i,o,{channelCount:s,channelCountMode:a,channelInterpretation:u,feedback:l,feedforward:c})=>{const h=Lt(o,i.sampleRate),f=l instanceof Float64Array?l:new Float64Array(l),p=c instanceof Float64Array?c:new Float64Array(c),d=f.length,m=p.length,v=Math.min(d,m);if(0===d||d>20)throw r();if(0===f[0])throw e();if(0===m||m>20)throw r();if(0===p[0])throw e();if(1!==f[0]){for(let t=0;t<m;t+=1)p[t]/=f[0];for(let t=1;t<d;t+=1)f[t]/=f[0]}const g=n(i,h,s,s);g.channelCount=s,g.channelCountMode=a,g.channelInterpretation=u;const y=[],b=[],_=[];for(let t=0;t<s;t+=1){y.push(0);const t=new Float32Array(32),e=new Float32Array(32);t.fill(0),e.fill(0),b.push(t),_.push(e)}g.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);y[t]=At(f,d,p,m,v,b[t],_[t],y[t],32,r,i)}};const w=i.sampleRate/2;return Ut({get bufferSize(){return h},get channelCount(){return g.channelCount},set channelCount(t){g.channelCount=t},get channelCountMode(){return g.channelCountMode},set channelCountMode(t){g.channelCountMode=t},get channelInterpretation(){return g.channelInterpretation},set channelInterpretation(t){g.channelInterpretation=t},get context(){return g.context},get inputs(){return[g]},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},addEventListener:(...t)=>g.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>g.dispatchEvent(t[0]),getFrequencyResponse(e,n,r){if(e.length!==n.length||n.length!==r.length)throw t();const i=e.length;for(let t=0;t<i;t+=1){const i=-Math.PI*(e[t]/w),o=[Math.cos(i),Math.sin(i)],s=Ht(Kt(p,o),Kt(f,o));n[t]=Math.sqrt(s[0]*s[0]+s[1]*s[1]),r[t]=Math.atan2(s[1],s[0])}},removeEventListener:(...t)=>g.removeEventListener(t[0],t[1],t[2])},g)})(Ot,Ct,Gt,Zt),Cn=((t,e,n,r)=>i=>t(It,(()=>It(i)))?Promise.resolve(t(r,r)).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()})))(ve,Wt,Gt,((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()}))})(Wt,Ce)),On=((t,e,n,r,i)=>(o,s)=>{const a=new WeakMap;let u=null;const l=async(l,c,h)=>{let f=null,p=e(l);const d=A(p,c);if(void 0===c.createIIRFilter?f=t(c,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):d||(p=c.createIIRFilter(s,o)),a.set(c,null===f?p:f),null!==f){if(null===u){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const t=new n(l.context.destination.channelCount,l.context.length,c.sampleRate);u=(async()=>{await r(l,t,t.destination,h);return((t,e,n,r)=>{const i=n instanceof Float64Array?n:new Float64Array(n),o=r instanceof Float64Array?r:new Float64Array(r),s=i.length,a=o.length,u=Math.min(s,a);if(1!==i[0]){for(let t=0;t<s;t+=1)o[t]/=i[0];for(let t=1;t<a;t+=1)i[t]/=i[0]}const l=new Float32Array(32),c=new Float32Array(32),h=e.createBuffer(t.numberOfChannels,t.length,t.sampleRate),f=t.numberOfChannels;for(let e=0;e<f;e+=1){const n=t.getChannelData(e),r=h.getChannelData(e);l.fill(0),c.fill(0),At(i,s,o,a,u,l,c,0,32,n,r)}return h})(await i(t),c,o,s)})()}const t=await u;return f.buffer=t,f.start(0),f}return await r(l,c,p,h),p};return{render(t,e,n){const r=a.get(e);return void 0!==r?Promise.resolve(r):l(t,e,n)}}})(Ke,tt,Ce,xe,Cn),En=(t=>(e,n,r)=>{if(void 0===e.createIIRFilter)return t(e,n,r);const i=e.createIIRFilter(r.feedforward,r.feedback);return Nt(i,r),i})(kn),An=((t,e,n,r,i,o)=>class extends t{constructor(t,s){const a=r(t),u=i(a),l={...Et,...s},c=e(a,u?null:t.baseLatency,l);super(t,!1,c,u?n(l.feedback,l.feedforward):null),(t=>{var e;t.getFrequencyResponse=(e=t.getFrequencyResponse,(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw Ot();return e.call(t,n,r,i)})})(c),this._nativeIIRFilterNode=c,o(this,1)}getFrequencyResponse(t,e,n){return this._nativeIIRFilterNode.getFrequencyResponse(t,e,n)}})(Ne,En,On,Te,Oe,en),Pn=((t,e,n,r,i)=>(o,s)=>{const a=s.listener,{forwardX:u,forwardY:l,forwardZ:c,positionX:h,positionY:f,positionZ:p,upX:d,upY:m,upZ:v}=void 0===a.forwardX?(()=>{const u=e(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),l=i(s),c=r(s,256,9,0),h=(e,r)=>{const i=n(s,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});return i.connect(u,0,e),i.start(),Object.defineProperty(i.offset,"defaultValue",{get:()=>r}),t({context:o},l,i.offset,R,N)};let f=[0,0,-1,0,1,0],p=[0,0,0];return c.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!==f[e]))&&(a.setOrientation(...e),f=e);const n=[t.getChannelData(6)[0],t.getChannelData(7)[0],t.getChannelData(8)[0]];n.some(((t,e)=>t!==p[e]))&&(a.setPosition(...n),p=n)},u.connect(c),{forwardX:h(0,0),forwardY:h(1,0),forwardZ:h(2,-1),positionX:h(6,0),positionY:h(7,0),positionZ:h(8,0),upX:h(3,0),upY:h(4,1),upZ:h(5,0)}})():a;return{get forwardX(){return u},get forwardY(){return l},get forwardZ(){return c},get positionX(){return h},get positionY(){return f},get positionZ(){return p},get upX(){return d},get upY(){return m},get upZ(){return v}}})(Xe,sn,fn,Gt,Oe),In=new WeakMap,Mn=((t,e,n,r,i,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,c.set(this,n),r(n)&&i.set(n,new Set),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}})(Je,Pn,Ae,Oe,In,ce),Dn=((t,e,n,r,i,o)=>(s,a)=>{const u=s.createOscillator();return Nt(u,a),jt(u,a,"detune"),jt(u,a,"frequency"),void 0!==a.periodicWave?u.setPeriodicWave(a.periodicWave):Dt(u,a,"type"),e(n,(()=>n(s)))||Ft(u),e(r,(()=>r(s)))||o(u,s),e(i,(()=>i(s)))||Vt(u),t(s,u),u})($e,ve,se,ae,ue,le),Nn=((t,e,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null,u=null;return{set periodicWave(t){s=t},set start(t){a=t},set stop(t){u=t},render(l,c,h){const f=o.get(c);return void 0!==f?Promise.resolve(f):(async(l,c,h)=>{let f=n(l);const p=A(f,c);if(!p){const t={channelCount:f.channelCount,channelCountMode:f.channelCountMode,channelInterpretation:f.channelInterpretation,detune:f.detune.value,frequency:f.frequency.value,periodicWave:null===s?void 0:s,type:f.type};f=e(c,t),null!==a&&f.start(a),null!==u&&f.stop(u)}return o.set(c,f),p?(await t(c,l.detune,f.detune,h),await t(c,l.frequency,f.frequency,h)):(await r(c,l.detune,f.detune,h),await r(c,l.frequency,f.frequency,h)),await i(l,c,f,h),f})(l,c,h)}}})(He,Dn,tt,Ge,xe),Rn=((t,e,n,r,i,o,s)=>class extends t{constructor(t,s){const a=i(t),u={...Yt,...s},l=n(a,u),c=o(a),h=c?r():null,f=t.sampleRate/2;super(t,!1,l,h),this._detune=e(this,c,l.detune,153600,-153600),this._frequency=e(this,c,l.frequency,f,-f),this._nativeOscillatorNode=l,this._onended=null,this._oscillatorNodeRenderer=h,null!==this._oscillatorNodeRenderer&&void 0!==u.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=u.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(t){const e="function"==typeof t?s(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){this._nativeOscillatorNode.type=t,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),"closed"!==this.context.state){T(this);const t=()=>{this._nativeOscillatorNode.removeEventListener("ended",t),j(this)&&C(this)};this._nativeOscillatorNode.addEventListener("ended",t)}}stop(t=0){this._nativeOscillatorNode.stop(t),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=t)}})(Ne,Xe,Dn,Nn,Te,Oe,ce),jn=(t=>(e,n)=>{const r=t(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),i=e.createBuffer(1,2,44100);return r.buffer=i,r.loop=!0,r.connect(n),r.start(),()=>{r.stop(),r.disconnect(n)}})(Ke),Fn=((t,e,n,r,i)=>(o,{curve:s,oversample:a,...u})=>{const l=o.createWaveShaper(),c=o.createWaveShaper();Nt(l,u),Nt(c,u);const h=n(o,{...u,gain:1}),f=n(o,{...u,gain:-1}),p=n(o,{...u,gain:1}),d=n(o,{...u,gain:-1});let m=null,v=!1,g=null;const y={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(t){h.channelCount=t,f.channelCount=t,l.channelCount=t,p.channelCount=t,c.channelCount=t,d.channelCount=t},get channelCountMode(){return l.channelCountMode},set channelCountMode(t){h.channelCountMode=t,f.channelCountMode=t,l.channelCountMode=t,p.channelCountMode=t,c.channelCountMode=t,d.channelCountMode=t},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(t){h.channelInterpretation=t,f.channelInterpretation=t,l.channelInterpretation=t,p.channelInterpretation=t,c.channelInterpretation=t,d.channelInterpretation=t},get context(){return l.context},get curve(){return g},set curve(n){if(null!==n&&n.length<2)throw e();if(null===n)l.curve=n,c.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 i=Math.ceil((t+1)/2),o=(t+1)/2-1;for(let s=1;s<i;s+=1){const a=s/i*o,u=Math.floor(a),l=Math.ceil(a);e[s]=u===l?n[u]:(1-(a-u))*n[u]+(1-(l-a))*n[l],r[s]=u===l?-n[t-1-u]:-(1-(a-u))*n[t-1-u]-(1-(l-a))*n[t-1-l]}e[i]=t%2==1?n[i-1]:(n[i-2]+n[i-1])/2,l.curve=e,c.curve=r}g=n,v&&(r(g)&&null===m?m=t(o,h):null!==m&&(m(),m=null))},get inputs(){return[h]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get oversample(){return l.oversample},set oversample(t){l.oversample=t,c.oversample=t},addEventListener:(...t)=>h.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>h.dispatchEvent(t[0]),removeEventListener:(...t)=>h.removeEventListener(t[0],t[1],t[2])};null!==s&&(y.curve=s instanceof Float32Array?s:new Float32Array(s)),a!==y.oversample&&(y.oversample=a);return i(Ut(y,p),(()=>{h.connect(l).connect(p),h.connect(f).connect(c).connect(d).connect(p),v=!0,r(g)&&(m=t(o,h))}),(()=>{h.disconnect(l),l.disconnect(p),h.disconnect(f),f.disconnect(c),c.disconnect(d),d.disconnect(p),v=!1,null!==m&&(m(),m=null)}))})(jn,Ct,Wt,re,rn),Vn=((t,e,n,r,i,o,s)=>(a,u)=>{const l=a.createWaveShaper();if(null!==o&&"webkitAudioContext"===o.name&&void 0===a.createGain().gain.automationRate)return n(a,u);Nt(l,u);const c=null===u.curve||u.curve instanceof Float32Array?u.curve:new Float32Array(u.curve);if(null!==c&&c.length<2)throw e();Dt(l,{curve:c},"curve"),Dt(l,u,"oversample");let h=null,f=!1;s(l,"curve",(t=>()=>t.call(l)),(e=>n=>(e.call(l,n),f&&(r(n)&&null===h?h=t(a,l):r(n)||null===h||(h(),h=null)),n)));return i(l,(()=>{f=!0,r(l.curve)&&(h=t(a,l))}),(()=>{f=!1,null!==h&&(h(),h=null)}))})(jn,Ct,Fn,re,rn,Pe,ie),Ln=((t,e,n,r,i,o,s,a,u)=>(l,{coneInnerAngle:c,coneOuterAngle:h,coneOuterGain:f,distanceModel:p,maxDistance:d,orientationX:m,orientationY:v,orientationZ:g,panningModel:y,positionX:b,positionY:_,positionZ:w,refDistance:x,rolloffFactor:S,...T})=>{const k=l.createPanner();if(T.channelCount>2)throw s();if("max"===T.channelCountMode)throw s();Nt(k,T);const C={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},O=n(l,{...C,channelInterpretation:"speakers",numberOfInputs:6}),E=r(l,{...T,gain:1}),A=r(l,{...C,gain:1}),P=r(l,{...C,gain:0}),I=r(l,{...C,gain:0}),M=r(l,{...C,gain:0}),D=r(l,{...C,gain:0}),N=r(l,{...C,gain:0}),R=i(l,256,6,1),j=o(l,{...C,curve:new Float32Array([1,1]),oversample:"none"});let F=[m,v,g],V=[b,_,w];R.onaudioprocess=({inputBuffer:t})=>{const e=[t.getChannelData(0)[0],t.getChannelData(1)[0],t.getChannelData(2)[0]];e.some(((t,e)=>t!==F[e]))&&(k.setOrientation(...e),F=e);const n=[t.getChannelData(3)[0],t.getChannelData(4)[0],t.getChannelData(5)[0]];n.some(((t,e)=>t!==V[e]))&&(k.setPosition(...n),V=n)},Object.defineProperty(P.gain,"defaultValue",{get:()=>0}),Object.defineProperty(I.gain,"defaultValue",{get:()=>0}),Object.defineProperty(M.gain,"defaultValue",{get:()=>0}),Object.defineProperty(D.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0});const L={get bufferSize(){},get channelCount(){return k.channelCount},set channelCount(t){if(t>2)throw s();E.channelCount=t,k.channelCount=t},get channelCountMode(){return k.channelCountMode},set channelCountMode(t){if("max"===t)throw s();E.channelCountMode=t,k.channelCountMode=t},get channelInterpretation(){return k.channelInterpretation},set channelInterpretation(t){E.channelInterpretation=t,k.channelInterpretation=t},get coneInnerAngle(){return k.coneInnerAngle},set coneInnerAngle(t){k.coneInnerAngle=t},get coneOuterAngle(){return k.coneOuterAngle},set coneOuterAngle(t){k.coneOuterAngle=t},get coneOuterGain(){return k.coneOuterGain},set coneOuterGain(t){if(t<0||t>1)throw e();k.coneOuterGain=t},get context(){return k.context},get distanceModel(){return k.distanceModel},set distanceModel(t){k.distanceModel=t},get inputs(){return[E]},get maxDistance(){return k.maxDistance},set maxDistance(t){if(t<0)throw new RangeError;k.maxDistance=t},get numberOfInputs(){return k.numberOfInputs},get numberOfOutputs(){return k.numberOfOutputs},get orientationX(){return A.gain},get orientationY(){return P.gain},get orientationZ(){return I.gain},get panningModel(){return k.panningModel},set panningModel(t){k.panningModel=t},get positionX(){return M.gain},get positionY(){return D.gain},get positionZ(){return N.gain},get refDistance(){return k.refDistance},set refDistance(t){if(t<0)throw new RangeError;k.refDistance=t},get rolloffFactor(){return k.rolloffFactor},set rolloffFactor(t){if(t<0)throw new RangeError;k.rolloffFactor=t},addEventListener:(...t)=>E.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>E.dispatchEvent(t[0]),removeEventListener:(...t)=>E.removeEventListener(t[0],t[1],t[2])};c!==L.coneInnerAngle&&(L.coneInnerAngle=c),h!==L.coneOuterAngle&&(L.coneOuterAngle=h),f!==L.coneOuterGain&&(L.coneOuterGain=f),p!==L.distanceModel&&(L.distanceModel=p),d!==L.maxDistance&&(L.maxDistance=d),m!==L.orientationX.value&&(L.orientationX.value=m),v!==L.orientationY.value&&(L.orientationY.value=v),g!==L.orientationZ.value&&(L.orientationZ.value=g),y!==L.panningModel&&(L.panningModel=y),b!==L.positionX.value&&(L.positionX.value=b),_!==L.positionY.value&&(L.positionY.value=_),w!==L.positionZ.value&&(L.positionZ.value=w),x!==L.refDistance&&(L.refDistance=x),S!==L.rolloffFactor&&(L.rolloffFactor=S),1===F[0]&&0===F[1]&&0===F[2]||k.setOrientation(...F),0===V[0]&&0===V[1]&&0===V[2]||k.setPosition(...V);return u(Ut(L,k),(()=>{E.connect(k),t(E,j,0,0),j.connect(A).connect(O,0,0),j.connect(P).connect(O,0,1),j.connect(I).connect(O,0,2),j.connect(M).connect(O,0,3),j.connect(D).connect(O,0,4),j.connect(N).connect(O,0,5),O.connect(R).connect(l.destination)}),(()=>{E.disconnect(k),a(E,j,0,0),j.disconnect(A),A.disconnect(O),j.disconnect(P),P.disconnect(O),j.disconnect(I),I.disconnect(O),j.disconnect(M),M.disconnect(O),j.disconnect(D),D.disconnect(O),j.disconnect(N),N.disconnect(O),O.disconnect(R),R.disconnect(l.destination)}))})(Z,Ct,sn,Wt,Gt,Vn,Zt,J,rn),zn=(t=>(e,n)=>{const r=e.createPanner();return void 0===r.orientationX?t(e,n):(Nt(r,n),jt(r,n,"orientationX"),jt(r,n,"orientationY"),jt(r,n,"orientationZ"),jt(r,n,"positionX"),jt(r,n,"positionY"),jt(r,n,"positionZ"),Dt(r,n,"coneInnerAngle"),Dt(r,n,"coneOuterAngle"),Dt(r,n,"coneOuterGain"),Dt(r,n,"distanceModel"),Dt(r,n,"maxDistance"),Dt(r,n,"panningModel"),Dt(r,n,"refDistance"),Dt(r,n,"rolloffFactor"),r)})(Ln),qn=((t,e,n,r,i,o,s,a,u,l)=>()=>{const c=new WeakMap;let h=null;return{render(f,p,d){const m=c.get(p);return void 0!==m?Promise.resolve(m):(async(f,p,d)=>{let m=null,v=o(f);const g={channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation},y={...g,coneInnerAngle:v.coneInnerAngle,coneOuterAngle:v.coneOuterAngle,coneOuterGain:v.coneOuterGain,distanceModel:v.distanceModel,maxDistance:v.maxDistance,panningModel:v.panningModel,refDistance:v.refDistance,rolloffFactor:v.rolloffFactor},b=A(v,p);if("bufferSize"in v)m=r(p,{...g,gain:1});else if(!b){const t={...y,orientationX:v.orientationX.value,orientationY:v.orientationY.value,orientationZ:v.orientationZ.value,positionX:v.positionX.value,positionY:v.positionY.value,positionZ:v.positionZ.value};v=i(p,t)}if(c.set(p,null===m?v:m),null!==m){if(null===h){if(null===s)throw new Error("Missing the native OfflineAudioContext constructor.");const t=new s(6,f.context.length,p.sampleRate),r=e(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(t.destination),h=(async()=>{const e=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map((async(e,r)=>{const i=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await a(t,e,i.offset,d),i})));for(let t=0;t<6;t+=1)e[t].connect(r,0,t),e[t].start(0);return l(t)})()}const t=await h,o=r(p,{...g,gain:1});await u(f,p,o,d);const c=[];for(let e=0;e<t.numberOfChannels;e+=1)c.push(t.getChannelData(e));let v=[c[0][0],c[1][0],c[2][0]],b=[c[3][0],c[4][0],c[5][0]],_=r(p,{...g,gain:1}),w=i(p,{...y,orientationX:v[0],orientationY:v[1],orientationZ:v[2],positionX:b[0],positionY:b[1],positionZ:b[2]});o.connect(_).connect(w.inputs[0]),w.connect(m);for(let e=128;e<t.length;e+=128){const t=[c[0][e],c[1][e],c[2][e]],n=[c[3][e],c[4][e],c[5][e]];if(t.some(((t,e)=>t!==v[e]))||n.some(((t,e)=>t!==b[e]))){v=t,b=n;const s=e/p.sampleRate;_.gain.setValueAtTime(0,s),_=r(p,{...g,gain:0}),w=i(p,{...y,orientationX:v[0],orientationY:v[1],orientationZ:v[2],positionX:b[0],positionY:b[1],positionZ:b[2]}),_.gain.setValueAtTime(1,s),o.connect(_).connect(w.inputs[0]),w.connect(m)}}return m}return b?(await t(p,f.orientationX,v.orientationX,d),await t(p,f.orientationY,v.orientationY,d),await t(p,f.orientationZ,v.orientationZ,d),await t(p,f.positionX,v.positionX,d),await t(p,f.positionY,v.positionY,d),await t(p,f.positionZ,v.positionZ,d)):(await a(p,f.orientationX,v.orientationX,d),await a(p,f.orientationY,v.orientationY,d),await a(p,f.orientationZ,v.orientationZ,d),await a(p,f.positionX,v.positionX,d),await a(p,f.positionY,v.positionY,d),await a(p,f.positionZ,v.positionZ,d)),G(v)?await u(f,p,v.inputs[0],d):await u(f,p,v,d),v})(f,p,d)}}})(He,sn,fn,Wt,zn,tt,Ce,Ge,xe,Cn),Bn=((t,e,n,r,i,o,s)=>class extends t{constructor(t,a){const u=i(t),l={...Qt,...a},c=n(u,l),h=o(u);super(t,!1,c,h?r():null),this._nativePannerNode=c,this._orientationX=e(this,h,c.orientationX,R,N),this._orientationY=e(this,h,c.orientationY,R,N),this._orientationZ=e(this,h,c.orientationZ,R,N),this._positionX=e(this,h,c.positionX,R,N),this._positionY=e(this,h,c.positionY,R,N),this._positionZ=e(this,h,c.positionZ,R,N),s(this,1)}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}})(Ne,Xe,zn,qn,Te,Oe,en),Un=(t=>(e,{disableNormalization:n,imag:r,real:i})=>{const o=r instanceof Float32Array?r:new Float32Array(r),s=i instanceof Float32Array?i:new Float32Array(i),a=e.createPeriodicWave(s,o,{disableNormalization:n});if(Array.from(r).length<2)throw t();return a})(I),$n=((t,e,n,r)=>class i{constructor(i,o){const s=e(i),a=r({...Jt,...o}),u=t(s,a);return n.add(u),u}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===i.prototype||n.has(t)}})(Un,Te,new WeakSet,(t=>{const{imag:e,real:n}=t;return void 0===e?void 0===n?{...t,imag:[0,0],real:[0,0]}:{...t,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...t,imag:e,real:Array.from(e,(()=>0))}:{...t,imag:e,real:n}})),Wn=((t,e,n,r,i,o)=>{const s=16385,a=new Float32Array([1,1]),u=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},c={...l,oversample:"none"},h=(t,o,h,f,p)=>{if(1===o)return((t,e,i,o)=>{const h=new Float32Array(s),f=new Float32Array(s);for(let t=0;t<s;t+=1){const e=t/16384*u;h[t]=Math.cos(e),f[t]=Math.sin(e)}const p=n(t,{...l,gain:0}),d=r(t,{...c,curve:h}),m=r(t,{...c,curve:a}),v=n(t,{...l,gain:0}),g=r(t,{...c,curve:f});return{connectGraph(){e.connect(p),e.connect(void 0===m.inputs?m:m.inputs[0]),e.connect(v),m.connect(i),i.connect(void 0===d.inputs?d:d.inputs[0]),i.connect(void 0===g.inputs?g:g.inputs[0]),d.connect(p.gain),g.connect(v.gain),p.connect(o,0,0),v.connect(o,0,1)},disconnectGraph(){e.disconnect(p),e.disconnect(void 0===m.inputs?m:m.inputs[0]),e.disconnect(v),m.disconnect(i),i.disconnect(void 0===d.inputs?d:d.inputs[0]),i.disconnect(void 0===g.inputs?g:g.inputs[0]),d.disconnect(p.gain),g.disconnect(v.gain),p.disconnect(o,0,0),v.disconnect(o,0,1)}}})(t,h,f,p);if(2===o)return((t,i,o,h)=>{const f=new Float32Array(s),p=new Float32Array(s),d=new Float32Array(s),m=new Float32Array(s),v=Math.floor(8192.5);for(let t=0;t<s;t+=1)if(t>v){const e=(t-v)/(16384-v)*u;f[t]=Math.cos(e),p[t]=Math.sin(e),d[t]=0,m[t]=1}else{const e=t/(16384-v)*u;f[t]=1,p[t]=0,d[t]=Math.cos(e),m[t]=Math.sin(e)}const g=e(t,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(t,{...l,gain:0}),b=r(t,{...c,curve:f}),_=n(t,{...l,gain:0}),w=r(t,{...c,curve:p}),x=r(t,{...c,curve:a}),S=n(t,{...l,gain:0}),T=r(t,{...c,curve:d}),k=n(t,{...l,gain:0}),C=r(t,{...c,curve:m});return{connectGraph(){i.connect(g),i.connect(void 0===x.inputs?x:x.inputs[0]),g.connect(y,0),g.connect(_,0),g.connect(S,1),g.connect(k,1),x.connect(o),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===w.inputs?w:w.inputs[0]),o.connect(void 0===T.inputs?T:T.inputs[0]),o.connect(void 0===C.inputs?C:C.inputs[0]),b.connect(y.gain),w.connect(_.gain),T.connect(S.gain),C.connect(k.gain),y.connect(h,0,0),S.connect(h,0,0),_.connect(h,0,1),k.connect(h,0,1)},disconnectGraph(){i.disconnect(g),i.disconnect(void 0===x.inputs?x:x.inputs[0]),g.disconnect(y,0),g.disconnect(_,0),g.disconnect(S,1),g.disconnect(k,1),x.disconnect(o),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===w.inputs?w:w.inputs[0]),o.disconnect(void 0===T.inputs?T:T.inputs[0]),o.disconnect(void 0===C.inputs?C:C.inputs[0]),b.disconnect(y.gain),w.disconnect(_.gain),T.disconnect(S.gain),C.disconnect(k.gain),y.disconnect(h,0,0),S.disconnect(h,0,0),_.disconnect(h,0,1),k.disconnect(h,0,1)}}})(t,h,f,p);throw i()};return(e,{channelCount:r,channelCountMode:s,pan:a,...u})=>{if("max"===s)throw i();const l=t(e,{...u,channelCount:1,channelCountMode:s,numberOfInputs:2}),c=n(e,{...u,channelCount:r,channelCountMode:s,gain:1}),f=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:a});let{connectGraph:p,disconnectGraph:d}=h(e,r,c,f,l);Object.defineProperty(f.gain,"defaultValue",{get:()=>0}),Object.defineProperty(f.gain,"maxValue",{get:()=>1}),Object.defineProperty(f.gain,"minValue",{get:()=>-1});const m={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(t){c.channelCount!==t&&(v&&d(),({connectGraph:p,disconnectGraph:d}=h(e,t,c,f,l)),v&&p()),c.channelCount=t},get channelCountMode(){return c.channelCountMode},set channelCountMode(t){if("clamped-max"===t||"max"===t)throw i();c.channelCountMode=t},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(t){c.channelInterpretation=t},get context(){return c.context},get inputs(){return[c]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get pan(){return f.gain},addEventListener:(...t)=>c.addEventListener(t[0],t[1],t[2]),dispatchEvent:(...t)=>c.dispatchEvent(t[0]),removeEventListener:(...t)=>c.removeEventListener(t[0],t[1],t[2])};let v=!1;return o(Ut(m,l),(()=>{p(),v=!0}),(()=>{d(),v=!1}))}})(sn,Bt,Wt,Vn,Zt,rn),Hn=((t,e)=>(n,r)=>{const i=r.channelCountMode;if("clamped-max"===i)throw e();if(void 0===n.createStereoPanner)return t(n,r);const o=n.createStereoPanner();return Nt(o,r),jt(o,r,"pan"),Object.defineProperty(o,"channelCountMode",{get:()=>i,set:t=>{if(t!==i)throw e()}}),o})(Wn,Zt),Kn=((t,e,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a,u){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a,u)=>{let l=n(s);const c=A(l,a);if(!c){const t={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(a,t)}return o.set(a,l),c?await t(a,s.pan,l.pan,u):await r(a,s.pan,l.pan,u),G(l)?await i(s,a,l.inputs[0],u):await i(s,a,l,u),l})(s,a,u)}}})(He,Hn,tt,Ge,xe),Gn=((t,e,n,r,i,o)=>class extends t{constructor(t,s){const a=i(t),u={...te,...s},l=n(a,u),c=o(a);super(t,!1,l,c?r():null),this._pan=e(this,c,l.pan)}get pan(){return this._pan}})(Ne,Xe,Hn,Kn,Te,Oe),Zn=((t,e,n)=>()=>{const r=new WeakMap;return{render(i,o,s){const a=r.get(o);return void 0!==a?Promise.resolve(a):(async(i,o,s)=>{let a=e(i);if(!A(a,o)){const e={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=t(o,e)}return r.set(o,a),G(a)?await n(i,o,a.inputs[0],s):await n(i,o,a,s),a})(i,o,s)}}})(Vn,tt,xe),Xn=((t,e,n,r,i,o,s)=>class extends t{constructor(t,e){const a=i(t),u={...ne,...e},l=n(a,u);super(t,!0,l,o(a)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=l,s(this,1)}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}})(Ne,Ct,Vn,Zn,Te,Oe,en),Yn=(t=>null!==t&&t.isSecureContext)(be),Qn=(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)}})(be),Jn=new WeakMap,tr=((t,e)=>n=>{let r=t.get(n);if(void 0!==r)return r;if(null===e)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new e(1,1,8e3),t.set(n,r),r})(Jn,Ce),er=(t=>null===t?null:t.hasOwnProperty("AudioWorkletNode")?t.AudioWorkletNode:null)(be),nr=Yn?((t,e,n,r,i,o,s,a,u,l,c,h)=>(f,d,m={credentials:"omit"})=>{const v=o(f);if(void 0!==v.audioWorklet)return Promise.all([i(d),Promise.resolve(t(c,c))]).then((([[t,e],n])=>{const[r,i]=g(t,e),o=n?i:i.replace(/\s+extends\s+AudioWorkletProcessor\s*{/," extends (class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}){"),u=new Blob([`${r};(registerProcessor=>{${o}\n})((n,p)=>registerProcessor(n,class extends p{${n?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${n?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}))`],{type:"application/javascript; charset=utf-8"}),l=URL.createObjectURL(u);return v.audioWorklet.addModule(l,m).then((()=>{if(a(v))return;return s(v).audioWorklet.addModule(l,m)})).finally((()=>URL.revokeObjectURL(l)))}));const _=l.get(f);if(void 0!==_&&_.has(d))return Promise.resolve();const w=u.get(f);if(void 0!==w){const t=w.get(d);if(void 0!==t)return t}const x=i(d).then((([t,e])=>{const[r,i]=g(t,e);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i}\n})})(window,'_AWGS')`)})).then((()=>{const t=h._AWGS.pop();if(void 0===t)throw new SyntaxError;r(v.currentTime,v.sampleRate,(()=>t(class{},void 0,((t,n)=>{if(""===t.trim())throw e();const r=p.get(v);if(void 0!==r){if(r.has(t))throw e();b(n),y(n.parameterDescriptors),r.set(t,n)}else b(n),y(n.parameterDescriptors),p.set(v,new Map([[t,n]]))}),v.sampleRate,void 0,void 0)))}));return void 0===w?u.set(f,new Map([[d,x]])):w.set(d,x),x.then((()=>{const t=l.get(f);void 0===t?l.set(f,new Set([d])):t.add(d)})).finally((()=>{const t=u.get(f);void 0!==t&&t.delete(d)})),x})(ve,Zt,(t=>e=>new Promise(((n,r)=>{if(null===t)return void r(new SyntaxError);const i=t.document.head;if(null===i)r(new SyntaxError);else{const o=t.document.createElement("script"),s=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(s),u=t.onerror,l=()=>{t.onerror=u,URL.revokeObjectURL(a)};t.onerror=(e,n,i,o,s)=>n===a||n===t.location.href&&1===i&&1===o?(l(),r(s),!1):null!==u?u(e,n,i,o,s):void 0,o.onerror=()=>{l(),r(new SyntaxError)},o.onload=()=>{l(),n()},o.src=a,o.type="module",i.appendChild(o)}})))(be),Qn,(t=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw t()})((()=>new DOMException("","AbortError"))),Te,tr,Oe,new WeakMap,new WeakMap,((t,e)=>async()=>{if(null===t)return!0;if(null===e)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new e(1,128,8e3),i=URL.createObjectURL(n);let o=!1,s=!1;try{await r.audioWorklet.addModule(i);const e=new t(r,"a",{numberOfOutputs:0}),n=r.createOscillator();e.port.onmessage=()=>o=!0,e.onprocessorerror=()=>s=!0,n.connect(e),await r.startRendering()}catch{}finally{URL.revokeObjectURL(i)}return o&&!s})(er,Ce),be):void 0,rr=((t,e)=>n=>t(n)||e(n))(Ie,Oe),ir=((t,e,n,r,i,o,s,a,u,l,c)=>(h,f)=>{const p=s(h)?h:o(h);if(i.has(f)){const t=n();return Promise.reject(t)}try{i.add(f)}catch{}return e(u,(()=>u(p)))?p.decodeAudioData(f).then((n=>(e(a,(()=>a(n)))||c(n),t.add(n),n))):new Promise(((e,n)=>{const i=async()=>{try{await(t=>{const{port1:e,port2:n}=new MessageChannel;return new Promise((r=>{n.onmessage=()=>{e.close(),n.close(),r()},e.postMessage(t,[t])}))})(f)}catch{}},o=t=>{n(t),i()};try{p.decodeAudioData(f,(n=>{"function"!=typeof n.copyFromChannel&&(l(n),M(n)),t.add(n),i().then((()=>e(n)))}),(t=>{o(null===t?r():t)}))}catch(t){o(t)}}))})(Fe,ve,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,Te,rr,P,It,qe,Be),or=((t,e,n,r,i,o,s,a,u,l,c,h,f,p,d,m,v,g,y,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 i(this)}createBuffer(t,e,r){return new n({length:e,numberOfChannels:t,sampleRate:r})}createBufferSource(){return new r(this)}createChannelMerger(t=6){return new o(this,{numberOfInputs:t})}createChannelSplitter(t=6){return new s(this,{numberOfOutputs:t})}createConstantSource(){return new a(this)}createConvolver(){return new u(this)}createDelay(t=1){return new c(this,{maxDelayTime:t})}createDynamicsCompressor(){return new h(this)}createGain(){return new f(this)}createIIRFilter(t,e){return new p(this,{feedback:e,feedforward:t})}createOscillator(){return new m(this)}createPanner(){return new v(this)}createPeriodicWave(t,e,n={disableNormalization:!1}){return new g(this,{...n,imag:e,real:t})}createStereoPanner(){return new y(this)}createWaveShaper(){return new b(this)}decodeAudioData(t,e,n){return l(this._nativeContext,t).then((t=>("function"==typeof e&&e(t),t))).catch((t=>{throw"function"==typeof n&&n(t),t}))}})(nr,je,Ue,Qe,nn,un,cn,dn,gn,ir,bn,xn,Tn,An,Mn,Rn,Bn,$n,Gn,Xn),sr=((t,e,n,r)=>class extends t{constructor(t,i){const o=n(t),s=e(o,i);if(r(o))throw TypeError();super(t,!0,s,null),this._nativeMediaElementAudioSourceNode=s}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(Ne,((t,e)=>t.createMediaElementSource(e.mediaElement)),Te,Oe),ar=((t,e,n,r)=>class extends t{constructor(t,i){const o=n(t);if(r(o))throw new TypeError;const s={...Pt,...i},a=e(o,s);super(t,!1,a,null),this._nativeMediaStreamAudioDestinationNode=a}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(Ne,((t,e)=>{const n=t.createMediaStreamDestination();return Nt(n,e),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),Te,Oe),ur=((t,e,n,r)=>class extends t{constructor(t,i){const o=n(t),s=e(o,i);if(r(o))throw new TypeError;super(t,!0,s,null),this._nativeMediaStreamAudioSourceNode=s}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(Ne,((t,{mediaStream:e})=>{const n=e.getAudioTracks();n.sort(((t,e)=>t.id<e.id?-1:t.id>e.id?1:0));const r=n.slice(0,1),i=t.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:e}),i}),Te,Oe),lr=((t,e)=>(n,{mediaStreamTrack:r})=>{if("function"==typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(r);const i=new MediaStream([r]),o=n.createMediaStreamSource(i);if("audio"!==r.kind)throw t();if(e(n))throw new TypeError;return o})(Ct,Oe),cr=((t,e,n)=>class extends t{constructor(t,r){const i=n(t);super(t,!0,e(i,r),null)}})(Ne,lr,Te),hr=((t,e,n,r,i,o,s,a,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 r();if(!B(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:o}=e;if(this._baseLatency="number"==typeof e.baseLatency?e.baseLatency:"balanced"===i?512/o:"interactive"===i||void 0===i?256/o:"playback"===i?1024/o:128*Math.max(2,Math.min(128,Math.round(i*o/128)))/o,this._nativeAudioContext=e,"webkitAudioContext"===u.name?(this._nativeGainNode=e.createGain(),this._nativeOscillatorNode=e.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(e.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),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().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),q(this)})))}createMediaElementSource(t){return new i(this,{mediaElement:t})}createMediaStreamDestination(){return new o(this)}createMediaStreamSource(t){return new s(this,{mediaStream:t})}createMediaStreamTrackSource(t){return new a(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}))}})(or,Ct,Zt,ee,sr,ar,ur,cr,Pe),fr=(t=>e=>{const n=t.get(e);if(void 0===n)throw new Error("The context has no set of AudioWorkletNodes.");return n})(In),pr=(t=>(e,n)=>{t(e).add(n)})(fr),dr=(t=>(e,n,r=0,i=0)=>{const o=e[r];if(void 0===o)throw t();return st(n)?o.connect(n,0,i):o.connect(n,0)})(I),mr=(t=>(e,n)=>{t(e).delete(n)})(fr),vr=(t=>(e,n,r,i=0)=>void 0===n?e.forEach((t=>t.disconnect())):"number"==typeof n?St(t,e,n).disconnect():st(n)?void 0===r?e.forEach((t=>t.disconnect(n))):void 0===i?St(t,e,r).disconnect(n,0):St(t,e,r).disconnect(n,0,i):void 0===r?e.forEach((t=>t.disconnect(n))):St(t,e,r).disconnect(n,0))(I),gr=new WeakMap,yr=((t,e)=>n=>e(t,n))(gr,_),br=((t,e,n,r,i,o,s,a,u,l,c,h,f)=>(p,m,v,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw u();const y=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(y.some((t=>t<1)))throw u();if(y.length!==g.numberOfOutputs)throw e();if("explicit"!==g.channelCountMode)throw u();const b=g.channelCount*g.numberOfInputs,_=y.reduce(((t,e)=>t+e),0),w=void 0===v.parameterDescriptors?0:v.parameterDescriptors.length;if(b+w>6||_>6)throw u();const x=new MessageChannel,S=[],T=[];for(let t=0;t<g.numberOfInputs;t+=1)S.push(s(p,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),T.push(i(p,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const k=[];if(void 0!==v.parameterDescriptors)for(const{defaultValue:t,maxValue:e,minValue:n,name:r}of v.parameterDescriptors){const i=o(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===t?0:t});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===t?0:t},maxValue:{get:()=>void 0===e?R:e},minValue:{get:()=>void 0===n?N:n}}),k.push(i)}const C=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,b+w)}),O=Lt(m,p.sampleRate),E=a(p,O,b+w,Math.max(1,_)),A=i(p,{channelCount:Math.max(1,_),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,_)}),P=[];for(let t=0;t<g.numberOfOutputs;t+=1)P.push(r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:y[t]}));for(let t=0;t<g.numberOfInputs;t+=1){S[t].connect(T[t]);for(let e=0;e<g.channelCount;e+=1)T[t].connect(C,e,t*g.channelCount+e)}const I=new ht(void 0===v.parameterDescriptors?[]:v.parameterDescriptors.map((({name:t},e)=>{const n=k[e];return n.connect(C,0,b+e),n.start(0),[t,n.offset]})));C.connect(E);let M=g.channelInterpretation,D=null;const j=0===g.numberOfOutputs?[E]:P,F={get bufferSize(){return O},get channelCount(){return g.channelCount},set channelCount(t){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(t){throw n()},get channelInterpretation(){return M},set channelInterpretation(t){for(const e of S)e.channelInterpretation=t;M=t},get context(){return E.context},get inputs(){return S},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return D},set onprocessorerror(t){"function"==typeof D&&F.removeEventListener("processorerror",D),D="function"==typeof t?t:null,"function"==typeof D&&F.addEventListener("processorerror",D)},get parameters(){return I},get port(){return x.port2},addEventListener:(...t)=>E.addEventListener(t[0],t[1],t[2]),connect:t.bind(null,j),disconnect:l.bind(null,j),dispatchEvent:(...t)=>E.dispatchEvent(t[0]),removeEventListener:(...t)=>E.removeEventListener(t[0],t[1],t[2])},V=new Map;var L,z;x.port1.addEventListener=(L=x.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=V.get(t[1]);void 0!==n?t[1]=n:(t[1]=t=>{c(p.currentTime,p.sampleRate,(()=>e(t)))},V.set(e,t[1]))}}return L.call(x.port1,t[0],t[1],t[2])}),x.port1.removeEventListener=(z=x.port1.removeEventListener,(...t)=>{if("message"===t[0]){const e=V.get(t[1]);void 0!==e&&(V.delete(t[1]),t[1]=e)}return z.call(x.port1,t[0],t[1],t[2])});let q=null;Object.defineProperty(x.port1,"onmessage",{get:()=>q,set:t=>{"function"==typeof q&&x.port1.removeEventListener("message",q),q="function"==typeof t?t:null,"function"==typeof q&&(x.port1.addEventListener("message",q),x.port1.start())}}),v.prototype.port=x.port1;let B=null;const U=((t,e,n,r)=>{let i=d.get(t);void 0===i&&(i=new WeakMap,d.set(t,i));const o=zt(n,r);return i.set(e,o),o})(p,F,v,g);U.then((t=>B=t));const $=mt(g.numberOfInputs,g.channelCount),W=mt(g.numberOfOutputs,y),H=void 0===v.parameterDescriptors?[]:v.parameterDescriptors.reduce(((t,{name:e})=>({...t,[e]:new Float32Array(128)})),{});let K=!0;const G=()=>{g.numberOfOutputs>0&&E.disconnect(A);for(let t=0,e=0;t<g.numberOfOutputs;t+=1){const n=P[t];for(let r=0;r<y[t];r+=1)A.disconnect(n,e+r,r);e+=y[t]}},Z=new Map;E.onaudioprocess=({inputBuffer:t,outputBuffer:e})=>{if(null!==B){const n=h(F);for(let r=0;r<O;r+=128){for(let e=0;e<g.numberOfInputs;e+=1)for(let n=0;n<g.channelCount;n+=1)pt(t,$[e],n,n,r);void 0!==v.parameterDescriptors&&v.parameterDescriptors.forEach((({name:e},n)=>{pt(t,H,e,b+n,r)}));for(let t=0;t<g.numberOfInputs;t+=1)for(let e=0;e<y[t];e+=1)0===W[t][e].byteLength&&(W[t][e]=new Float32Array(128));try{const t=$.map(((t,e)=>{if(n[e].size>0)return Z.set(e,O/128),t;const r=Z.get(e);return void 0===r?[]:(t.every((t=>t.every((t=>0===t))))&&(1===r?Z.delete(e):Z.set(e,r-1)),t)})),i=c(p.currentTime+r/p.sampleRate,p.sampleRate,(()=>B.process(t,W,H)));K=i;for(let t=0,n=0;t<g.numberOfOutputs;t+=1){for(let i=0;i<y[t];i+=1)dt(e,W[t],i,n+i,r);n+=y[t]}}catch(t){K=!1,F.dispatchEvent(new ErrorEvent("processorerror",{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message}))}if(!K){for(let t=0;t<g.numberOfInputs;t+=1){S[t].disconnect(T[t]);for(let e=0;e<g.channelCount;e+=1)T[r].disconnect(C,e,t*g.channelCount+e)}if(void 0!==v.parameterDescriptors){const t=v.parameterDescriptors.length;for(let e=0;e<t;e+=1){const t=k[e];t.disconnect(C,0,b+e),t.stop()}}C.disconnect(E),E.onaudioprocess=null,X?G():J();break}}}};let X=!1;const Y=s(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),Q=()=>E.connect(Y).connect(p.destination),J=()=>{E.disconnect(Y),Y.disconnect()};return Q(),f(F,(()=>{if(K){J(),g.numberOfOutputs>0&&E.connect(A);for(let t=0,e=0;t<g.numberOfOutputs;t+=1){const n=P[t];for(let r=0;r<y[t];r+=1)A.connect(n,e+r,r);e+=y[t]}}X=!0}),(()=>{K&&(Q(),G()),X=!1}))})(dr,I,Ct,sn,Bt,fn,Wt,Gt,Zt,vr,Qn,yr,rn),_r=((t,e,n,r,i)=>(o,s,a,u,l,c)=>{if(null!==a)try{const e=new a(o,u,c),r=new Map;let s=null;if(Object.defineProperties(e,{channelCount:{get:()=>c.channelCount,set:()=>{throw t()}},channelCountMode:{get:()=>"explicit",set:()=>{throw t()}},onprocessorerror:{get:()=>s,set:t=>{"function"==typeof s&&e.removeEventListener("processorerror",s),s="function"==typeof t?t:null,"function"==typeof s&&e.addEventListener("processorerror",s)}}}),e.addEventListener=(f=e.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=>{"error"===n.type?(Object.defineProperties(n,{type:{value:"processorerror"}}),e(n)):e(new ErrorEvent(t[0],{...n}))},r.set(e,t[1]))}}return f.call(e,"error",t[1],t[2]),f.call(e,...t)}),e.removeEventListener=(h=e.removeEventListener,(...t)=>{if("processorerror"===t[0]){const e=r.get(t[1]);void 0!==e&&(r.delete(t[1]),t[1]=e)}return h.call(e,"error",t[1],t[2]),h.call(e,t[0],t[1],t[2])}),0!==c.numberOfOutputs){const t=n(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});e.connect(t).connect(o.destination);return i(e,(()=>t.disconnect()),(()=>t.connect(o.destination)))}return e}catch(t){if(11===t.code)throw r();throw t}var h,f;if(void 0===l)throw r();return(t=>{const{port1:e}=new MessageChannel;try{e.postMessage(t)}finally{e.close()}})(c),e(o,s,l,c)})(Ct,br,Wt,Zt,rn),wr=((t,e,n,r,i,o,s,a,u,l,c,h,f,p,d,m)=>(v,g,y)=>{const b=new WeakMap;let _=null;return{render(w,x,S){a(x,w);const T=b.get(x);return void 0!==T?Promise.resolve(T):(async(a,w,x)=>{let S=c(a),T=null;const k=A(S,w),C=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(null===h){const t=C.reduce(((t,e)=>t+e),0),n=i(w,{channelCount:Math.max(1,t),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,t)}),o=[];for(let t=0;t<a.numberOfOutputs;t+=1)o.push(r(w,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:C[t]}));const l=s(w,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1});l.connect=e.bind(null,o),l.disconnect=u.bind(null,o),T=[n,o,l]}else k||(S=new h(w,v));if(b.set(w,null===T?S:T[2]),null!==T){if(null===_){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===f)throw new Error("Missing the native OfflineAudioContext constructor.");const t=a.channelCount*a.numberOfInputs,e=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=t+e,u=async()=>{const u=new f(n,128*Math.ceil(a.context.length/128),w.sampleRate),l=[],c=[];for(let t=0;t<g.numberOfInputs;t+=1)l.push(s(u,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),c.push(i(u,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const h=await Promise.all(Array.from(a.parameters.values()).map((async t=>{const e=o(u,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:t.value});return await p(u,t,e.offset,x),e}))),v=r(u,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,t+e)});for(let t=0;t<g.numberOfInputs;t+=1){l[t].connect(c[t]);for(let e=0;e<g.channelCount;e+=1)c[t].connect(v,e,t*g.channelCount+e)}for(const[e,n]of h.entries())n.connect(v,0,t+e),n.start(0);return v.connect(u.destination),await Promise.all(l.map((t=>d(a,u,t,x)))),m(u)};_=vt(a,0===n?null:await u(),w,g,C,y,l)}const t=await _,e=n(w,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[u,c,h]=T;null!==t&&(e.buffer=t,e.start(0)),e.connect(u);for(let t=0,e=0;t<a.numberOfOutputs;t+=1){const n=c[t];for(let r=0;r<C[t];r+=1)u.connect(n,e+r,r);e+=C[t]}return h}if(k)for(const[e,n]of a.parameters.entries())await t(w,n,S.parameters.get(e),x);else for(const[t,e]of a.parameters.entries())await p(w,e,S.parameters.get(t),x);return await d(a,w,S,x),S})(w,x,S)}}})(He,dr,Ke,sn,Bt,fn,Wt,mr,vr,Qn,tt,er,Ce,Ge,xe,Cn),xr=(t=>e=>t.get(e))(Jn),Sr=(t=>(e,n)=>{t.set(e,n)})(gr),Tr=Yn?((t,e,n,r,i,o,s,a,u,l,c,h,f)=>class extends e{constructor(e,f,d){var m;const v=a(e),g=u(v),y=c({...ft,...d}),b=p.get(v),_=null==b?void 0:b.get(f),w=g||"closed"!==v.state?v:null!==(m=s(v))&&void 0!==m?m:v,x=i(w,g?null:e.baseLatency,l,f,_,y);super(e,!0,x,g?r(f,y,_):null);const S=[];x.parameters.forEach(((t,e)=>{const r=n(this,g,t);S.push([e,r])})),this._nativeAudioWorkletNode=x,this._onprocessorerror=null,this._parameters=new ht(S),g&&t(v,this);const{activeInputs:T}=o(this);h(x,T)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(t){const e="function"==typeof t?f(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}})(pr,Ne,Xe,wr,_r,V,xr,Te,Oe,er,(t=>({...t,outputChannelCount:void 0!==t.outputChannelCount?t.outputChannelCount:1===t.numberOfInputs&&1===t.numberOfOutputs?[t.channelCount]:Array.from({length:t.numberOfOutputs},(()=>1))})),Sr,ce):void 0,kr=(((t,e,n,r,i)=>{})(Ct,Zt,ee,Mn,Pe),((t,e)=>(n,r,i)=>{if(null===e)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(n,r,i)}catch(e){if("SyntaxError"===e.name)throw t();throw e}})(Zt,Ce)),Cr=((t,e,n,r,i,o,s,a)=>{const u=[];return(l,c)=>n(l).render(l,c,u).then((()=>Promise.all(Array.from(r(c)).map((t=>n(t).render(t,c,u)))))).then((()=>i(c))).then((n=>("function"!=typeof n.copyFromChannel?(s(n),M(n)):e(o,(()=>o(n)))||a(n),t.add(n),n)))})(Fe,ve,we,fr,Cn,P,qe,Be),Or=(((t,e,n,r,i)=>{})(ve,Ct,kr,Mn,Cr),((t,e,n,r,i)=>class extends t{constructor(t,n,i){let o;if("number"==typeof t&&void 0!==n&&void 0!==i)o={length:n,numberOfChannels:t,sampleRate:i};else{if("object"!=typeof t)throw new Error("The given parameters are not valid.");o=t}const{length:s,numberOfChannels:a,sampleRate:u}={...Xt,...o},l=r(a,s,u);e(It,(()=>It(l)))||l.addEventListener("statechange",(()=>{let t=0;const e=n=>{"running"===this._state&&(t>0?(l.removeEventListener("statechange",e),n.stopImmediatePropagation(),this._waitForThePromiseToSettle(n)):t+=1)};return e})()),super(l,a),this._length=s,this._nativeOfflineAudioContext=l,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",i(this.destination,this._nativeOfflineAudioContext).finally((()=>{this._state=null,q(this)})))}_waitForThePromiseToSettle(t){null===this._state?this._nativeOfflineAudioContext.dispatchEvent(t):setTimeout((()=>this._waitForThePromiseToSettle(t)))}})(or,ve,Ct,kr,Cr)),Er=((t,e)=>n=>{const r=t.get(n);return e(r)||e(n)})(c,Ie),Ar=((t,e)=>n=>t.has(n)||e(n))(a,Me),Pr=((t,e)=>n=>t.has(n)||e(n))(l,De),Ir=((t,e)=>n=>{const r=t.get(n);return e(r)||e(n)})(c,Oe);function Mr(t,e){if(!t)throw new Error(e)}function Dr(t,e,n=1/0){if(!(e<=t&&t<=n))throw new RangeError(`Value must be within [${e}, ${n}], got: ${t}`)}function Nr(t){t.isOffline||"running"===t.state||jr('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Rr=console;function jr(...t){Rr.warn(...t)}function Fr(t){return void 0===t}function Vr(t){return!Fr(t)}function Lr(t){return"number"==typeof t}function zr(t){return"[object Object]"===Object.prototype.toString.call(t)&&t.constructor===Object}function qr(t){return"boolean"==typeof t}function Br(t){return Array.isArray(t)}function Ur(t){return"string"==typeof t}function $r(t){return Ur(t)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(t)}const Wr="object"==typeof self?self:null,Hr=Wr&&(Wr.hasOwnProperty("AudioContext")||Wr.hasOwnProperty("webkitAudioContext"));function Kr(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function Gr(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}Object.create;Object.create;class Zr{constructor(t,e,n){this._callback=t,this._type=e,this._updateInterval=n,this._createClock()}_createWorker(){const 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}_createTimeout(){this._timeout=setTimeout((()=>{this._createTimeout(),this._callback()}),1e3*this._updateInterval)}_createClock(){if("worker"===this._type)try{this._createWorker()}catch(t){this._type="timeout",this._createClock()}else"timeout"===this._type&&this._createTimeout()}_disposeClock(){this._timeout&&(clearTimeout(this._timeout),this._timeout=0),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(t){this._updateInterval=Math.max(t,128/44100),"worker"===this._type&&this._worker.postMessage(Math.max(1e3*t,1))}get type(){return this._type}set type(t){this._disposeClock(),this._type=t,this._createClock()}dispose(){this._disposeClock()}}function Xr(t){return Pr(t)}function Yr(t){return Ar(t)}function Qr(t){return Ir(t)}function Jr(t){return Er(t)}function ti(t){return t instanceof AudioBuffer}function ei(t,e){return"value"===t||Xr(e)||Yr(e)||ti(e)}function ni(t,...e){if(!e.length)return t;const n=e.shift();if(zr(t)&&zr(n))for(const e in n)ei(e,n[e])?t[e]=n[e]:zr(n[e])?(t[e]||Object.assign(t,{[e]:{}}),ni(t[e],n[e])):Object.assign(t,{[e]:n[e]});return ni(t,...e)}function ri(t,e,n=[],r){const i={},o=Array.from(e);if(zr(o[0])&&r&&!Reflect.has(o[0],r)){Object.keys(o[0]).some((e=>Reflect.has(t,e)))||(ni(i,{[r]:o[0]}),n.splice(n.indexOf(r),1),o.shift())}if(1===o.length&&zr(o[0]))ni(i,o[0]);else for(let t=0;t<n.length;t++)Vr(o[t])&&(i[n[t]]=o[t]);return ni(t,i)}function ii(t,e){return Fr(t)?e:t}function oi(t,e){return e.forEach((e=>{Reflect.has(t,e)&&delete t[e]})),t}class si{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...t){(this.debug||Wr&&this.toString()===Wr.TONE_DEBUG_CLASS)&&function(...t){Rr.log(...t)}(this,...t)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}si.version=r;const ai=1e-6;function ui(t,e){return t>e+ai}function li(t,e){return ui(t,e)||hi(t,e)}function ci(t,e){return t+ai<e}function hi(t,e){return Math.abs(t-e)<ai}class fi extends si{constructor(){super(),this.name="Timeline",this._timeline=[];const t=ri(fi.getDefaults(),arguments,["memory"]);this.memory=t.memory,this.increasing=t.increasing}static getDefaults(){return{memory:1/0,increasing:!1}}get length(){return this._timeline.length}add(t){if(Mr(Reflect.has(t,"time"),"Timeline: events must have a time attribute"),t.time=t.time.valueOf(),this.increasing&&this.length){const e=this._timeline[this.length-1];Mr(li(t.time,e.time),"The time must be greater than or equal to the last scheduled time"),this._timeline.push(t)}else{const e=this._search(t.time);this._timeline.splice(e+1,0,t)}if(this.length>this.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(t){const e=this._timeline.indexOf(t);return-1!==e&&this._timeline.splice(e,1),this}get(t,e="time"){const n=this._search(t,e);return-1!==n?this._timeline[n]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(t,e="time"){const n=this._search(t,e);return n+1<this._timeline.length?this._timeline[n+1]:null}getBefore(t){const e=this._timeline.length;if(e>0&&this._timeline[e-1].time<t)return this._timeline[e-1];const n=this._search(t);return n-1>=0?this._timeline[n-1]:null}cancel(t){if(this._timeline.length>1){let e=this._search(t);if(e>=0)if(hi(this._timeline[e].time,t)){for(let n=e;n>=0&&hi(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&&li(this._timeline[0].time,t)&&(this._timeline=[]);return this}cancelBefore(t){const e=this._search(t);return e>=0&&(this._timeline=this._timeline.slice(e+1)),this}previousEvent(t){const e=this._timeline.indexOf(t);return e>0?this._timeline[e-1]:null}_search(t,e="time"){if(0===this._timeline.length)return-1;let n=0;const r=this._timeline.length;let i=r;if(r>0&&this._timeline[r-1][e]<=t)return r-1;for(;n<i;){let r=Math.floor(n+(i-n)/2);const o=this._timeline[r],s=this._timeline[r+1];if(hi(o[e],t)){for(let n=r;n<this._timeline.length;n++){if(!hi(this._timeline[n][e],t))break;r=n}return r}if(ci(o[e],t)&&ui(s[e],t))return r;ui(o[e],t)?i=r:n=r+1}return-1}_iterate(t,e=0,n=this._timeline.length-1){this._timeline.slice(e,n+1).forEach(t)}forEach(t){return this._iterate(t),this}forEachBefore(t,e){const n=this._search(t);return-1!==n&&this._iterate(e,0,n),this}forEachAfter(t,e){const n=this._search(t);return this._iterate(e,n+1),this}forEachBetween(t,e,n){let r=this._search(t),i=this._search(e);return-1!==r&&-1!==i?(this._timeline[r].time!==t&&(r+=1),this._timeline[i].time===e&&(i-=1),this._iterate(n,r,i)):-1===r&&this._iterate(n,0,i),this}forEachFrom(t,e){let n=this._search(t);for(;n>=0&&this._timeline[n].time>=t;)n--;return this._iterate(e,n+1),this}forEachAtTime(t,e){const n=this._search(t);if(-1!==n&&hi(this._timeline[n].time,t)){let r=n;for(let e=n;e>=0&&hi(this._timeline[e].time,t);e--)r=e;this._iterate((t=>{e(t)}),r,n)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const pi=[];function di(t){pi.push(t)}const mi=[];function vi(t){mi.push(t)}class gi extends si{constructor(){super(...arguments),this.name="Emitter"}on(t,e){return t.split(/\W+/).forEach((t=>{Fr(this._events)&&(this._events={}),this._events.hasOwnProperty(t)||(this._events[t]=[]),this._events[t].push(e)})),this}once(t,e){const n=(...r)=>{e(...r),this.off(t,n)};return this.on(t,n),this}off(t,e){return t.split(/\W+/).forEach((n=>{if(Fr(this._events)&&(this._events={}),this._events.hasOwnProperty(t))if(Fr(e))this._events[t]=[];else{const n=this._events[t];for(let t=n.length-1;t>=0;t--)n[t]===e&&n.splice(t,1)}})),this}emit(t,...e){if(this._events&&this._events.hasOwnProperty(t)){const n=this._events[t].slice(0);for(let t=0,r=n.length;t<r;t++)n[t].apply(this,e)}return this}static mixin(t){["on","once","off","emit"].forEach((e=>{const n=Object.getOwnPropertyDescriptor(gi.prototype,e);Object.defineProperty(t.prototype,e,n)}))}dispose(){return super.dispose(),this._events=void 0,this}}class yi extends gi{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class bi extends yi{constructor(){super(),this.name="Context",this._constants=new Map,this._timeouts=new fi,this._timeoutIds=0,this._initialized=!1,this.isOffline=!1,this._workletModules=new Map;const t=ri(bi.getDefaults(),arguments,["context"]);t.context?this._context=t.context:this._context=function(t){return new hr(t)}({latencyHint:t.latencyHint}),this._ticker=new Zr(this.emit.bind(this,"tick"),t.clockSource,t.updateInterval),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this._setLatencyHint(t.latencyHint),this.lookAhead=t.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){var t;return this._initialized||(t=this,pi.forEach((e=>e(t))),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(t,e,n){return this._context.createBuffer(t,e,n)}createChannelMerger(t){return this._context.createChannelMerger(t)}createChannelSplitter(t){return this._context.createChannelSplitter(t)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(t){return this._context.createDelay(t)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(t,e){return this._context.createIIRFilter(t,e)}createPanner(){return this._context.createPanner()}createPeriodicWave(t,e,n){return this._context.createPeriodicWave(t,e,n)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(t){Mr(Jr(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamSource(t)}createMediaElementSource(t){Mr(Jr(this._context),"Not available if OfflineAudioContext");return this._context.createMediaElementSource(t)}createMediaStreamDestination(){Mr(Jr(this._context),"Not available if OfflineAudioContext");return this._context.createMediaStreamDestination()}decodeAudioData(t){return this._context.decodeAudioData(t)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(t){Mr(!this._initialized,"The listener cannot be set after initialization."),this._listener=t}get transport(){return this.initialize(),this._transport}set transport(t){Mr(!this._initialized,"The transport cannot be set after initialization."),this._transport=t}get draw(){return this.initialize(),this._draw}set draw(t){Mr(!this._initialized,"Draw cannot be set after initialization."),this._draw=t}get destination(){return this.initialize(),this._destination}set destination(t){Mr(!this._initialized,"The destination cannot be set after initialization."),this._destination=t}createAudioWorkletNode(t,e){return function(t,e,n){return Mr(Vr(Tr),"This node only works in a secure context (https or localhost)"),new Tr(t,e,n)}(this.rawContext,t,e)}addAudioWorkletModule(t,e){return Gr(this,void 0,void 0,(function*(){Mr(Vr(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)),yield this._workletModules.get(e)}))}workletsAreReady(){return Gr(this,void 0,void 0,(function*(){const t=[];this._workletModules.forEach((e=>t.push(e))),yield Promise.all(t)}))}get updateInterval(){return this._ticker.updateInterval}set updateInterval(t){this._ticker.updateInterval=t}get clockSource(){return this._ticker.type}set clockSource(t){this._ticker.type=t}get latencyHint(){return this._latencyHint}_setLatencyHint(t){let e=0;if(this._latencyHint=t,Ur(t))switch(t){case"interactive":e=.1;break;case"playback":e=.5;break;case"balanced":e=.25}this.lookAhead=e,this.updateInterval=e/2}get rawContext(){return this._context}now(){return this._context.currentTime+this.lookAhead}immediate(){return this._context.currentTime}resume(){return Jr(this._context)?this._context.resume():Promise.resolve()}close(){return Gr(this,void 0,void 0,(function*(){var t;Jr(this._context)&&(yield this._context.close()),this._initialized&&(t=this,mi.forEach((e=>e(t))))}))}getConstant(t){if(this._constants.has(t))return this._constants.get(t);{const e=this._context.createBuffer(1,128,this._context.sampleRate),n=e.getChannelData(0);for(let e=0;e<n.length;e++)n[e]=t;const r=this._context.createBufferSource();return r.channelCount=1,r.channelCountMode="explicit",r.buffer=e,r.loop=!0,r.start(0),this._constants.set(t,r),r}}dispose(){return super.dispose(),this._ticker.dispose(),this._timeouts.dispose(),Object.keys(this._constants).map((t=>this._constants[t].disconnect())),this}_timeoutLoop(){const t=this.now();let e=this._timeouts.peek();for(;this._timeouts.length&&e&&e.time<=t;)e.callback(),this._timeouts.shift(),e=this._timeouts.peek()}setTimeout(t,e){this._timeoutIds++;const n=this.now();return this._timeouts.add({callback:t,id:this._timeoutIds,time:n+e}),this._timeoutIds}clearTimeout(t){return this._timeouts.forEach((e=>{e.id===t&&this._timeouts.remove(e)})),this}clearInterval(t){return this.clearTimeout(t)}setInterval(t,e){const n=++this._timeoutIds,r=()=>{const i=this.now();this._timeouts.add({callback:()=>{t(),r()},id:n,time:i+e})};return r(),n}}function _i(t,e){Br(e)?e.forEach((e=>_i(t,e))):Object.defineProperty(t,e,{enumerable:!0,writable:!1})}function wi(t,e){Br(e)?e.forEach((e=>wi(t,e))):Object.defineProperty(t,e,{writable:!0})}const xi=()=>{};class Si extends si{constructor(){super(),this.name="ToneAudioBuffer",this.onload=xi;const t=ri(Si.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=t.reverse,this.onload=t.onload,t.url&&ti(t.url)||t.url instanceof Si?this.set(t.url):Ur(t.url)&&this.load(t.url).catch(t.onerror)}static getDefaults(){return{onerror:xi,onload:xi,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:Oi().sampleRate}set(t){return t instanceof Si?t.loaded?this._buffer=t.get():t.onload=()=>{this.set(t),this.onload(this)}:this._buffer=t,this._reversed&&this._reverse(),this}get(){return this._buffer}load(t){return Gr(this,void 0,void 0,(function*(){const e=Si.load(t).then((t=>{this.set(t),this.onload(this)}));Si.downloads.push(e);try{yield e}finally{const t=Si.downloads.indexOf(e);Si.downloads.splice(t,1)}return this}))}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(t){const e=Br(t)&&t[0].length>0,n=e?t.length:1,r=e?t[0].length:t.length,i=Oi(),o=i.createBuffer(n,r,i.sampleRate),s=e||1!==n?t:[t];for(let t=0;t<n;t++)o.copyToChannel(s[t],t);return this._buffer=o,this}toMono(t){if(Lr(t))this.fromArray(this.toArray(t));else{let t=new Float32Array(this.length);const e=this.numberOfChannels;for(let n=0;n<e;n++){const e=this.toArray(n);for(let n=0;n<e.length;n++)t[n]+=e[n]}t=t.map((t=>t/e)),this.fromArray(t)}return this}toArray(t){if(Lr(t))return this.getChannelData(t);if(1===this.numberOfChannels)return this.toArray(0);{const t=[];for(let e=0;e<this.numberOfChannels;e++)t[e]=this.getChannelData(e);return t}}getChannelData(t){return this._buffer?this._buffer.getChannelData(t):new Float32Array(0)}slice(t,e=this.duration){const n=Math.floor(t*this.sampleRate),r=Math.floor(e*this.sampleRate);Mr(n<r,"The start time must be less than the end time");const i=r-n,o=Oi().createBuffer(this.numberOfChannels,i,this.sampleRate);for(let t=0;t<this.numberOfChannels;t++)o.copyToChannel(this.getChannelData(t).subarray(n,r),t);return new Si(o)}_reverse(){if(this.loaded)for(let t=0;t<this.numberOfChannels;t++)this.getChannelData(t).reverse();return this}get loaded(){return this.length>0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(t){this._reversed!==t&&(this._reversed=t,this._reverse())}static fromArray(t){return(new Si).fromArray(t)}static fromUrl(t){return Gr(this,void 0,void 0,(function*(){const e=new Si;return yield e.load(t)}))}static load(t){return Gr(this,void 0,void 0,(function*(){const e=t.match(/\[([^\]\[]+\|.+)\]$/);if(e){const n=e[1].split("|");let r=n[0];for(const t of n)if(Si.supportsType(t)){r=t;break}t=t.replace(e[0],r)}const n=""===Si.baseUrl||Si.baseUrl.endsWith("/")?Si.baseUrl:Si.baseUrl+"/",r=yield fetch(n+t);if(!r.ok)throw new Error(`could not load url: ${t}`);const i=yield r.arrayBuffer();return yield Oi().decodeAudioData(i)}))}static supportsType(t){const e=t.split("."),n=e[e.length-1];return""!==document.createElement("audio").canPlayType("audio/"+n)}static loaded(){return Gr(this,void 0,void 0,(function*(){for(yield Promise.resolve();Si.downloads.length;)yield Si.downloads[0]}))}}Si.baseUrl="",Si.downloads=[];class Ti extends bi{constructor(){var t,e,n;super({clockSource:"offline",context:Qr(arguments[0])?arguments[0]:(t=arguments[0],e=arguments[1]*arguments[2],n=arguments[2],new Or(t,e,n)),lookAhead:0,updateInterval:Qr(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=Qr(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(t){return Gr(this,void 0,void 0,(function*(){let e=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,e++;const n=Math.floor(this.sampleRate/128);t&&e%n==0&&(yield new Promise((t=>setTimeout(t,1))))}}))}render(t=!0){return Gr(this,void 0,void 0,(function*(){yield this.workletsAreReady(),yield this._renderClock(t);const e=yield this._context.startRendering();return new Si(e)}))}close(){return Promise.resolve()}}const ki=new class extends yi{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(t,e,n){return{}}createChannelMerger(t){return{}}createChannelSplitter(t){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(t){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(t,e){return{}}createPanner(){return{}}createPeriodicWave(t,e,n){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(t){return{}}createMediaElementSource(t){return{}}createMediaStreamDestination(){return{}}decodeAudioData(t){return Promise.resolve({})}createAudioWorkletNode(t,e){return{}}get rawContext(){return{}}addAudioWorkletModule(t,e){return Gr(this,void 0,void 0,(function*(){return Promise.resolve()}))}resume(){return Promise.resolve()}setTimeout(t,e){return 0}clearTimeout(t){return this}setInterval(t,e){return 0}clearInterval(t){return this}getConstant(t){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(t){}get destination(){return{}}set destination(t){}now(){return 0}immediate(){return 0}};let Ci=ki;function Oi(){return Ci===ki&&Hr&&function(t){Ci=Jr(t)?new bi(t):Qr(t)?new Ti(t):t}(new bi),Ci}if(Wr&&!Wr.TONE_SILENCE_LOGGING){let t="v";0;const e=` * Tone.js ${t}14.7.77 * `;console.log(`%c${e}`,"background: #000; color: #fff")}function Ei(t){return Math.pow(2,t/12)}let Ai=440;function Pi(t){return Math.round(Ii(t))}function Ii(t){return 69+12*Math.log2(t/Ai)}class Mi extends si{constructor(t,e,n){super(),this.defaultUnits="s",this._val=e,this._units=n,this.context=t,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:t=>this._frequencyToUnits(parseFloat(t)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:t=>this._ticksToUnits(parseInt(t,10)),regexp:/^(\d+)i$/i},m:{method:t=>this._beatsToUnits(parseInt(t,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(t,e)=>{const n=parseInt(t,10),r="."===e?1.5:1;return 1===n?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/n)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:t=>this._expressions[this.defaultUnits].method.call(this,t),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:t=>this._secondsToUnits(parseFloat(t)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:t=>parseInt(t,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:t=>{const e=parseInt(t,10);return this._beatsToUnits(8/(3*Math.floor(e)))},regexp:/^(\d+)t$/i},tr:{method:(t,e,n)=>{let r=0;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},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof Mi&&this.fromType(this._val),Fr(this._val))return this._noArg();if(Ur(this._val)&&Fr(this._units)){for(const t in this._expressions)if(this._expressions[t].regexp.test(this._val.trim())){this._units=t;break}}else if(zr(this._val)){let t=0;for(const e in this._val)if(Vr(this._val[e])){const n=this._val[e];t+=new this.constructor(this.context,e).valueOf()*n}return t}if(Vr(this._units)){const t=this._expressions[this._units],e=this._val.toString().trim().match(t.regexp);return e?t.method.apply(this,e.slice(1)):t.method.call(this,this._val)}return Ur(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(t){return 1/t}_beatsToUnits(t){return 60/this._getBpm()*t}_secondsToUnits(t){return t}_ticksToUnits(t){return t*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(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}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return 1e3*this.toSeconds()}}class Di extends Mi{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:t=>this._now()+new this.constructor(this.context,t).valueOf(),regexp:/^\+(.+)/},quantize:{method:t=>{const e=new Di(this.context,t).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(e))},regexp:/^@(.+)/}})}quantize(t,e=1){const n=new this.constructor(this.context,t).valueOf(),r=this.valueOf();return r+(Math.round(r/n)*n-r)*e}toNotation(){const t=this.toSeconds(),e=["1m"];for(let t=1;t<9;t++){const n=Math.pow(2,t);e.push(n+"n."),e.push(n+"n"),e.push(n+"t")}e.push("0");let n=e[0],r=new Di(this.context,e[0]).toSeconds();return e.forEach((e=>{const i=new Di(this.context,e).toSeconds();Math.abs(i-t)<Math.abs(r-t)&&(n=e,r=i)})),n}toBarsBeatsSixteenths(){const t=this._beatsToUnits(1);let e=this.valueOf()/t;e=parseFloat(e.toFixed(4));const n=Math.floor(e/this._getTimeSignature());let r=e%1*4;e=Math.floor(e)%this._getTimeSignature();const i=r.toString();i.length>3&&(r=parseFloat(parseFloat(i).toFixed(3)));return[n,e,r].join(":")}toTicks(){const t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.round(e*this._getPPQ())}toSeconds(){return this.valueOf()}toMidi(){return Pi(this.toFrequency())}_now(){return this.context.now()}}function Ni(t,e){return new Di(Oi(),t,e)}class Ri extends Di{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return Ai}static set A4(t){!function(t){Ai=t}(t)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(t){return"midi"===this.defaultUnits?t:Ri.mtof(t)}},note:{regexp:/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i,method(t,e){const n=ji[t.toLowerCase()]+12*(parseInt(e,10)+1);return"midi"===this.defaultUnits?n:Ri.mtof(n)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(t,e,n){let 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}}})}transpose(t){return new Ri(this.context,this.valueOf()*Ei(t))}harmonize(t){return t.map((t=>this.transpose(t)))}toMidi(){return Pi(this.valueOf())}toNote(){const t=this.toFrequency(),e=Math.log2(t/Ri.A4);let n=Math.round(12*e)+57;const r=Math.floor(n/12);r<0&&(n+=-12*r);return Fi[n%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const t=this._beatsToUnits(1),e=this.valueOf()/t;return Math.floor(e*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(t){return t}_ticksToUnits(t){return 1/(60*t/(this._getBpm()*this._getPPQ()))}_beatsToUnits(t){return 1/super._beatsToUnits(t)}_secondsToUnits(t){return 1/t}static mtof(t){return function(t){return Ai*Math.pow(2,(t-69)/12)}(t)}static ftom(t){return Pi(t)}}const ji={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},Fi=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Vi extends Di{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class Li extends si{constructor(){super();const t=ri(Li.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=t.context}static getDefaults(){return{context:Oi()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(t){return new Di(this.context,t).toSeconds()}toFrequency(t){return new Ri(this.context,t).toFrequency()}toTicks(t){return new Vi(this.context,t).toTicks()}_getPartialProperties(t){const e=this.get();return Object.keys(e).forEach((n=>{Fr(t[n])&&delete e[n]})),e}get(){const t=this.constructor.getDefaults();return Object.keys(t).forEach((e=>{if(Reflect.has(this,e)){const n=this[e];Vr(n)&&Vr(n.value)&&Vr(n.setValueAtTime)?t[e]=n.value:n instanceof Li?t[e]=n._getPartialProperties(t[e]):Br(n)||Lr(n)||Ur(n)||qr(n)?t[e]=n:delete t[e]}})),t}set(t){return Object.keys(t).forEach((e=>{Reflect.has(this,e)&&Vr(this[e])&&(this[e]&&Vr(this[e].value)&&Vr(this[e].setValueAtTime)?this[e].value!==t[e]&&(this[e].value=t[e]):this[e]instanceof Li?this[e].set(t[e]):this[e]=t[e])})),this}}class zi extends fi{constructor(t="stopped"){super(),this.name="StateTimeline",this._initial=t,this.setStateAtTime(this._initial,0)}getValueAtTime(t){const e=this.get(t);return null!==e?e.state:this._initial}setStateAtTime(t,e,n){return Dr(e,0),this.add(Object.assign({},n,{state:t,time:e})),this}getLastState(t,e){for(let n=this._search(e);n>=0;n--){const e=this._timeline[n];if(e.state===t)return e}}getNextState(t,e){const n=this._search(e);if(-1!==n)for(let e=n;e<this._timeline.length;e++){const n=this._timeline[e];if(n.state===t)return n}}}class qi extends Li{constructor(){super(ri(qi.getDefaults(),arguments,["param","units","convert"])),this.name="Param",this.overridden=!1,this._minOutput=1e-7;const t=ri(qi.getDefaults(),arguments,["param","units","convert"]);for(Mr(Vr(t.param)&&(Xr(t.param)||t.param instanceof qi),"param must be an AudioParam");!Xr(t.param);)t.param=t.param._param;this._swappable=!!Vr(t.swappable)&&t.swappable,this._swappable?(this.input=this.context.createGain(),this._param=t.param,this.input.connect(this._param)):this._param=this.input=t.param,this._events=new fi(1e3),this._initialValue=this._param.defaultValue,this.units=t.units,this.convert=t.convert,this._minValue=t.minValue,this._maxValue=t.maxValue,Vr(t.value)&&t.value!==this._toType(this._initialValue)&&this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(Li.getDefaults(),{convert:!0,units:"number"})}get value(){const t=this.now();return this.getValueAtTime(t)}set value(t){this.cancelScheduledValues(this.now()),this.setValueAtTime(t,this.now())}get minValue(){return Vr(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}get maxValue(){return Vr(this._maxValue)?this._maxValue:"normalRange"===this.units||"audioRange"===this.units?1:this._param.maxValue}_is(t,e){return this.units===e}_assertRange(t){return Vr(this.maxValue)&&Vr(this.minValue)&&Dr(t,this._fromType(this.minValue),this._fromType(this.maxValue)),t}_fromType(t){return this.convert&&!this.overridden?this._is(t,"time")?this.toSeconds(t):this._is(t,"decibels")?(e=t,Math.pow(10,e/20)):this._is(t,"frequency")?this.toFrequency(t):t:this.overridden?0:t;var e}_toType(t){return this.convert&&"decibels"===this.units?(e=t,Math.log(e)/Math.LN10*20):t;var e}setValueAtTime(t,e){const n=this.toSeconds(e),r=this._fromType(t);return Mr(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}getValueAtTime(t){const e=Math.max(this.toSeconds(t),0),n=this._events.getAfter(e),r=this._events.get(e);let i=this._initialValue;if(null===r)i=this._initialValue;else if("setTargetAtTime"!==r.type||null!==n&&"setValueAtTime"!==n.type)if(null===n)i=r.value;else if("linearRampToValueAtTime"===n.type||"exponentialRampToValueAtTime"===n.type){let t=r.value;if("setTargetAtTime"===r.type){const e=this._events.getBefore(r.time);t=null===e?this._initialValue:e.value}i="linearRampToValueAtTime"===n.type?this._linearInterpolate(r.time,t,n.time,n.value,e):this._exponentialInterpolate(r.time,t,n.time,n.value,e)}else i=r.value;else{const t=this._events.getBefore(r.time);let n;n=null===t?this._initialValue:t.value,"setTargetAtTime"===r.type&&(i=this._exponentialApproach(r.time,n,r.value,r.constant,e))}return this._toType(i)}setRampPoint(t){t=this.toSeconds(t);let e=this.getValueAtTime(t);return this.cancelAndHoldAtTime(t),0===this._fromType(e)&&(e=this._toType(this._minOutput)),this.setValueAtTime(e,t),this}linearRampToValueAtTime(t,e){const n=this._fromType(t),r=this.toSeconds(e);return Mr(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}exponentialRampToValueAtTime(t,e){let n=this._fromType(t);n=hi(n,0)?this._minOutput:n,this._assertRange(n);const r=this.toSeconds(e);return Mr(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}exponentialRampTo(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialRampToValueAtTime(t,n+this.toSeconds(e)),this}linearRampTo(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.linearRampToValueAtTime(t,n+this.toSeconds(e)),this}targetRampTo(t,e,n){return n=this.toSeconds(n),this.setRampPoint(n),this.exponentialApproachValueAtTime(t,n,e),this}exponentialApproachValueAtTime(t,e,n){e=this.toSeconds(e),n=this.toSeconds(n);const 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}setTargetAtTime(t,e,n){const r=this._fromType(t);Mr(isFinite(n)&&n>0,"timeConstant must be a number greater than 0");const i=this.toSeconds(e);return this._assertRange(r),Mr(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(t)}, ${JSON.stringify(e)}`),this._events.add({constant:n,time:i,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",t,i,n),this._param.setTargetAtTime(r,i,n),this}setValueCurveAtTime(t,e,n,r=1){n=this.toSeconds(n),e=this.toSeconds(e);const i=this._fromType(t[0])*r;this.setValueAtTime(this._toType(i),e);const o=n/(t.length-1);for(let n=1;n<t.length;n++){const i=this._fromType(t[n])*r;this.linearRampToValueAtTime(this._toType(i),e+n*o)}return this}cancelScheduledValues(t){const e=this.toSeconds(t);return Mr(isFinite(e),`Invalid argument to cancelScheduledValues: ${JSON.stringify(t)}`),this._events.cancel(e),this._param.cancelScheduledValues(e),this.log(this.units,"cancelScheduledValues",e),this}cancelAndHoldAtTime(t){const e=this.toSeconds(t),n=this._fromType(this.getValueAtTime(e));Mr(isFinite(e),`Invalid argument to cancelAndHoldAtTime: ${JSON.stringify(t)}`),this.log(this.units,"cancelAndHoldAtTime",e,"value="+n);const r=this._events.get(e),i=this._events.getAfter(e);return r&&hi(r.time,e)?i?(this._param.cancelScheduledValues(i.time),this._events.cancel(i.time)):(this._param.cancelAndHoldAtTime(e),this._events.cancel(e+this.sampleTime)):i&&(this._param.cancelScheduledValues(i.time),this._events.cancel(i.time),"linearRampToValueAtTime"===i.type?this.linearRampToValueAtTime(this._toType(n),e):"exponentialRampToValueAtTime"===i.type&&this.exponentialRampToValueAtTime(this._toType(n),e)),this._events.add({time:e,type:"setValueAtTime",value:n}),this._param.setValueAtTime(n,e),this}rampTo(t,e=.1,n){return"frequency"===this.units||"bpm"===this.units||"decibels"===this.units?this.exponentialRampTo(t,e,n):this.linearRampTo(t,e,n),this}apply(t){const e=this.context.currentTime;t.setValueAtTime(this.getValueAtTime(e),e);const n=this._events.get(e);if(n&&"setTargetAtTime"===n.type){const r=this._events.getAfter(n.time),i=r?r.time:e+2,o=(i-e)/10;for(let n=e;n<i;n+=o)t.linearRampToValueAtTime(this.getValueAtTime(n),n)}return this._events.forEachAfter(this.context.currentTime,(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}setParam(t){Mr(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const e=this.input;return e.disconnect(this._param),this.apply(t),this._param=t,e.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(t,e,n,r,i){return n+(e-n)*Math.exp(-(i-t)/r)}_linearInterpolate(t,e,n,r,i){return e+(i-t)/(n-t)*(r-e)}_exponentialInterpolate(t,e,n,r,i){return e*Math.pow(r/e,(i-t)/(n-t))}}class Bi extends Li{constructor(){super(...arguments),this.name="ToneAudioNode",this._internalChannels=[]}get numberOfInputs(){return Vr(this.input)?Xr(this.input)||this.input instanceof qi?1:this.input.numberOfInputs:0}get numberOfOutputs(){return Vr(this.output)?this.output.numberOfOutputs:0}_isAudioNode(t){return Vr(t)&&(t instanceof Bi||Yr(t))}_getInternalNodes(){const 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}_setChannelProperties(t){this._getInternalNodes().forEach((e=>{e.channelCount=t.channelCount,e.channelCountMode=t.channelCountMode,e.channelInterpretation=t.channelInterpretation}))}_getChannelProperties(){const t=this._getInternalNodes();Mr(t.length>0,"ToneAudioNode does not have any internal nodes");const e=t[0];return{channelCount:e.channelCount,channelCountMode:e.channelCountMode,channelInterpretation:e.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCount:t}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelCountMode:t}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(t){const e=this._getChannelProperties();this._setChannelProperties(Object.assign(e,{channelInterpretation:t}))}connect(t,e=0,n=0){return $i(this,t,e,n),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return jr("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(t,e=0,n=0){return function(t,e,n=0,r=0){if(Vr(e))for(;e instanceof Bi;)e=e.input;for(;!Yr(t);)Vr(t.output)&&(t=t.output);Xr(e)?t.disconnect(e,n):Yr(e)?t.disconnect(e,n,r):t.disconnect()}(this,t,e,n),this}chain(...t){return Ui(this,...t),this}fan(...t){return t.forEach((t=>this.connect(t))),this}dispose(){return super.dispose(),Vr(this.input)&&(this.input instanceof Bi?this.input.dispose():Yr(this.input)&&this.input.disconnect()),Vr(this.output)&&(this.output instanceof Bi?this.output.dispose():Yr(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function Ui(...t){const e=t.shift();t.reduce(((t,e)=>(t instanceof Bi?t.connect(e):Yr(t)&&$i(t,e),e)),e)}function $i(t,e,n=0,r=0){for(Mr(Vr(t),"Cannot connect from undefined node"),Mr(Vr(e),"Cannot connect to undefined node"),(e instanceof Bi||Yr(e))&&Mr(e.numberOfInputs>0,"Cannot connect to node with no inputs"),Mr(t.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof Bi||e instanceof qi;)Vr(e.input)&&(e=e.input);for(;t instanceof Bi;)Vr(t.output)&&(t=t.output);Xr(e)?t.connect(e,n):t.connect(e,n,r)}class Wi extends Bi{constructor(){super(ri(Wi.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const t=ri(Wi.getDefaults(),arguments,["gain","units"]);this.gain=new qi({context:this.context,convert:t.convert,param:this._gainNode.gain,units:t.units,value:t.gain,minValue:t.minValue,maxValue:t.maxValue}),_i(this,"gain")}static getDefaults(){return Object.assign(Bi.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class Hi extends Bi{constructor(t){super(t),this.onended=xi,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Wi({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const e=this.toSeconds(t);return-1!==this._startTime&&e>=this._startTime&&(-1===this._stopTime||e<=this._stopTime)?"started":"stopped"},this._fadeIn=t.fadeIn,this._fadeOut=t.fadeOut,this._curve=t.curve,this.onended=t.onended}static getDefaults(){return Object.assign(Bi.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:xi})}_startGain(t,e=1){Mr(-1===this._startTime,"Source cannot be started more than once");const 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}stop(t){return this.log("stop",t),this._stopGain(this.toSeconds(t)),this}_stopGain(t){Mr(-1!==this._startTime,"'start' must be called before 'stop'"),this.cancelStop();const e=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(t)+e,this._stopTime=Math.max(this._stopTime,this.context.currentTime),e>0?"linear"===this._curve?this._gainNode.gain.linearRampTo(0,e,t):this._gainNode.gain.targetRampTo(0,e,t):(this._gainNode.gain.cancelAndHoldAtTime(t),this._gainNode.gain.setValueAtTime(0,t)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout((()=>{const t="exponential"===this._curve?2*e:0;this._stopSource(this.now()+t),this._onended()}),this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==xi&&(this.onended(this),this.onended=xi,!this.context.isOffline)){const t=()=>this.dispose();void 0!==window.requestIdleCallback?window.requestIdleCallback(t):setTimeout(t,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),Mr(-1!==this._startTime,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.disconnect(),this}}class Ki extends Hi{constructor(){super(ri(Ki.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const t=ri(Ki.getDefaults(),arguments,["offset"]);$i(this._source,this._gainNode),this.offset=new qi({context:this.context,convert:t.convert,param:this._source.offset,units:t.units,value:t.offset,minValue:t.minValue,maxValue:t.maxValue})}static getDefaults(){return Object.assign(Hi.getDefaults(),{convert:!0,offset:1,units:"number"})}start(t){const e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._source.start(e),this}_stopSource(t){this._source.stop(t)}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Gi extends Bi{constructor(){super(ri(Gi.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const t=ri(Gi.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new Ki({context:this.context,convert:t.convert,offset:t.value,units:t.units,minValue:t.minValue,maxValue:t.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(Bi.getDefaults(),{convert:!0,units:"number",value:0})}connect(t,e=0,n=0){return Zi(this,t,e,n),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(t,e){return this._param.setValueAtTime(t,e),this}getValueAtTime(t){return this._param.getValueAtTime(t)}setRampPoint(t){return this._param.setRampPoint(t),this}linearRampToValueAtTime(t,e){return this._param.linearRampToValueAtTime(t,e),this}exponentialRampToValueAtTime(t,e){return this._param.exponentialRampToValueAtTime(t,e),this}exponentialRampTo(t,e,n){return this._param.exponentialRampTo(t,e,n),this}linearRampTo(t,e,n){return this._param.linearRampTo(t,e,n),this}targetRampTo(t,e,n){return this._param.targetRampTo(t,e,n),this}exponentialApproachValueAtTime(t,e,n){return this._param.exponentialApproachValueAtTime(t,e,n),this}setTargetAtTime(t,e,n){return this._param.setTargetAtTime(t,e,n),this}setValueCurveAtTime(t,e,n,r){return this._param.setValueCurveAtTime(t,e,n,r),this}cancelScheduledValues(t){return this._param.cancelScheduledValues(t),this}cancelAndHoldAtTime(t){return this._param.cancelAndHoldAtTime(t),this}rampTo(t,e,n){return this._param.rampTo(t,e,n),this}get value(){return this._param.value}set value(t){this._param.value=t}get convert(){return this._param.convert}set convert(t){this._param.convert=t}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(t){this._param.overridden=t}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(t){return this._param.apply(t),this}}function Zi(t,e,n,r){(e instanceof qi||Xr(e)||e instanceof Gi&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Gi&&(e.overridden=!0)),$i(t,e,n,r)}class Xi extends qi{constructor(){super(ri(Xi.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new fi(1/0),this._multiplier=1;const t=ri(Xi.getDefaults(),arguments,["value"]);this._multiplier=t.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(t.value)}),this.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(qi.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(t,e,n){e=this.toSeconds(e),this.setRampPoint(e);const r=this._fromType(t),i=this._events.get(e),o=Math.round(Math.max(1/n,1));for(let t=0;t<=o;t++){const o=n*t+e,s=this._exponentialApproach(i.time,i.value,r,n,o);this.linearRampToValueAtTime(this._toType(s),o)}return this}setValueAtTime(t,e){const n=this.toSeconds(e);super.setValueAtTime(t,e);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}linearRampToValueAtTime(t,e){const n=this.toSeconds(e);super.linearRampToValueAtTime(t,e);const r=this._events.get(n),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,n);return r.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(t,e){e=this.toSeconds(e);const n=this._fromType(t),r=this._events.get(e),i=Math.round(Math.max(10*(e-r.time),1)),o=(e-r.time)/i;for(let t=0;t<=i;t++){const i=o*t+r.time,s=this._exponentialInterpolate(r.time,r.value,e,n,i);this.linearRampToValueAtTime(this._toType(s),i)}return this}_getTicksUntilEvent(t,e){if(null===t)t={ticks:0,time:0,type:"setValueAtTime",value:0};else if(Fr(t.ticks)){const e=this._events.previousEvent(t);t.ticks=this._getTicksUntilEvent(e,t.time)}const n=this._fromType(this.getValueAtTime(t.time));let r=this._fromType(this.getValueAtTime(e));const i=this._events.get(e);return i&&i.time===e&&"setValueAtTime"===i.type&&(r=this._fromType(this.getValueAtTime(e-this.sampleTime))),.5*(e-t.time)*(n+r)+t.ticks}getTicksAtTime(t){const e=this.toSeconds(t),n=this._events.get(e);return Math.max(this._getTicksUntilEvent(n,e),0)}getDurationOfTicks(t,e){const n=this.toSeconds(e),r=this.getTicksAtTime(e);return this.getTimeOfTick(r+t)-n}getTimeOfTick(t){const 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){const r=this._fromType(this.getValueAtTime(e.time)),i=(this._fromType(this.getValueAtTime(n.time))-r)/(n.time-e.time),o=Math.sqrt(Math.pow(r,2)-2*i*(e.ticks-t)),s=(-r+o)/i,a=(-r-o)/i;return(s>0?s:a)+e.time}return e?0===e.value?1/0:e.time+(t-e.ticks)/e.value:t/this._initialValue}ticksToTime(t,e){return this.getDurationOfTicks(t,e)}timeToTicks(t,e){const n=this.toSeconds(e),r=this.toSeconds(t),i=this.getTicksAtTime(n);return this.getTicksAtTime(n+r)-i}_fromType(t){return"bpm"===this.units&&this.multiplier?1/(60/t/this.multiplier):super._fromType(t)}_toType(t){return"bpm"===this.units&&this.multiplier?t/this.multiplier*60:super._toType(t)}get multiplier(){return this._multiplier}set multiplier(t){const e=this.value;this._multiplier=t,this.cancelScheduledValues(0),this.setValueAtTime(e,0)}}class Yi extends Gi{constructor(){super(ri(Yi.getDefaults(),arguments,["value"])),this.name="TickSignal";const t=ri(Yi.getDefaults(),arguments,["value"]);this.input=this._param=new Xi({context:this.context,convert:t.convert,multiplier:t.multiplier,param:this._constantSource.offset,units:t.units,value:t.value})}static getDefaults(){return Object.assign(Gi.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(t,e){return this._param.ticksToTime(t,e)}timeToTicks(t,e){return this._param.timeToTicks(t,e)}getTimeOfTick(t){return this._param.getTimeOfTick(t)}getDurationOfTicks(t,e){return this._param.getDurationOfTicks(t,e)}getTicksAtTime(t){return this._param.getTicksAtTime(t)}get multiplier(){return this._param.multiplier}set multiplier(t){this._param.multiplier=t}dispose(){return super.dispose(),this._param.dispose(),this}}class Qi extends Li{constructor(){super(ri(Qi.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new zi,this._tickOffset=new fi;const t=ri(Qi.getDefaults(),arguments,["frequency"]);this.frequency=new Yi({context:this.context,units:t.units,value:t.frequency}),_i(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},Li.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(t,e){const n=this.toSeconds(t);return"started"!==this._state.getValueAtTime(n)&&(this._state.setStateAtTime("started",n),Vr(e)&&this.setTicksAtTime(e,n)),this}stop(t){const e=this.toSeconds(t);if("stopped"===this._state.getValueAtTime(e)){const t=this._state.get(e);t&&t.time>0&&(this._tickOffset.cancel(t.time),this._state.cancel(t.time))}return this._state.cancel(e),this._state.setStateAtTime("stopped",e),this.setTicksAtTime(0,e),this}pause(t){const e=this.toSeconds(t);return"started"===this._state.getValueAtTime(e)&&this._state.setStateAtTime("paused",e),this}cancel(t){return t=this.toSeconds(t),this._state.cancel(t),this._tickOffset.cancel(t),this}getTicksAtTime(t){const e=this.toSeconds(t),n=this._state.getLastState("stopped",e),r={state:"paused",time:e};this._state.add(r);let i=n,o=0;return this._state.forEachBetween(n.time,e+this.sampleTime,(t=>{let e=i.time;const n=this._tickOffset.get(t.time);n&&n.time>=i.time&&(o=n.ticks,e=n.time),"started"===i.state&&"started"!==t.state&&(o+=this.frequency.getTicksAtTime(t.time)-this.frequency.getTicksAtTime(e)),i=t})),this._state.remove(r),o}get ticks(){return this.getTicksAtTime(this.now())}set ticks(t){this.setTicksAtTime(t,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(t){const e=this.now(),n=this.frequency.timeToTicks(t,e);this.setTicksAtTime(n,e)}getSecondsAtTime(t){t=this.toSeconds(t);const e=this._state.getLastState("stopped",t),n={state:"paused",time:t};this._state.add(n);let r=e,i=0;return this._state.forEachBetween(e.time,t+this.sampleTime,(t=>{let e=r.time;const n=this._tickOffset.get(t.time);n&&n.time>=r.time&&(i=n.seconds,e=n.time),"started"===r.state&&"started"!==t.state&&(i+=t.time-e),r=t})),this._state.remove(n),i}setTicksAtTime(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}getStateAtTime(t){return t=this.toSeconds(t),this._state.getValueAtTime(t)}getTimeOfTick(t,e=this.now()){const n=this._tickOffset.get(e),r=this._state.get(e),i=Math.max(n.time,r.time),o=this.frequency.getTicksAtTime(i)+t-n.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(t,e,n){let r=this._state.get(t);this._state.forEachBetween(t,e,(e=>{r&&"started"===r.state&&"started"!==e.state&&this.forEachTickBetween(Math.max(r.time,t),e.time-this.sampleTime,n),r=e}));let i=null;if(r&&"started"===r.state){const o=Math.max(r.time,t),s=this.frequency.getTicksAtTime(o),a=s-this.frequency.getTicksAtTime(r.time);let u=Math.ceil(a)-a;u=hi(u,1)?0:u;let l=this.frequency.getTimeOfTick(s+u);for(;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}dispose(){return super.dispose(),this._state.dispose(),this._tickOffset.dispose(),this.frequency.dispose(),this}}class Ji extends Li{constructor(){super(ri(Ji.getDefaults(),arguments,["callback","frequency"])),this.name="Clock",this.callback=xi,this._lastUpdate=0,this._state=new zi("stopped"),this._boundLoop=this._loop.bind(this);const t=ri(Ji.getDefaults(),arguments,["callback","frequency"]);this.callback=t.callback,this._tickSource=new Qi({context:this.context,frequency:t.frequency,units:t.units}),this._lastUpdate=0,this.frequency=this._tickSource.frequency,_i(this,"frequency"),this._state.setStateAtTime("stopped",0),this.context.on("tick",this._boundLoop)}static getDefaults(){return Object.assign(Li.getDefaults(),{callback:xi,frequency:1,units:"hertz"})}get state(){return this._state.getValueAtTime(this.now())}start(t,e){Nr(this.context);const 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}stop(t){const 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}pause(t){const 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}get ticks(){return Math.ceil(this.getTicksAtTime(this.now()))}set ticks(t){this._tickSource.ticks=t}get seconds(){return this._tickSource.seconds}set seconds(t){this._tickSource.seconds=t}getSecondsAtTime(t){return this._tickSource.getSecondsAtTime(t)}setTicksAtTime(t,e){return this._tickSource.setTicksAtTime(t,e),this}getTimeOfTick(t,e=this.now()){return this._tickSource.getTimeOfTick(t,e)}getTicksAtTime(t){return this._tickSource.getTicksAtTime(t)}nextTickTime(t,e){const n=this.toSeconds(e),r=this.getTicksAtTime(n);return this._tickSource.getTimeOfTick(r+t,n)}_loop(){const t=this._lastUpdate,e=this.now();this._lastUpdate=e,this.log("loop",t,e),t!==e&&(this._state.forEachBetween(t,e,(t=>{switch(t.state){case"started":const e=this._tickSource.getTicksAtTime(t.time);this.emit("start",t.time,e);break;case"stopped":0!==t.time&&this.emit("stop",t.time);break;case"paused":this.emit("pause",t.time)}})),this._tickSource.forEachTickBetween(t,e,((t,e)=>{this.callback(t,e)})))}getStateAtTime(t){const e=this.toSeconds(t);return this._state.getValueAtTime(e)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}gi.mixin(Ji);class to extends si{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const t=ri(to.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=t.baseUrl,Object.keys(t.urls).forEach((e=>{this._loadingCount++;const n=t.urls[e];this.add(e,n,this._bufferLoaded.bind(this,t.onload),t.onerror)}))}static getDefaults(){return{baseUrl:"",onerror:xi,onload:xi,urls:{}}}has(t){return this._buffers.has(t.toString())}get(t){return Mr(this.has(t),`ToneAudioBuffers has no buffer named: ${t}`),this._buffers.get(t.toString())}_bufferLoaded(t){this._loadingCount--,0===this._loadingCount&&t&&t()}get loaded(){return Array.from(this._buffers).every((([t,e])=>e.loaded))}add(t,e,n=xi,r=xi){return Ur(e)?this._buffers.set(t.toString(),new Si(this.baseUrl+e,n,r)):this._buffers.set(t.toString(),new Si(e,n,r)),this}dispose(){return super.dispose(),this._buffers.forEach((t=>t.dispose())),this._buffers.clear(),this}}class eo extends Vi{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(t){return this._getPPQ()*t}_secondsToUnits(t){return Math.floor(t/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(t){return t}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class no extends Li{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new fi,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(t,e){return this._events.add({callback:t,time:this.toSeconds(e)}),1===this._events.length&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(t){return this._events.cancel(this.toSeconds(t)),this}_drawLoop(){const t=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=t;){const e=this._events.shift();e&&t-e.time<=this.expiration&&e.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}di((t=>{t.draw=new no({context:t})})),vi((t=>{t.draw.dispose()}));class ro extends si{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(t){Mr(Vr(t.time),"Events must have a time property"),Mr(Vr(t.duration),"Events must have a duration parameter"),t.time=t.time.valueOf();let e=new io(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}remove(t){if(null!==this._root){const e=[];this._root.search(t.time,e);for(const n of e)if(n.event===t){this._removeNode(n),this._length--;break}}return this}get length(){return this._length}cancel(t){return this.forEachFrom(t,(t=>this.remove(t))),this}_setRoot(t){this._root=t,null!==this._root&&(this._root.parent=null)}_replaceNodeInParent(t,e){null!==t.parent?(t.isLeftChild()?t.parent.left=e:t.parent.right=e,this._rebalance(t.parent)):this._setRoot(e)}_removeNode(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{let e,n=null;if(t.getBalance()>0)if(null===t.left.right)e=t.left,e.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,e.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()}_rotateLeft(t){const 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)}_rotateRight(t){const 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)}_rebalance(t){const 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))}get(t){if(null!==this._root){const e=[];if(this._root.search(t,e),e.length>0){let t=e[0];for(let n=1;n<e.length;n++)e[n].low>t.low&&(t=e[n]);return t.event}}return null}forEach(t){if(null!==this._root){const e=[];this._root.traverse((t=>e.push(t))),e.forEach((e=>{e.event&&t(e.event)}))}return this}forEachAtTime(t,e){if(null!==this._root){const n=[];this._root.search(t,n),n.forEach((t=>{t.event&&e(t.event)}))}return this}forEachFrom(t,e){if(null!==this._root){const n=[];this._root.searchAfter(t,n),n.forEach((t=>{t.event&&e(t.event)}))}return this}dispose(){return super.dispose(),null!==this._root&&this._root.traverse((t=>t.dispose())),this._root=null,this}}class io{constructor(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}insert(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)}search(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))}searchAfter(t,e){this.low>=t&&(e.push(this),null!==this.left&&this.left.searchAfter(t,e)),null!==this.right&&this.right.searchAfter(t,e)}traverse(t){t(this),null!==this.left&&this.left.traverse(t),null!==this.right&&this.right.traverse(t)}updateHeight(){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}updateMax(){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))}getBalance(){let 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}isLeftChild(){return null!==this.parent&&this.parent.left===this}get left(){return this._left}set left(t){this._left=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(t){this._right=t,null!==t&&(t.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class oo extends Bi{constructor(){super(ri(oo.getDefaults(),arguments,["volume"])),this.name="Volume";const t=ri(oo.getDefaults(),arguments,["volume"]);this.input=this.output=new Wi({context:this.context,gain:t.volume,units:"decibels"}),this.volume=this.output.gain,_i(this,"volume"),this._unmutedVolume=t.volume,this.mute=t.mute}static getDefaults(){return Object.assign(Bi.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(t){!this.mute&&t?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!t&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}class so extends Bi{constructor(){super(ri(so.getDefaults(),arguments)),this.name="Destination",this.input=new oo({context:this.context}),this.output=new Wi({context:this.context}),this.volume=this.input.volume;const t=ri(so.getDefaults(),arguments);Ui(this.input,this.output,this.context.rawContext.destination),this.mute=t.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(Bi.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(t){this.input.mute=t}chain(...t){return this.input.disconnect(),t.unshift(this.input),t.push(this.output),Ui(...t),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}}di((t=>{t.destination=new so({context:t})})),vi((t=>{t.destination.dispose()}));class ao extends si{constructor(t){super(),this.name="TimelineValue",this._timeline=new fi({memory:10}),this._initialValue=t}set(t,e){return this._timeline.add({value:t,time:e}),this}get(t){const e=this._timeline.get(t);return e?e.value:this._initialValue}}class uo{constructor(t,e){this.id=uo._eventId++;const n=Object.assign(uo.getDefaults(),e);this.transport=t,this.callback=n.callback,this._once=n.once,this.time=n.time}static getDefaults(){return{callback:xi,once:!1,time:0}}invoke(t){this.callback&&(this.callback(t),this._once&&this.transport.clear(this.id))}dispose(){return this.callback=void 0,this}}uo._eventId=0;class lo extends uo{constructor(t,e){super(t,e),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const n=Object.assign(lo.getDefaults(),e);this.duration=new eo(t.context,n.duration).valueOf(),this._interval=new eo(t.context,n.interval).valueOf(),this._nextTick=n.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},uo.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(t){this._createEvents(t),super.invoke(t)}_createEvents(t){const 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 eo(this.context,this._nextTick).toSeconds()))}_restart(t){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.time;const 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 eo(this.context,this._nextTick).toSeconds()),this._nextTick+=this._interval,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new eo(this.context,this._nextTick).toSeconds())}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this}}class co extends Li{constructor(){super(ri(co.getDefaults(),arguments)),this.name="Transport",this._loop=new ao(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new fi,this._repeatedEvents=new ro,this._syncedSignals=[],this._swingAmount=0;const t=ri(co.getDefaults(),arguments);this._ppq=t.ppq,this._clock=new Ji({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=t.ppq,this.bpm.setValueAtTime(t.bpm,0),_i(this,"bpm"),this._timeSignature=t.timeSignature,this._swingTicks=t.ppq/2}static getDefaults(){return Object.assign(Li.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(t,e){if(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._swingAmount>0&&e%this._ppq!=0&&e%(2*this._swingTicks)!=0){const n=e%(2*this._swingTicks)/(2*this._swingTicks),r=Math.sin(n*Math.PI)*this._swingAmount;t+=new eo(this.context,2*this._swingTicks/3).toSeconds()*r}this._timeline.forEachAtTime(e,(e=>e.invoke(t)))}schedule(t,e){const n=new uo(this,{callback:t,time:new Vi(this.context,e).toTicks()});return this._addEvent(n,this._timeline)}scheduleRepeat(t,e,n,r=1/0){const i=new lo(this,{callback:t,duration:new Di(this.context,r).toTicks(),interval:new Di(this.context,e).toTicks(),time:new Vi(this.context,n).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(t,e){const n=new uo(this,{callback:t,once:!0,time:new Vi(this.context,e).toTicks()});return this._addEvent(n,this._timeline)}clear(t){if(this._scheduledEvents.hasOwnProperty(t)){const e=this._scheduledEvents[t.toString()];e.timeline.remove(e.event),e.event.dispose(),delete this._scheduledEvents[t.toString()]}return this}_addEvent(t,e){return this._scheduledEvents[t.id.toString()]={event:t,timeline:e},e.add(t),t.id}cancel(t=0){const e=this.toTicks(t);return this._timeline.forEachFrom(e,(t=>this.clear(t.id))),this._repeatedEvents.forEachFrom(e,(t=>this.clear(t.id))),this}_bindClockEvents(){this._clock.on("start",((t,e)=>{e=new eo(this.context,e).toSeconds(),this.emit("start",t,e)})),this._clock.on("stop",(t=>{this.emit("stop",t)})),this._clock.on("pause",(t=>{this.emit("pause",t)}))}get state(){return this._clock.getStateAtTime(this.now())}start(t,e){let n;return Vr(e)&&(n=this.toTicks(e)),this._clock.start(t,n),this}stop(t){return this._clock.stop(t),this}pause(t){return this._clock.pause(t),this}toggle(t){return t=this.toSeconds(t),"started"!==this._clock.getStateAtTime(t)?this.start(t):this.stop(t),this}get timeSignature(){return this._timeSignature}set timeSignature(t){Br(t)&&(t=t[0]/t[1]*4),this._timeSignature=t}get loopStart(){return new Di(this.context,this._loopStart,"i").toSeconds()}set loopStart(t){this._loopStart=this.toTicks(t)}get loopEnd(){return new Di(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(t){this._loopEnd=this.toTicks(t)}get loop(){return this._loop.get(this.now())}set loop(t){this._loop.set(t,this.now())}setLoopPoints(t,e){return this.loopStart=t,this.loopEnd=e,this}get swing(){return this._swingAmount}set swing(t){this._swingAmount=t}get swingSubdivision(){return new eo(this.context,this._swingTicks).toNotation()}set swingSubdivision(t){this._swingTicks=this.toTicks(t)}get position(){const t=this.now(),e=this._clock.getTicksAtTime(t);return new eo(this.context,e).toBarsBeatsSixteenths()}set position(t){const e=this.toTicks(t);this.ticks=e}get seconds(){return this._clock.seconds}set seconds(t){const e=this.now(),n=this._clock.frequency.timeToTicks(t,e);this.ticks=n}get progress(){if(this.loop){const t=this.now();return(this._clock.getTicksAtTime(t)-this._loopStart)/(this._loopEnd-this._loopStart)}return 0}get ticks(){return this._clock.ticks}set ticks(t){if(this._clock.ticks!==t){const e=this.now();if("started"===this.state){const n=this._clock.getTicksAtTime(e),r=e+this._clock.frequency.getDurationOfTicks(Math.ceil(n)-n,e);this.emit("stop",r),this._clock.setTicksAtTime(t,r),this.emit("start",r,this._clock.getSecondsAtTime(r))}else this._clock.setTicksAtTime(t,e)}}getTicksAtTime(t){return Math.round(this._clock.getTicksAtTime(t))}getSecondsAtTime(t){return this._clock.getSecondsAtTime(t)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(t){this._clock.frequency.multiplier=t}nextSubdivision(t){if(t=this.toTicks(t),"started"!==this.state)return 0;{const e=this.now(),n=t-this.getTicksAtTime(e)%t;return this._clock.nextTickTime(n,e)}}syncSignal(t,e){if(!e){const n=this.now();if(0!==t.getValueAtTime(n)){const r=1/(60/this.bpm.getValueAtTime(n)/this.PPQ);e=t.getValueAtTime(n)/r}else e=0}const n=new Wi(e);return this.bpm.connect(n),n.connect(t._param),this._syncedSignals.push({initial:t.value,ratio:n,signal:t}),t.value=0,this}unsyncSignal(t){for(let e=this._syncedSignals.length-1;e>=0;e--){const n=this._syncedSignals[e];n.signal===t&&(n.ratio.dispose(),n.signal.value=n.initial,this._syncedSignals.splice(e,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),wi(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}gi.mixin(co),di((t=>{t.transport=new co({context:t})})),vi((t=>{t.transport.dispose()}));class ho extends Bi{constructor(t){super(t),this.input=void 0,this._state=new zi("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=xi,this._syncedStop=xi,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new oo({context:this.context,mute:t.mute,volume:t.volume}),this.volume=this._volume.volume,_i(this,"volume"),this.onstop=t.onstop}static getDefaults(){return Object.assign(Bi.getDefaults(),{mute:!1,onstop:xi,volume:0})}get state(){return this._synced?"started"===this.context.transport.state?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(t){this._volume.mute=t}_clampToCurrentTime(t){return this._synced?t:Math.max(t,this.context.currentTime)}start(t,e,n){let r=Fr(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(r=this._clampToCurrentTime(r),this._synced||"started"!==this._state.getValueAtTime(r))if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const t=this._state.get(r);t&&(t.offset=this.toSeconds(ii(e,0)),t.duration=n?this.toSeconds(n):void 0);const i=this.context.transport.schedule((t=>{this._start(t,e,n)}),r);this._scheduled.push(i),"started"===this.context.transport.state&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Nr(this.context),this._start(r,e,n);else Mr(ui(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,e,n);return this}stop(t){let e=Fr(t)&&this._synced?this.context.transport.seconds:this.toSeconds(t);if(e=this._clampToCurrentTime(e),"started"===this._state.getValueAtTime(e)||Vr(this._state.getNextState("started",e))){if(this.log("stop",e),this._synced){const t=this.context.transport.schedule(this._stop.bind(this),e);this._scheduled.push(t)}else this._stop(e);this._state.cancel(e),this._state.setStateAtTime("stopped",e)}return this}restart(t,e,n){return t=this.toSeconds(t),"started"===this._state.getValueAtTime(t)&&(this._state.cancel(t),this._restart(t,e,n)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(t,e)=>{if(e>0){const n=this._state.get(e);if(n&&"started"===n.state&&n.time!==e){const r=e-this.toSeconds(n.time);let i;n.duration&&(i=this.toSeconds(n.duration)-r),this._start(t,this.toSeconds(n.offset)+r,i)}}},this._syncedStop=t=>{const e=this.context.transport.getSecondsAtTime(Math.max(t-this.sampleTime,0));"started"===this._state.getValueAtTime(e)&&this._stop(t)},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}unsync(){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((t=>this.context.transport.clear(t))),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=xi,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class fo extends Hi{constructor(){super(ri(fo.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const t=ri(fo.getDefaults(),arguments,["url","onload"]);$i(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new qi({context:this.context,param:this._source.playbackRate,units:"positive",value:t.playbackRate}),this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this._buffer=new Si(t.url,t.onload,t.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(Hi.getDefaults(),{url:new Si,loop:!1,loopEnd:0,loopStart:0,onload:xi,onerror:xi,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(t){this._fadeIn=t}get fadeOut(){return this._fadeOut}set fadeOut(t){this._fadeOut=t}get curve(){return this._curve}set curve(t){this._curve=t}start(t,e,n,r=1){Mr(this.buffer.loaded,"buffer is either not set or not loaded");const i=this.toSeconds(t);this._startGain(i,r),e=this.loop?ii(e,this.loopStart):ii(e,0);let o=Math.max(this.toSeconds(e),0);if(this.loop){const t=this.toSeconds(this.loopEnd)||this.buffer.duration,e=this.toSeconds(this.loopStart),n=t-e;li(o,t)&&(o=(o-e)%n+e),hi(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,ci(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,o)),Vr(n)){let t=this.toSeconds(n);t=Math.max(t,0),this.stop(i+t)}return this}_stopSource(t){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(t)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(t){this._source.loopStart=this.toSeconds(t)}get loopEnd(){return this._source.loopEnd}set loopEnd(t){this._source.loopEnd=this.toSeconds(t)}get buffer(){return this._buffer}set buffer(t){this._buffer.set(t)}get loop(){return this._source.loop}set loop(t){this._source.loop=t,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}function po(t,e){return Gr(this,void 0,void 0,(function*(){const n=e/t.context.sampleRate,r=new Ti(1,n,t.context.sampleRate);new t.constructor(Object.assign(t.get(),{frequency:2/n,detune:0,context:r})).toDestination().start(0);return(yield r.render()).getChannelData(0)}))}class mo extends Hi{constructor(){super(ri(mo.getDefaults(),arguments,["frequency","type"])),this.name="ToneOscillatorNode",this._oscillator=this.context.createOscillator(),this._internalChannels=[this._oscillator];const t=ri(mo.getDefaults(),arguments,["frequency","type"]);$i(this._oscillator,this._gainNode),this.type=t.type,this.frequency=new qi({context:this.context,param:this._oscillator.frequency,units:"frequency",value:t.frequency}),this.detune=new qi({context:this.context,param:this._oscillator.detune,units:"cents",value:t.detune}),_i(this,["frequency","detune"])}static getDefaults(){return Object.assign(Hi.getDefaults(),{detune:0,frequency:440,type:"sine"})}start(t){const e=this.toSeconds(t);return this.log("start",e),this._startGain(e),this._oscillator.start(e),this}_stopSource(t){this._oscillator.stop(t)}setPeriodicWave(t){return this._oscillator.setPeriodicWave(t),this}get type(){return this._oscillator.type}set type(t){this._oscillator.type=t}dispose(){return super.dispose(),"started"===this.state&&this.stop(),this._oscillator.disconnect(),this.frequency.dispose(),this.detune.dispose(),this}}class vo extends ho{constructor(){super(ri(vo.getDefaults(),arguments,["frequency","type"])),this.name="Oscillator",this._oscillator=null;const t=ri(vo.getDefaults(),arguments,["frequency","type"]);this.frequency=new Gi({context:this.context,units:"frequency",value:t.frequency}),_i(this,"frequency"),this.detune=new Gi({context:this.context,units:"cents",value:t.detune}),_i(this,"detune"),this._partials=t.partials,this._partialCount=t.partialCount,this._type=t.type,t.partialCount&&"custom"!==t.type&&(this._type=this.baseType+t.partialCount.toString()),this.phase=t.phase}static getDefaults(){return Object.assign(ho.getDefaults(),{detune:0,frequency:440,partialCount:0,partials:[],phase:0,type:"sine"})}_start(t){const e=this.toSeconds(t),n=new mo({context:this.context,onended:()=>this.onstop(this)});this._oscillator=n,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(e)}_stop(t){const e=this.toSeconds(t);this._oscillator&&this._oscillator.stop(e)}_restart(t){const e=this.toSeconds(t);return this.log("restart",e),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(e),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if("custom"===this._type){return vo._periodicWaveCache.find((t=>{return t.phase===this._phase&&(e=t.partials,n=this._partials,e.length===n.length&&e.every(((t,e)=>n[e]===t)));var e,n}))}{const t=vo._periodicWaveCache.find((t=>t.type===this._type&&t.phase===this._phase));return this._partialCount=t?t.partialCount:this._partialCount,t}}get type(){return this._type}set type(t){this._type=t;const e=-1!==["sine","square","sawtooth","triangle"].indexOf(t);if(0===this._phase&&e)this._wave=void 0,this._partialCount=0,null!==this._oscillator&&(this._oscillator.type=t);else{const e=this._getCachedPeriodicWave();if(Vr(e)){const{partials:t,wave:n}=e;this._wave=n,this._partials=t,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave)}else{const[e,n]=this._getRealImaginary(t,this._phase),r=this.context.createPeriodicWave(e,n);this._wave=r,null!==this._oscillator&&this._oscillator.setPeriodicWave(this._wave),vo._periodicWaveCache.push({imag:n,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:e,type:this._type,wave:this._wave}),vo._periodicWaveCache.length>100&&vo._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(t){this.partialCount&&"custom"!==this._type&&"custom"!==t?this.type=t+this.partialCount:this.type=t}get partialCount(){return this._partialCount}set partialCount(t){Dr(t,0);let e=this._type;const 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{const e=new Float32Array(t);this._partials.forEach(((t,n)=>e[n]=t)),this._partials=Array.from(e),this.type=this._type}}_getRealImaginary(t,e){let n=2048;const r=new Float32Array(n),i=new Float32Array(n);let o=1;if("custom"===t){if(o=this._partials.length+1,this._partialCount=this._partials.length,n=o,0===this._partials.length)return[r,i]}else{const e=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(t);e?(o=parseInt(e[2],10)+1,this._partialCount=parseInt(e[2],10),t=e[1],o=Math.max(o,2),n=o):this._partialCount=0,this._partials=[]}for(let s=1;s<n;++s){const n=2/(s*Math.PI);let a;switch(t){case"sine":a=s<=o?1:0,this._partials[s-1]=a;break;case"square":a=1&s?2*n:0,this._partials[s-1]=a;break;case"sawtooth":a=n*(1&s?1:-1),this._partials[s-1]=a;break;case"triangle":a=1&s?n*n*2*(s-1>>1&1?-1:1):0,this._partials[s-1]=a;break;case"custom":a=this._partials[s-1];break;default:throw new TypeError("Oscillator: invalid type: "+t)}0!==a?(r[s]=-a*Math.sin(e*s),i[s]=a*Math.cos(e*s)):(r[s]=0,i[s]=0)}return[r,i]}_inverseFFT(t,e,n){let r=0;const i=t.length;for(let o=0;o<i;o++)r+=t[o]*Math.cos(o*n)+e[o]*Math.sin(o*n);return r}getInitialValue(){const[t,e]=this._getRealImaginary(this._type,0);let n=0;const r=2*Math.PI;for(let i=0;i<32;i++)n=Math.max(this._inverseFFT(t,e,i/32*r),n);return i=-this._inverseFFT(t,e,this._phase)/n,o=-1,s=1,Math.max(Math.min(i,s),o);var i,o,s}get partials(){return this._partials.slice(0,this.partialCount)}set partials(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this.type="custom")}get phase(){return this._phase*(180/Math.PI)}set phase(t){this._phase=t*Math.PI/180,this.type=this._type}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),null!==this._oscillator&&this._oscillator.dispose(),this._wave=void 0,this.frequency.dispose(),this.detune.dispose(),this}}vo._periodicWaveCache=[];class go extends Bi{constructor(){super(Object.assign(ri(go.getDefaults(),arguments,["context"])))}connect(t,e=0,n=0){return Zi(this,t,e,n),this}}class yo extends go{constructor(){super(Object.assign(ri(yo.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const t=ri(yo.getDefaults(),arguments,["mapping","length"]);Br(t.mapping)||t.mapping instanceof Float32Array?this.curve=Float32Array.from(t.mapping):"function"==typeof t.mapping&&this.setMap(t.mapping,t.length)}static getDefaults(){return Object.assign(Gi.getDefaults(),{length:1024})}setMap(t,e=1024){const n=new Float32Array(e);for(let r=0,i=e;r<i;r++){const e=r/(i-1)*2-1;n[r]=t(e,r)}return this.curve=n,this}get curve(){return this._shaper.curve}set curve(t){this._shaper.curve=t}get oversample(){return this._shaper.oversample}set oversample(t){Mr(["none","2x","4x"].some((e=>e.includes(t))),"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=t}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class bo extends go{constructor(){super(...arguments),this.name="AudioToGain",this._norm=new yo({context:this.context,mapping:t=>(t+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class _o extends Gi{constructor(){super(Object.assign(ri(_o.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const t=ri(_o.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Wi({context:this.context,minValue:t.minValue,maxValue:t.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(t.value,0)}static getDefaults(){return Object.assign(Gi.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class wo extends ho{constructor(){super(ri(wo.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new bo({context:this.context}),this._modulationNode=new Wi({context:this.context});const t=ri(wo.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new vo({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new vo({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new _o({context:this.context,units:"positive",value:t.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),_i(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(vo.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(t){this._modulator.start(t),this._carrier.start(t)}_stop(t){this._modulator.stop(t),this._carrier.stop(t)}_restart(t){this._modulator.restart(t),this._carrier.restart(t)}get type(){return this._carrier.type}set type(t){this._carrier.type=t}get baseType(){return this._carrier.baseType}set baseType(t){this._carrier.baseType=t}get partialCount(){return this._carrier.partialCount}set partialCount(t){this._carrier.partialCount=t}get modulationType(){return this._modulator.type}set modulationType(t){this._modulator.type=t}get phase(){return this._carrier.phase}set phase(t){this._carrier.phase=t,this._modulator.phase=t}get partials(){return this._carrier.partials}set partials(t){this._carrier.partials=t}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class xo extends ho{constructor(){super(ri(xo.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Wi({context:this.context,gain:0});const t=ri(xo.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new vo({context:this.context,detune:t.detune,frequency:0,onstop:()=>this.onstop(this),phase:t.phase,type:t.type}),this.detune=this._carrier.detune,this.frequency=new Gi({context:this.context,units:"frequency",value:t.frequency}),this._modulator=new vo({context:this.context,phase:t.phase,type:t.modulationType}),this.harmonicity=new _o({context:this.context,units:"positive",value:t.harmonicity}),this.modulationIndex=new _o({context:this.context,units:"positive",value:t.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),_i(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(vo.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(t){this._modulator.start(t),this._carrier.start(t)}_stop(t){this._modulator.stop(t),this._carrier.stop(t)}_restart(t){return this._modulator.restart(t),this._carrier.restart(t),this}get type(){return this._carrier.type}set type(t){this._carrier.type=t}get baseType(){return this._carrier.baseType}set baseType(t){this._carrier.baseType=t}get partialCount(){return this._carrier.partialCount}set partialCount(t){this._carrier.partialCount=t}get modulationType(){return this._modulator.type}set modulationType(t){this._modulator.type=t}get phase(){return this._carrier.phase}set phase(t){this._carrier.phase=t,this._modulator.phase=t}get partials(){return this._carrier.partials}set partials(t){this._carrier.partials=t}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class So extends ho{constructor(){super(ri(So.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Wi({context:this.context,gain:0}),this._thresh=new yo({context:this.context,mapping:t=>t<=0?-1:1});const t=ri(So.getDefaults(),arguments,["frequency","width"]);this.width=new Gi({context:this.context,units:"audioRange",value:t.width}),this._triangle=new vo({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),_i(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(ho.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(t){t=this.toSeconds(t),this._triangle.start(t),this._widthGate.gain.setValueAtTime(1,t)}_stop(t){t=this.toSeconds(t),this._triangle.stop(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(0,t)}_restart(t){this._triangle.restart(t),this._widthGate.gain.cancelScheduledValues(t),this._widthGate.gain.setValueAtTime(1,t)}get phase(){return this._triangle.phase}set phase(t){this._triangle.phase=t}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(t){this._triangle.type=t}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class To extends ho{constructor(){super(ri(To.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const t=ri(To.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Gi({context:this.context,units:"frequency",value:t.frequency}),this.detune=new Gi({context:this.context,units:"cents",value:t.detune}),this._spread=t.spread,this._type=t.type,this._phase=t.phase,this._partials=t.partials,this._partialCount=t.partialCount,this.count=t.count,_i(this,["frequency","detune"])}static getDefaults(){return Object.assign(vo.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(t){t=this.toSeconds(t),this._forEach((e=>e.start(t)))}_stop(t){t=this.toSeconds(t),this._forEach((e=>e.stop(t)))}_restart(t){this._forEach((e=>e.restart(t)))}_forEach(t){for(let e=0;e<this._oscillators.length;e++)t(this._oscillators[e],e)}get type(){return this._type}set type(t){this._type=t,this._forEach((e=>e.type=t))}get spread(){return this._spread}set spread(t){if(this._spread=t,this._oscillators.length>1){const e=-t/2,n=t/(this._oscillators.length-1);this._forEach(((t,r)=>t.detune.value=e+n*r))}}get count(){return this._oscillators.length}set count(t){if(Dr(t,1),this._oscillators.length!==t){this._forEach((t=>t.dispose())),this._oscillators=[];for(let e=0;e<t;e++){const n=new vo({context:this.context,volume:-6-1.1*t,type:this._type,phase:this._phase+e/t*360,partialCount:this._partialCount,onstop:0===e?()=>this.onstop(this):xi});"custom"===this.type&&(n.partials=this._partials),this.frequency.connect(n.frequency),this.detune.connect(n.detune),n.detune.overridden=!1,n.connect(this.output),this._oscillators[e]=n}this.spread=this._spread,"started"===this.state&&this._forEach((t=>t.start()))}}get phase(){return this._phase}set phase(t){this._phase=t,this._forEach(((t,e)=>t.phase=this._phase+e/this.count*360))}get baseType(){return this._oscillators[0].baseType}set baseType(t){this._forEach((e=>e.baseType=t)),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(t){this._partials=t,this._partialCount=this._partials.length,t.length&&(this._type="custom",this._forEach((e=>e.partials=t)))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(t){this._partialCount=t,this._forEach((e=>e.partialCount=t)),this._type=this._oscillators[0].type}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach((t=>t.dispose())),this}}class ko extends ho{constructor(){super(ri(ko.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new _o({context:this.context,value:2});const t=ri(ko.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new So({context:this.context,frequency:t.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new vo({context:this.context,detune:t.detune,frequency:t.frequency,onstop:()=>this.onstop(this),phase:t.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),_i(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(ho.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(t){t=this.toSeconds(t),this._modulator.start(t),this._pulse.start(t)}_stop(t){t=this.toSeconds(t),this._modulator.stop(t),this._pulse.stop(t)}_restart(t){this._modulator.restart(t),this._pulse.restart(t)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(t){this._modulator.phase=t}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Co={am:wo,fat:To,fm:xo,oscillator:vo,pulse:So,pwm:ko};class Oo extends ho{constructor(){super(ri(Oo.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const t=ri(Oo.getDefaults(),arguments,["frequency","type"]);this.frequency=new Gi({context:this.context,units:"frequency",value:t.frequency}),this.detune=new Gi({context:this.context,units:"cents",value:t.detune}),_i(this,["frequency","detune"]),this.set(t)}static getDefaults(){return Object.assign(vo.getDefaults(),xo.getDefaults(),wo.getDefaults(),To.getDefaults(),So.getDefaults(),ko.getDefaults())}_start(t){this._oscillator.start(t)}_stop(t){this._oscillator.stop(t)}_restart(t){return this._oscillator.restart(t),this}get type(){let t="";return["am","fm","fat"].some((t=>this._sourceType===t))&&(t=this._sourceType),t+this._oscillator.type}set type(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)}get partials(){return this._oscillator.partials}set partials(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partials=t)}get partialCount(){return this._oscillator.partialCount}set partialCount(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||(this._oscillator.partialCount=t)}set(t){return Reflect.has(t,"type")&&t.type&&(this.type=t.type),super.set(t),this}_createNewOscillator(t){if(t!==this._sourceType){this._sourceType=t;const e=Co[t],n=this.now();if(this._oscillator){const t=this._oscillator;t.stop(n),this.context.setTimeout((()=>t.dispose()),this.blockTime)}this._oscillator=new e({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),"started"===this.state&&this._oscillator.start(n)}}get phase(){return this._oscillator.phase}set phase(t){this._oscillator.phase=t}get sourceType(){return this._sourceType}set sourceType(t){let 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")}_getOscType(t,e){return t instanceof Co[e]}get baseType(){return this._oscillator.baseType}set baseType(t){this._getOscType(this._oscillator,"pulse")||this._getOscType(this._oscillator,"pwm")||"pulse"===t||"pwm"===t||(this._oscillator.baseType=t)}get width(){return this._getOscType(this._oscillator,"pulse")?this._oscillator.width:void 0}get count(){return this._getOscType(this._oscillator,"fat")?this._oscillator.count:void 0}set count(t){this._getOscType(this._oscillator,"fat")&&Lr(t)&&(this._oscillator.count=t)}get spread(){return this._getOscType(this._oscillator,"fat")?this._oscillator.spread:void 0}set spread(t){this._getOscType(this._oscillator,"fat")&&Lr(t)&&(this._oscillator.spread=t)}get modulationType(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.modulationType:void 0}set modulationType(t){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&Ur(t)&&(this._oscillator.modulationType=t)}get modulationIndex(){return this._getOscType(this._oscillator,"fm")?this._oscillator.modulationIndex:void 0}get harmonicity(){return this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am")?this._oscillator.harmonicity:void 0}get modulationFrequency(){return this._getOscType(this._oscillator,"pwm")?this._oscillator.modulationFrequency:void 0}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){return po(this,t)}))}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}function Eo(t,e=1/0){const n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){Dr(r,t,e),n.set(this,r)}})}}function Ao(t,e=1/0){const n=new WeakMap;return function(r,i){Reflect.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return n.get(this)},set:function(r){Dr(this.toSeconds(r),t,e),n.set(this,r)}})}}class Po extends ho{constructor(){super(ri(Po.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const t=ri(Po.getDefaults(),arguments,["url","onload"]);this._buffer=new Si({onload:this._onload.bind(this,t.onload),onerror:t.onerror,reverse:t.reverse,url:t.url}),this.autostart=t.autostart,this._loop=t.loop,this._loopStart=t.loopStart,this._loopEnd=t.loopEnd,this._playbackRate=t.playbackRate,this.fadeIn=t.fadeIn,this.fadeOut=t.fadeOut}static getDefaults(){return Object.assign(ho.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:xi,onerror:xi,playbackRate:1,reverse:!1})}load(t){return Gr(this,void 0,void 0,(function*(){return yield this._buffer.load(t),this._onload(),this}))}_onload(t=xi){t(),this.autostart&&this.start()}_onSourceEnd(t){this.onstop(this),this._activeSources.delete(t),0!==this._activeSources.size||this._synced||"started"!==this._state.getValueAtTime(this.now())||(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(t,e,n){return super.start(t,e,n),this}_start(t,e,n){e=this._loop?ii(e,this._loopStart):ii(e,0);const r=this.toSeconds(e),i=n;n=ii(n,Math.max(this._buffer.duration-r,0));let o=this.toSeconds(n);o/=this._playbackRate,t=this.toSeconds(t);const s=new fo({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+o),this._state.setStateAtTime("stopped",t+o,{implicitEnd:!0})),this._activeSources.add(s),this._loop&&Fr(i)?s.start(t,r):s.start(t,r,o-this.toSeconds(this.fadeOut))}_stop(t){const e=this.toSeconds(t);this._activeSources.forEach((t=>t.stop(e)))}restart(t,e,n){return super.restart(t,e,n),this}_restart(t,e,n){this._stop(t),this._start(t,e,n)}seek(t,e){const n=this.toSeconds(e);if("started"===this._state.getValueAtTime(n)){const e=this.toSeconds(t);this._stop(n),this._start(n,e)}return this}setLoopPoints(t,e){return this.loopStart=t,this.loopEnd=e,this}get loopStart(){return this._loopStart}set loopStart(t){this._loopStart=t,this.buffer.loaded&&Dr(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((e=>{e.loopStart=t}))}get loopEnd(){return this._loopEnd}set loopEnd(t){this._loopEnd=t,this.buffer.loaded&&Dr(this.toSeconds(t),0,this.buffer.duration),this._activeSources.forEach((e=>{e.loopEnd=t}))}get buffer(){return this._buffer}set buffer(t){this._buffer.set(t)}get loop(){return this._loop}set loop(t){if(this._loop!==t&&(this._loop=t,this._activeSources.forEach((e=>{e.loop=t})),t)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t;const e=this.now(),n=this._state.getNextState("stopped",e);n&&n.implicitEnd&&(this._state.cancel(n.time),this._activeSources.forEach((t=>t.cancelStop()))),this._activeSources.forEach((n=>{n.playbackRate.setValueAtTime(t,e)}))}get reverse(){return this._buffer.reverse}set reverse(t){this._buffer.reverse=t}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach((t=>t.dispose())),this._activeSources.clear(),this._buffer.dispose(),this}}Kr([Ao(0)],Po.prototype,"fadeIn",void 0),Kr([Ao(0)],Po.prototype,"fadeOut",void 0);class Io extends Bi{constructor(){super(ri(Io.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Gi({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const t=ri(Io.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=t.attack,this.decay=t.decay,this.sustain=t.sustain,this.release=t.release,this.attackCurve=t.attackCurve,this.releaseCurve=t.releaseCurve,this.decayCurve=t.decayCurve}static getDefaults(){return Object.assign(Bi.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(t,e){if(Ur(t))return t;{let n;for(n in Mo)if(Mo[n][e]===t)return n;return t}}_setCurve(t,e,n){if(Ur(n)&&Reflect.has(Mo,n)){const r=Mo[n];zr(r)?"_decayCurve"!==t&&(this[t]=r[e]):this[t]=r}else{if(!Br(n)||"_decayCurve"===t)throw new Error("Envelope: invalid curve: "+n);this[t]=n}}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(t){this._setCurve("_attackCurve","In",t)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(t){this._setCurve("_releaseCurve","Out",t)}get decayCurve(){return this._decayCurve}set decayCurve(t){Mr(["linear","exponential"].some((e=>e===t)),`Invalid envelope curve: ${t}`),this._decayCurve=t}triggerAttack(t,e=1){this.log("triggerAttack",t,e),t=this.toSeconds(t);let n=this.toSeconds(this.attack);const r=this.toSeconds(this.decay),i=this.getValueAtTime(t);if(i>0){n=(1-i)/(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);let r=this._attackCurve;for(let t=1;t<r.length;t++)if(r[t-1]<=i&&i<=r[t]){r=this._attackCurve.slice(t),r[0]=i;break}this._sig.setValueCurveAtTime(r,t,n,e)}if(r&&this.sustain<1){const i=e*this.sustain,o=t+n;this.log("decay",o),"linear"===this._decayCurve?this._sig.linearRampToValueAtTime(i,r+o):this._sig.exponentialApproachValueAtTime(i,o,r)}return this}triggerRelease(t){this.log("triggerRelease",t),t=this.toSeconds(t);const e=this.getValueAtTime(t);if(e>0){const 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):(Mr(Br(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}getValueAtTime(t){return this._sig.getValueAtTime(t)}triggerAttackRelease(t,e,n=1){return e=this.toSeconds(e),this.triggerAttack(e,n),this.triggerRelease(e+this.toSeconds(t)),this}cancel(t){return this._sig.cancelScheduledValues(this.toSeconds(t)),this}connect(t,e=0,n=0){return Zi(this,t,e,n),this}asArray(t=1024){return Gr(this,void 0,void 0,(function*(){const e=t/this.context.sampleRate,n=new Ti(1,e,this.context.sampleRate),r=this.toSeconds(this.attack)+this.toSeconds(this.decay),i=r+this.toSeconds(this.release),o=.1*i,s=i+o,a=new this.constructor(Object.assign(this.get(),{attack:e*this.toSeconds(this.attack)/s,decay:e*this.toSeconds(this.decay)/s,release:e*this.toSeconds(this.release)/s,context:n}));a._sig.toDestination(),a.triggerAttackRelease(e*(r+o)/s,0);return(yield n.render()).getChannelData(0)}))}dispose(){return super.dispose(),this._sig.dispose(),this}}Kr([Ao(0)],Io.prototype,"attack",void 0),Kr([Ao(0)],Io.prototype,"decay",void 0),Kr([Eo(0,1)],Io.prototype,"sustain",void 0),Kr([Ao(0)],Io.prototype,"release",void 0);const Mo=(()=>{const t=128;let e,n;const r=[];for(e=0;e<t;e++)r[e]=Math.sin(e/127*(Math.PI/2));const i=[];for(e=0;e<127;e++){n=e/127;const t=Math.sin(n*(2*Math.PI)*6.4-Math.PI/2)+1;i[e]=t/10+.83*n}i[127]=1;const o=[];for(e=0;e<t;e++)o[e]=Math.ceil(e/127*5)/5;const s=[];for(e=0;e<t;e++)n=e/127,s[e]=.5*(1-Math.cos(Math.PI*n));const a=[];for(e=0;e<t;e++){n=e/127;const t=4*Math.pow(n,3)+.2,r=Math.cos(t*Math.PI*2*n);a[e]=Math.abs(r*(1-n))}function u(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=1-t[n];return e}return{bounce:{In:u(a),Out:a},cosine:{In:r,Out:(l=r,l.slice(0).reverse())},exponential:"exponential",linear:"linear",ripple:{In:i,Out:u(i)},sine:{In:s,Out:u(s)},step:{In:o,Out:u(o)}};var l})();class Do extends Bi{constructor(){super(ri(Do.getDefaults(),arguments)),this._scheduledEvents=[],this._synced=!1,this._original_triggerAttack=this.triggerAttack,this._original_triggerRelease=this.triggerRelease;const t=ri(Do.getDefaults(),arguments);this._volume=this.output=new oo({context:this.context,volume:t.volume}),this.volume=this._volume.volume,_i(this,"volume")}static getDefaults(){return Object.assign(Bi.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0)),this}_syncState(){let t=!1;return this._synced||(this._synced=!0,t=!0),t}_syncMethod(t,e){const n=this["_original_"+t]=this[t];this[t]=(...t)=>{const r=t[e],i=this.context.transport.schedule((r=>{t[e]=r,n.apply(this,t)}),r);this._scheduledEvents.push(i)}}unsync(){return this._scheduledEvents.forEach((t=>this.context.transport.clear(t))),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease),this}triggerAttackRelease(t,e,n,r){const i=this.toSeconds(n),o=this.toSeconds(e);return this.triggerAttack(t,i,r),this.triggerRelease(i+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class No extends Do{constructor(){super(ri(No.getDefaults(),arguments));const t=ri(No.getDefaults(),arguments);this.portamento=t.portamento,this.onsilence=t.onsilence}static getDefaults(){return Object.assign(Do.getDefaults(),{detune:0,onsilence:xi,portamento:0})}triggerAttack(t,e,n=1){this.log("triggerAttack",t,e,n);const r=this.toSeconds(e);return this._triggerEnvelopeAttack(r,n),this.setNote(t,r),this}triggerRelease(t){this.log("triggerRelease",t);const e=this.toSeconds(t);return this._triggerEnvelopeRelease(e),this}setNote(t,e){const n=this.toSeconds(e),r=t instanceof Ri?t.toFrequency():t;if(this.portamento>0&&this.getLevelAtTime(n)>.05){const t=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,t,n)}else this.frequency.setValueAtTime(r,n);return this}}Kr([Ao(0)],No.prototype,"portamento",void 0);class Ro extends Io{constructor(){super(ri(Ro.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Wi({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class jo extends No{constructor(){super(ri(jo.getDefaults(),arguments)),this.name="Synth";const t=ri(jo.getDefaults(),arguments);this.oscillator=new Oo(Object.assign({context:this.context,detune:t.detune,onstop:()=>this.onsilence(this)},t.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new Ro(Object.assign({context:this.context},t.envelope)),this.oscillator.chain(this.envelope,this.output),_i(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(No.getDefaults(),{envelope:Object.assign(oi(Io.getDefaults(),Object.keys(Bi.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(oi(Oo.getDefaults(),[...Object.keys(ho.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(t,e){if(this.envelope.triggerAttack(t,e),this.oscillator.start(t),0===this.envelope.sustain){const e=this.toSeconds(this.envelope.attack),n=this.toSeconds(this.envelope.decay);this.oscillator.stop(t+e+n)}}_triggerEnvelopeRelease(t){this.envelope.triggerRelease(t),this.oscillator.stop(t+this.toSeconds(this.envelope.release))}getLevelAtTime(t){return t=this.toSeconds(t),this.envelope.getValueAtTime(t)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class Fo extends jo{constructor(){super(ri(Fo.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const t=ri(Fo.getDefaults(),arguments);this.pitchDecay=t.pitchDecay,this.octaves=t.octaves,_i(this,["oscillator","envelope"])}static getDefaults(){return ni(No.getDefaults(),jo.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(t,e){const n=this.toSeconds(e),r=this.toFrequency(t instanceof Ri?t.toFrequency():t),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,n),this.oscillator.frequency.exponentialRampToValueAtTime(r,n+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}Kr([Eo(0)],Fo.prototype,"octaves",void 0),Kr([Ao(0)],Fo.prototype,"pitchDecay",void 0);const Vo=new Set;function Lo(t){Vo.add(t)}function zo(t,e){const n=`registerProcessor("${t}", ${e})`;Vo.add(n)}Lo('\n\t/**\n\t * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. \n\t */\n\tclass ToneAudioWorkletProcessor extends AudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\t\n\t\t\tsuper(options);\n\t\t\t/**\n\t\t\t * If the processor was disposed or not. Keep alive until it\'s disposed.\n\t\t\t */\n\t\t\tthis.disposed = false;\n\t\t \t/** \n\t\t\t * The number of samples in the processing block\n\t\t\t */\n\t\t\tthis.blockSize = 128;\n\t\t\t/**\n\t\t\t * the sample rate\n\t\t\t */\n\t\t\tthis.sampleRate = sampleRate;\n\n\t\t\tthis.port.onmessage = (event) => {\n\t\t\t\t// when it receives a dispose \n\t\t\t\tif (event.data === "dispose") {\n\t\t\t\t\tthis.disposed = true;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t}\n');Lo("\n\t/**\n\t * Abstract class for a single input/output processor. \n\t * has a 'generate' function which processes one sample at a time\n\t */\n\tclass SingleIOProcessor extends ToneAudioWorkletProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(Object.assign(options, {\n\t\t\t\tnumberOfInputs: 1,\n\t\t\t\tnumberOfOutputs: 1\n\t\t\t}));\n\t\t\t/**\n\t\t\t * Holds the name of the parameter and a single value of that\n\t\t\t * parameter at the current sample\n\t\t\t * @type { [name: string]: number }\n\t\t\t */\n\t\t\tthis.params = {}\n\t\t}\n\n\t\t/**\n\t\t * Generate an output sample from the input sample and parameters\n\t\t * @abstract\n\t\t * @param input number\n\t\t * @param channel number\n\t\t * @param parameters { [name: string]: number }\n\t\t * @returns number\n\t\t */\n\t\tgenerate(){}\n\n\t\t/**\n\t\t * Update the private params object with the \n\t\t * values of the parameters at the given index\n\t\t * @param parameters { [name: string]: Float32Array },\n\t\t * @param index number\n\t\t */\n\t\tupdateParams(parameters, index) {\n\t\t\tfor (const paramName in parameters) {\n\t\t\t\tconst param = parameters[paramName];\n\t\t\t\tif (param.length > 1) {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][index];\n\t\t\t\t} else {\n\t\t\t\t\tthis.params[paramName] = parameters[paramName][0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Process a single frame of the audio\n\t\t * @param inputs Float32Array[][]\n\t\t * @param outputs Float32Array[][]\n\t\t */\n\t\tprocess(inputs, outputs, parameters) {\n\t\t\tconst input = inputs[0];\n\t\t\tconst output = outputs[0];\n\t\t\t// get the parameter values\n\t\t\tconst channelCount = Math.max(input && input.length || 0, output.length);\n\t\t\tfor (let sample = 0; sample < this.blockSize; sample++) {\n\t\t\t\tthis.updateParams(parameters, sample);\n\t\t\t\tfor (let channel = 0; channel < channelCount; channel++) {\n\t\t\t\t\tconst inputSample = input && input.length ? input[channel][sample] : 0;\n\t\t\t\t\toutput[channel][sample] = this.generate(inputSample, channel, this.params);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn !this.disposed;\n\t\t}\n\t};\n");Lo("\n\t/**\n\t * A multichannel buffer for use within an AudioWorkletProcessor as a delay line\n\t */\n\tclass DelayLine {\n\t\t\n\t\tconstructor(size, channels) {\n\t\t\tthis.buffer = [];\n\t\t\tthis.writeHead = []\n\t\t\tthis.size = size;\n\n\t\t\t// create the empty channels\n\t\t\tfor (let i = 0; i < channels; i++) {\n\t\t\t\tthis.buffer[i] = new Float32Array(this.size);\n\t\t\t\tthis.writeHead[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Push a value onto the end\n\t\t * @param channel number\n\t\t * @param value number\n\t\t */\n\t\tpush(channel, value) {\n\t\t\tthis.writeHead[channel] += 1;\n\t\t\tif (this.writeHead[channel] > this.size) {\n\t\t\t\tthis.writeHead[channel] = 0;\n\t\t\t}\n\t\t\tthis.buffer[channel][this.writeHead[channel]] = value;\n\t\t}\n\n\t\t/**\n\t\t * Get the recorded value of the channel given the delay\n\t\t * @param channel number\n\t\t * @param delay number delay samples\n\t\t */\n\t\tget(channel, delay) {\n\t\t\tlet readHead = this.writeHead[channel] - Math.floor(delay);\n\t\t\tif (readHead < 0) {\n\t\t\t\treadHead += this.size;\n\t\t\t}\n\t\t\treturn this.buffer[channel][readHead];\n\t\t}\n\t}\n");zo("feedback-comb-filter",'\n\tclass FeedbackCombFilterWorklet extends SingleIOProcessor {\n\n\t\tconstructor(options) {\n\t\t\tsuper(options);\n\t\t\tthis.delayLine = new DelayLine(this.sampleRate, options.channelCount || 2);\n\t\t}\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: "delayTime",\n\t\t\t\tdefaultValue: 0.1,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 1,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}, {\n\t\t\t\tname: "feedback",\n\t\t\t\tdefaultValue: 0.5,\n\t\t\t\tminValue: 0,\n\t\t\t\tmaxValue: 0.9999,\n\t\t\t\tautomationRate: "k-rate"\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, channel, parameters) {\n\t\t\tconst delayedSample = this.delayLine.get(channel, parameters.delayTime * this.sampleRate);\n\t\t\tthis.delayLine.push(channel, input + delayedSample * parameters.feedback);\n\t\t\treturn delayedSample;\n\t\t}\n\t}\n');class qo extends Do{constructor(){super(ri(qo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const t=ri(qo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),e={};Object.keys(t.urls).forEach((n=>{const r=parseInt(n,10);if(Mr($r(n)||Lr(r)&&isFinite(r),`url key is neither a note or midi pitch: ${n}`),$r(n)){const r=new Ri(this.context,n).toMidi();e[r]=t.urls[n]}else Lr(r)&&isFinite(r)&&(e[r]=t.urls[r])})),this._buffers=new to({urls:e,onload:t.onload,baseUrl:t.baseUrl,onerror:t.onerror}),this.attack=t.attack,this.release=t.release,this.curve=t.curve,this._buffers.loaded&&Promise.resolve().then(t.onload)}static getDefaults(){return Object.assign(Do.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:xi,onerror:xi,release:.1,urls:{}})}_findClosest(t){let e=0;for(;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}`)}triggerAttack(t,e,n=1){return this.log("triggerAttack",t,e,n),Array.isArray(t)||(t=[t]),t.forEach((t=>{const r=Ii(new Ri(this.context,t).toFrequency()),i=Math.round(r),o=r-i,s=this._findClosest(i),a=i-s,u=this._buffers.get(a),l=Ei(s+o),c=new fo({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:l}).connect(this.output);c.start(e,0,u.duration/l,n),Br(this._activeSources.get(i))||this._activeSources.set(i,[]),this._activeSources.get(i).push(c),c.onended=()=>{if(this._activeSources&&this._activeSources.has(i)){const t=this._activeSources.get(i),e=t.indexOf(c);-1!==e&&t.splice(e,1)}}})),this}triggerRelease(t,e){return this.log("triggerRelease",t,e),Array.isArray(t)||(t=[t]),t.forEach((t=>{const n=new Ri(this.context,t).toMidi();if(this._activeSources.has(n)&&this._activeSources.get(n).length){const t=this._activeSources.get(n);e=this.toSeconds(e),t.forEach((t=>{t.stop(e)})),this._activeSources.set(n,[])}})),this}releaseAll(t){const e=this.toSeconds(t);return this._activeSources.forEach((t=>{for(;t.length;){t.shift().stop(e)}})),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(t,e,n,r=1){const i=this.toSeconds(n);return this.triggerAttack(t,i,r),Br(e)?(Mr(Br(t),"notes must be an array when duration is array"),t.forEach(((t,n)=>{const r=e[Math.min(n,e.length-1)];this.triggerRelease(t,i+this.toSeconds(r))}))):this.triggerRelease(t,i+this.toSeconds(e)),this}add(t,e,n){if(Mr($r(t)||isFinite(t),`note must be a pitch or midi: ${t}`),$r(t)){const r=new Ri(this.context,t).toMidi();this._buffers.add(r,e,n)}else this._buffers.add(t,e,n);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach((t=>{t.forEach((t=>t.dispose()))})),this._activeSources.clear(),this}}Kr([Ao(0)],qo.prototype,"attack",void 0),Kr([Ao(0)],qo.prototype,"release",void 0);class Bo extends Li{constructor(){super(ri(Bo.getDefaults(),arguments,["callback","value"])),this.name="ToneEvent",this._state=new zi("stopped"),this._startOffset=0;const t=ri(Bo.getDefaults(),arguments,["callback","value"]);this._loop=t.loop,this.callback=t.callback,this.value=t.value,this._loopStart=this.toTicks(t.loopStart),this._loopEnd=this.toTicks(t.loopEnd),this._playbackRate=t.playbackRate,this._probability=t.probability,this._humanize=t.humanize,this.mute=t.mute,this._playbackRate=t.playbackRate,this._state.increasing=!0,this._rescheduleEvents()}static getDefaults(){return Object.assign(Li.getDefaults(),{callback:xi,humanize:!1,loop:!1,loopEnd:"1m",loopStart:0,mute:!1,playbackRate:1,probability:1,value:null})}_rescheduleEvents(t=-1){this._state.forEachFrom(t,(t=>{let e;if("started"===t.state){-1!==t.id&&this.context.transport.clear(t.id);const n=t.time+Math.round(this.startOffset/this._playbackRate);if(!0===this._loop||Lr(this._loop)&&this._loop>1){e=1/0,Lr(this._loop)&&(e=this._loop*this._getLoopDuration());const r=this._state.getAfter(n);null!==r&&(e=Math.min(e,r.time-n)),e!==1/0&&(this._state.setStateAtTime("stopped",n+e+1,{id:-1}),e=new eo(this.context,e));const i=new eo(this.context,this._getLoopDuration());t.id=this.context.transport.scheduleRepeat(this._tick.bind(this),i,new eo(this.context,n),e)}else t.id=this.context.transport.schedule(this._tick.bind(this),new eo(this.context,n))}}))}get state(){return this._state.getValueAtTime(this.context.transport.ticks)}get startOffset(){return this._startOffset}set startOffset(t){this._startOffset=t}get probability(){return this._probability}set probability(t){this._probability=t}get humanize(){return this._humanize}set humanize(t){this._humanize=t}start(t){const e=this.toTicks(t);return"stopped"===this._state.getValueAtTime(e)&&(this._state.add({id:-1,state:"started",time:e}),this._rescheduleEvents(e)),this}stop(t){this.cancel(t);const e=this.toTicks(t);if("started"===this._state.getValueAtTime(e)){this._state.setStateAtTime("stopped",e,{id:-1});const t=this._state.getBefore(e);let n=e;null!==t&&(n=t.time),this._rescheduleEvents(n)}return this}cancel(t){t=ii(t,-1/0);const e=this.toTicks(t);return this._state.forEachFrom(e,(t=>{this.context.transport.clear(t.id)})),this._state.cancel(e),this}_tick(t){const 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){let e=.02;qr(this.humanize)||(e=this.toSeconds(this.humanize)),t+=(2*Math.random()-1)*e}this.callback(t,this.value)}}_getLoopDuration(){return Math.round((this._loopEnd-this._loopStart)/this._playbackRate)}get loop(){return this._loop}set loop(t){this._loop=t,this._rescheduleEvents()}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this._rescheduleEvents()}get loopEnd(){return new eo(this.context,this._loopEnd).toSeconds()}set loopEnd(t){this._loopEnd=this.toTicks(t),this._loop&&this._rescheduleEvents()}get loopStart(){return new eo(this.context,this._loopStart).toSeconds()}set loopStart(t){this._loopStart=this.toTicks(t),this._loop&&this._rescheduleEvents()}get progress(){if(this._loop){const t=this.context.transport.ticks,e=this._state.get(t);if(null!==e&&"started"===e.state){const n=this._getLoopDuration();return(t-e.time)%n/n}return 0}return 0}dispose(){return super.dispose(),this.cancel(),this._state.dispose(),this}}class Uo extends Bo{constructor(){super(ri(Uo.getDefaults(),arguments,["callback","events"])),this.name="Part",this._state=new zi("stopped"),this._events=new Set;const t=ri(Uo.getDefaults(),arguments,["callback","events"]);this._state.increasing=!0,t.events.forEach((t=>{Br(t)?this.add(t[0],t[1]):this.add(t)}))}static getDefaults(){return Object.assign(Bo.getDefaults(),{events:[]})}start(t,e){const n=this.toTicks(t);if("started"!==this._state.getValueAtTime(n)){e=ii(e,this._loop?this._loopStart:0),e=this._loop?ii(e,this._loopStart):ii(e,0);const t=this.toTicks(e);this._state.add({id:-1,offset:t,state:"started",time:n}),this._forEach((e=>{this._startNote(e,n,t)}))}return this}_startNote(t,e,n){e-=n,this._loop?t.startOffset>=this._loopStart&&t.startOffset<this._loopEnd?(t.startOffset<n&&(e+=this._getLoopDuration()),t.start(new eo(this.context,e))):t.startOffset<this._loopStart&&t.startOffset>=n&&(t.loop=!1,t.start(new eo(this.context,e))):t.startOffset>=n&&t.start(new eo(this.context,e))}get startOffset(){return this._startOffset}set startOffset(t){this._startOffset=t,this._forEach((t=>{t.startOffset+=this._startOffset}))}stop(t){const e=this.toTicks(t);return this._state.cancel(e),this._state.setStateAtTime("stopped",e),this._forEach((e=>{e.stop(t)})),this}at(t,e){const n=new Vi(this.context,t).toTicks(),r=new eo(this.context,1).toSeconds(),i=this._events.values();let o=i.next();for(;!o.done;){const t=o.value;if(Math.abs(n-t.startOffset)<r)return Vr(e)&&(t.value=e),t;o=i.next()}return Vr(e)?(this.add(t,e),this.at(t)):null}add(t,e){t instanceof Object&&Reflect.has(t,"time")&&(t=(e=t).time);const n=this.toTicks(t);let r;return e instanceof Bo?(r=e,r.callback=this._tick.bind(this)):r=new Bo({callback:this._tick.bind(this),context:this.context,value:e}),r.startOffset=n,r.set({humanize:this.humanize,loop:this.loop,loopEnd:this.loopEnd,loopStart:this.loopStart,playbackRate:this.playbackRate,probability:this.probability}),this._events.add(r),this._restartEvent(r),this}_restartEvent(t){this._state.forEach((e=>{"started"===e.state?this._startNote(t,e.time,e.offset):t.stop(new eo(this.context,e.time))}))}remove(t,e){return zr(t)&&t.hasOwnProperty("time")&&(t=(e=t).time),t=this.toTicks(t),this._events.forEach((n=>{n.startOffset===t&&(Fr(e)||Vr(e)&&n.value===e)&&(this._events.delete(n),n.dispose())})),this}clear(){return this._forEach((t=>t.dispose())),this._events.clear(),this}cancel(t){return this._forEach((e=>e.cancel(t))),this._state.cancel(this.toTicks(t)),this}_forEach(t){return this._events&&this._events.forEach((e=>{e instanceof Uo?e._forEach(t):t(e)})),this}_setAll(t,e){this._forEach((n=>{n[t]=e}))}_tick(t,e){this.mute||this.callback(t,e)}_testLoopBoundries(t){this._loop&&(t.startOffset<this._loopStart||t.startOffset>=this._loopEnd)?t.cancel(0):"stopped"===t.state&&this._restartEvent(t)}get probability(){return this._probability}set probability(t){this._probability=t,this._setAll("probability",t)}get humanize(){return this._humanize}set humanize(t){this._humanize=t,this._setAll("humanize",t)}get loop(){return this._loop}set loop(t){this._loop=t,this._forEach((e=>{e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.loop=t,this._testLoopBoundries(e)}))}get loopEnd(){return new eo(this.context,this._loopEnd).toSeconds()}set loopEnd(t){this._loopEnd=this.toTicks(t),this._loop&&this._forEach((e=>{e.loopEnd=t,this._testLoopBoundries(e)}))}get loopStart(){return new eo(this.context,this._loopStart).toSeconds()}set loopStart(t){this._loopStart=this.toTicks(t),this._loop&&this._forEach((t=>{t.loopStart=this.loopStart,this._testLoopBoundries(t)}))}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this._setAll("playbackRate",t)}get length(){return this._events.size}dispose(){return super.dispose(),this.clear(),this}}class $o extends Bi{constructor(){super(Object.assign(ri($o.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const t=ri($o.getDefaults(),arguments,["pan"]);this.pan=new qi({context:this.context,param:this._panner.pan,value:t.pan,minValue:-1,maxValue:1}),this._panner.channelCount=t.channelCount,this._panner.channelCountMode="explicit",_i(this,"pan")}static getDefaults(){return Object.assign(Bi.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}zo("bit-crusher","\n\tclass BitCrusherWorklet extends SingleIOProcessor {\n\n\t\tstatic get parameterDescriptors() {\n\t\t\treturn [{\n\t\t\t\tname: \"bits\",\n\t\t\t\tdefaultValue: 12,\n\t\t\t\tminValue: 1,\n\t\t\t\tmaxValue: 16,\n\t\t\t\tautomationRate: 'k-rate'\n\t\t\t}];\n\t\t}\n\n\t\tgenerate(input, _channel, parameters) {\n\t\t\tconst step = Math.pow(0.5, parameters.bits - 1);\n\t\t\tconst val = step * Math.floor(input / step + 0.5);\n\t\t\treturn val;\n\t\t}\n\t}\n");class Wo extends Bi{constructor(){super(ri(Wo.getDefaults(),arguments,["solo"])),this.name="Solo";const t=ri(Wo.getDefaults(),arguments,["solo"]);this.input=this.output=new Wi({context:this.context}),Wo._allSolos.has(this.context)||Wo._allSolos.set(this.context,new Set),Wo._allSolos.get(this.context).add(this),this.solo=t.solo}static getDefaults(){return Object.assign(Bi.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(t){t?this._addSolo():this._removeSolo(),Wo._allSolos.get(this.context).forEach((t=>t._updateSolo()))}get muted(){return 0===this.input.gain.value}_addSolo(){Wo._soloed.has(this.context)||Wo._soloed.set(this.context,new Set),Wo._soloed.get(this.context).add(this)}_removeSolo(){Wo._soloed.has(this.context)&&Wo._soloed.get(this.context).delete(this)}_isSoloed(){return Wo._soloed.has(this.context)&&Wo._soloed.get(this.context).has(this)}_noSolos(){return!Wo._soloed.has(this.context)||Wo._soloed.has(this.context)&&0===Wo._soloed.get(this.context).size}_updateSolo(){this._isSoloed()||this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),Wo._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Wo._allSolos=new Map,Wo._soloed=new Map;class Ho extends Bi{constructor(){super(ri(Ho.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const t=ri(Ho.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new $o({context:this.context,pan:t.pan,channelCount:t.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new oo({context:this.context,volume:t.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=t.mute,_i(this,["pan","volume"])}static getDefaults(){return Object.assign(Bi.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(t){this._volume.mute=t}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Ko extends Bi{constructor(){super(ri(Ko.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const t=ri(Ko.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Wo({solo:t.solo,context:this.context}),this._panVol=this.output=new Ho({context:this.context,pan:t.pan,volume:t.volume,mute:t.mute,channelCount:t.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),_i(this,["pan","volume"])}static getDefaults(){return Object.assign(Bi.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(t){this._solo.solo=t}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(t){this._panVol.mute=t}_getBus(t){return Ko.buses.has(t)||Ko.buses.set(t,new Wi({context:this.context})),Ko.buses.get(t)}send(t,e=0){const n=this._getBus(t),r=new Wi({context:this.context,units:"decibels",gain:e});return this.connect(r),r.connect(n),r}receive(t){return this._getBus(t).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Ko.buses=new Map;class Go extends Bi{constructor(){super(...arguments),this.name="Listener",this.positionX=new qi({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new qi({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new qi({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new qi({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new qi({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new qi({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new qi({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new qi({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new qi({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(Bi.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),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}}di((t=>{t.listener=new Go({context:t})})),vi((t=>{t.listener.dispose()}));const Zo=Oi().transport;Oi().destination,Oi().destination;Oi().listener;Oi().draw;Oi()},9585:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(6489);function i(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 o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};const s=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.Q(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.Q(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),i(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]=i(this.cookies[r],t);return n},t.prototype.set=function(t,e,n){var i;"object"==typeof e&&(e=JSON.stringify(e)),this.cookies=o(o({},this.cookies),((i={})[t]=e,i)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.q(t,e,n)),this._emitChange({name:t,value:e,options:n})},t.prototype.remove=function(t,e){var n=e=o(o({},e),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=o({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.q(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}()},7147:(t,e,n)=>{"use strict";var r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in r,u="ArrayBuffer"in r;if(u)var l=["[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&&l.indexOf(Object.prototype.toString.call(t))>-1};function h(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');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 d(t){this.map={},t instanceof d?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 m(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function v(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function g(t){var e=new FileReader,n=v(e);return e.readAsArrayBuffer(t),n}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():u&&s&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=y(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):i&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=m(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(){if(this._bodyArrayBuffer){var t=m(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var t,e,n,r=m(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=v(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(x)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(t,e){t=h(t),e=f(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},d.prototype.delete=function(t){delete this.map[h(t)]},d.prototype.get=function(t){return t=h(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(h(t))},d.prototype.set=function(t,e){this.map[h(t)]=f(e)},d.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},d.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),p(t)},d.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),p(t)},d.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),p(t)},o&&(d.prototype[Symbol.iterator]=d.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,i=(e=e||{}).body;if(t instanceof w){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=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 d(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),_.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)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function x(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function S(t,e){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new d(e.headers),this.url=e.url||"",this._initBody(t)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},b.call(w.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},S.error=function(){var t=new S(null,{status:0,statusText:""});return t.type="error",t};var T=[301,302,303,307,308];S.redirect=function(t,e){if(-1===T.indexOf(e))throw new RangeError("Invalid status code");return new S(null,{status:e,headers:{location:t}})};var k=r.DOMException;try{new k}catch(t){(k=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack}).prototype=Object.create(Error.prototype),k.prototype.constructor=k}function C(t,e){return new Promise((function(n,i){var o=new w(t,e);if(o.signal&&o.signal.aborted)return i(new k("Aborted","AbortError"));var a=new XMLHttpRequest;function l(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var i="response"in a?a.response:a.responseText;setTimeout((function(){n(new S(i,r))}),0)},a.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){i(new k("Aborted","AbortError"))}),0)},a.open(o.method,function(t){try{return""===t&&r.location.href?r.location.href:t}catch(e){return t}}(o.url),!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":u&&o.headers.get("Content-Type")&&-1!==o.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof d?o.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,f(e.headers[t]))})),o.signal&&(o.signal.addEventListener("abort",l),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",l)}),a.send(void 0===o._bodyInit?null:o._bodyInit)}))}C.polyfill=!0,r.fetch||(r.fetch=C,r.Headers=d,r.Request=w,r.Response=S)},3229:(t,e,n)=>{"use strict";function r(t,e,n,r,i){var o={};return Object.keys(r).forEach((function(t){o[t]=r[t]})),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce((function(n,r){return r(t,e,n)||n}),o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}n.d(e,{Z:()=>r})},7326:(t,e,n)=>{"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{Z:()=>r})},5861:(t,e,n)=>{"use strict";function r(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}n.d(e,{Z:()=>i})},3144:(t,e,n)=>{"use strict";function r(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)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}n.d(e,{Z:()=>i})},7462:(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},r.apply(this,arguments)}n.d(e,{Z:()=>r})},1721:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,{Z:()=>i})},3269:(t,e,n)=>{"use strict";function r(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})}n.d(e,{Z:()=>r})},3366:(t,e,n)=>{"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}n.d(e,{Z:()=>r})}}]); |