diff --git a/examples/amSynth.html b/examples/amSynth.html index 20773fda..20469c95 100644 --- a/examples/amSynth.html +++ b/examples/amSynth.html @@ -6,11 +6,11 @@ - + - - + + diff --git a/examples/analysis.html b/examples/analysis.html index 473ac410..c3c803ef 100644 --- a/examples/analysis.html +++ b/examples/analysis.html @@ -7,11 +7,11 @@ - + - - + + diff --git a/examples/animationSync.html b/examples/animationSync.html index 26527d3b..a25783ae 100644 --- a/examples/animationSync.html +++ b/examples/animationSync.html @@ -7,11 +7,11 @@ - + - - + + diff --git a/examples/bembe.html b/examples/bembe.html index 8b9ea9cf..d266ee22 100644 --- a/examples/bembe.html +++ b/examples/bembe.html @@ -7,11 +7,11 @@ - + - - + + diff --git a/examples/buses.html b/examples/buses.html index c5afeb18..dcf6aeeb 100644 --- a/examples/buses.html +++ b/examples/buses.html @@ -7,11 +7,11 @@ - + - - + + diff --git a/examples/daw.html b/examples/daw.html index bf8b45a2..b630e48f 100644 --- a/examples/daw.html +++ b/examples/daw.html @@ -7,11 +7,11 @@ - + - - + + - - ${this.alt} - - `}}},function(t,e,n){var i=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(42),o=n(6)("iterator"),r=n(43);t.exports=n(13).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[i(t)]}},function(t,e,n){var i=n(13),o=n(3),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(35)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var i=n(14),o=n(10),r=n(40);t.exports=function(t){return function(e,n,s){var a,l=i(e),c=o(l.length),u=r(s,c);if(t&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(22);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){"use strict";var i=n(35),o=n(1),r=n(17),s=n(16),a=n(43),l=n(59),c=n(47),u=n(19),h=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,f,v,b,m){l(n,e,f);var g,y,x,_=function(t){if(!d&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",S="values"==v,E=!1,k=t.prototype,M=k[h]||k["@@iterator"]||v&&k[v],A=M||_(v),I=v?S?_("entries"):A:void 0,C="Array"==e&&k.entries||M;if(C&&(x=u(C.call(new t)))!==Object.prototype&&x.next&&(c(x,w,!0),i||"function"==typeof x[h]||s(x,h,p)),S&&M&&"values"!==M.name&&(E=!0,A=function(){return M.call(this)}),i&&!m||!d&&!E&&k[h]||s(k,h,A),a[e]=A,a[w]=p,v)if(g={values:S?A:_("values"),keys:b?A:_("keys"),entries:I},m)for(y in g)y in k||r(k,y,g[y]);else o(o.P+o.F*(d||E),e,g);return g}},function(t,e,n){"use strict";var i=n(30),o=n(33),r=n(47),s={};n(16)(s,n(6)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var i=n(4),o=n(22),r=n(6)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==o(t))}},function(t,e,n){var i=n(6)("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var r=[7],s=r[i]();s.next=function(){return{done:n=!0}},r[i]=function(){return s},t(r)}catch(t){}return n}},function(t,e,n){"use strict";var i=n(2);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var i=n(16),o=n(17),r=n(5),s=n(25),a=n(6);t.exports=function(t,e,n){var l=a(t),c=n(s,l,""[t]),u=c[0],h=c[1];r(function(){var e={};return e[l]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,u),i(RegExp.prototype,l,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,n){var i=n(2),o=n(12),r=n(6)("species");t.exports=function(t,e){var n,s=i(t).constructor;return void 0===s||null==(n=i(s)[r])?e:o(n)}},function(t,e,n){var i=n(3).navigator;t.exports=i&&i.userAgent||""},function(t,e,n){"use strict";var i=n(3),o=n(1),r=n(17),s=n(46),a=n(34),l=n(37),c=n(45),u=n(4),h=n(5),d=n(61),p=n(47),f=n(80);t.exports=function(t,e,n,v,b,m){var g=i[t],y=g,x=b?"set":"add",_=y&&y.prototype,w={},S=function(t){var e=_[t];r(_,t,"delete"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(m&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!u(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 y&&(m||_.forEach&&!h(function(){(new y).entries().next()}))){var E=new y,k=E[x](m?{}:-0,1)!=E,M=h(function(){E.has(1)}),A=d(function(t){new y(t)}),I=!m&&h(function(){for(var t=new y,e=5;e--;)t[x](e,e);return!t.has(-0)});A||((y=e(function(e,n){c(e,y,t);var i=f(new g,e,y);return null!=n&&l(n,b,i[x],i),i})).prototype=_,_.constructor=y),(M||I)&&(S("delete"),S("has"),b&&S("get")),(I||k)&&S(x),m&&_.clear&&delete _.clear}else y=v.getConstructor(e,t,b,x),s(y.prototype,n),a.NEED=!0;return p(y,t),w[t]=y,o(o.G+o.W+o.F*(y!=g),w),m||v.setStrong(y,t,b),y}},function(t,e,n){for(var i,o=n(3),r=n(16),s=n(39),a=s("typed_array"),l=s("view"),c=!(!o.ArrayBuffer||!o.DataView),u=c,h=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(i=o[d[h++]])?(r(i.prototype,a,!0),r(i.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:a,VIEW:l}},function(t,e,n){"use strict";t.exports=n(35)||!n(5)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(3)[t]})},function(t,e,n){"use strict";var i=n(1);t.exports=function(t){i(i.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var i=n(1),o=n(12),r=n(21),s=n(37);t.exports=function(t){i(i.S,t,{from:function(t){var e,n,i,a,l=arguments[1];return o(this),(e=void 0!==l)&&o(l),null==t?new this:(n=[],e?(i=0,a=r(l,arguments[2],2),s(t,!1,function(t){n.push(a(t,i++))})):s(t,!1,n.push,n),new this(n))}})}},function(t,e,n){var i=n(4),o=n(3).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){var i=n(3),o=n(13),r=n(35),s=n(101),a=n(8).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var i=n(54)("keys"),o=n(39);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(3).document;t.exports=i&&i.documentElement},function(t,e,n){"use strict";var i=n(29),o=n(56),r=n(52),s=n(11),a=n(51),l=Object.assign;t.exports=!l||n(5)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(var n=s(t),l=arguments.length,c=1,u=o.f,h=r.f;l>c;)for(var d,p=a(arguments[c++]),f=u?i(p).concat(u(p)):i(p),v=f.length,b=0;v>b;)h.call(p,d=f[b++])&&(n[d]=p[d]);return n}:l},function(t,e,n){var i=n(4),o=n(2),r=function(t,e){if(o(t),!i(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,i){try{(i=n(21)(Function.call,n(18).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:i(t,n),t}}({},!1):void 0),check:r}},function(t,e){t.exports=function(t,e,n){var i=void 0===n;switch(e.length){case 0:return i?t():t.call(n);case 1:return i?t(e[0]):t.call(n,e[0]);case 2:return i?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return i?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return i?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var i=n(4),o=n(77).set;t.exports=function(t,e,n){var r,s=e.constructor;return s!==n&&"function"==typeof s&&(r=s.prototype)!==n.prototype&&i(r)&&o&&o(t,r),t}},function(t,e,n){"use strict";var i=n(26),o=n(25);t.exports=function(t){var e=String(o(this)),n="",r=i(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var i=n(26),o=n(25);t.exports=function(t){return function(e,n){var r,s,a=String(o(e)),l=i(n),c=a.length;return l<0||l>=c?t?"":void 0:(r=a.charCodeAt(l))<55296||r>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):r:t?a.slice(l,l+2):s-56320+(r-55296<<10)+65536}}},function(t,e,n){var i=n(60),o=n(25);t.exports=function(t,e,n){if(i(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},function(t,e,n){var i=n(6)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var i=n(43),o=n(6)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||r[o]===t)}},function(t,e,n){"use strict";var i=n(8),o=n(33);t.exports=function(t,e,n){e in t?i.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var i=n(233);t.exports=function(t,e){return new(i(t))(e)}},function(t,e,n){"use strict";var i=n(11),o=n(40),r=n(10);t.exports=function(t){for(var e=i(this),n=r(e.length),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var i=n(36),o=n(92),r=n(43),s=n(14);t.exports=n(58)(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,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var i,o,r,s=n(21),a=n(78),l=n(75),c=n(71),u=n(3),h=u.process,d=u.setImmediate,p=u.clearImmediate,f=u.MessageChannel,v=u.Dispatch,b=0,m={},g=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},y=function(t){g.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++b]=function(){a("function"==typeof t?t:Function(t),e)},i(b),b},p=function(t){delete m[t]},"process"==n(22)(h)?i=function(t){h.nextTick(s(g,t,1))}:v&&v.now?i=function(t){v.now(s(g,t,1))}:f?(r=(o=new f).port2,o.port1.onmessage=y,i=s(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(t){u.postMessage(t+"","*")},u.addEventListener("message",y,!1)):i="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),g.call(t)}}:function(t){setTimeout(s(g,t,1),0)}),t.exports={set:d,clear:p}},function(t,e,n){var i=n(3),o=n(93).set,r=i.MutationObserver||i.WebKitMutationObserver,s=i.process,a=i.Promise,l="process"==n(22)(s);t.exports=function(){var t,e,n,c=function(){var i,o;for(l&&(i=s.domain)&&i.exit();t;){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,i&&i.enter()};if(l)n=function(){s.nextTick(c)};else if(!r||i.navigator&&i.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){o.call(i,c)};else{var h=!0,d=document.createTextNode("");new r(c).observe(d,{characterData:!0}),n=function(){d.data=h=!h}}return function(i){var o={fn:i,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";var i=n(12);function o(t){var e,n;this.promise=new t(function(t,i){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=i}),this.resolve=i(e),this.reject=i(n)}t.exports.f=function(t){return new o(t)}},function(t,e,n){"use strict";var i=n(3),o=n(9),r=n(35),s=n(67),a=n(16),l=n(46),c=n(5),u=n(45),h=n(26),d=n(10),p=n(123),f=n(41).f,v=n(8).f,b=n(90),m=n(47),g="prototype",y="Wrong index!",x=i.ArrayBuffer,_=i.DataView,w=i.Math,S=i.RangeError,E=i.Infinity,k=x,M=w.abs,A=w.pow,I=w.floor,C=w.log,T=w.LN2,N=o?"_b":"buffer",P=o?"_l":"byteLength",O=o?"_o":"byteOffset";function R(t,e,n){var i,o,r,s=new Array(n),a=8*n-e-1,l=(1<>1,u=23===e?A(2,-24)-A(2,-77):0,h=0,d=t<0||0===t&&1/t<0?1:0;for((t=M(t))!=t||t===E?(o=t!=t?1:0,i=l):(i=I(C(t)/T),t*(r=A(2,-i))<1&&(i--,r*=2),(t+=i+c>=1?u/r:u*A(2,1-c))*r>=2&&(i++,r/=2),i+c>=l?(o=0,i=l):i+c>=1?(o=(t*r-1)*A(2,e),i+=c):(o=t*A(2,c-1)*A(2,e),i=0));e>=8;s[h++]=255&o,o/=256,e-=8);for(i=i<0;s[h++]=255&i,i/=256,a-=8);return s[--h]|=128*d,s}function $(t,e,n){var i,o=8*n-e-1,r=(1<>1,a=o-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;a>0;u=256*u+t[l],l--,a-=8);for(i=u&(1<<-a)-1,u>>=-a,a+=e;a>0;i=256*i+t[l],l--,a-=8);if(0===u)u=1-s;else{if(u===r)return i?NaN:c?-E:E;i+=A(2,e),u-=s}return(c?-1:1)*i*A(2,u-e)}function F(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function z(t){return[255&t]}function D(t){return[255&t,t>>8&255]}function L(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function q(t){return R(t,52,8)}function j(t){return R(t,23,4)}function H(t,e,n){v(t[g],e,{get:function(){return this[n]}})}function V(t,e,n,i){var o=p(+n);if(o+e>t[P])throw S(y);var r=t[N]._b,s=o+t[O],a=r.slice(s,s+e);return i?a:a.reverse()}function B(t,e,n,i,o,r){var s=p(+n);if(s+e>t[P])throw S(y);for(var a=t[N]._b,l=s+t[O],c=i(+o),u=0;uY;)(G=W[Y++])in x||a(x,G,k[G]);r||(U.constructor=x)}var K=new _(new x(2)),J=_[g].setInt8;K.setInt8(0,2147483648),K.setInt8(1,2147483649),!K.getInt8(0)&&K.getInt8(1)||l(_[g],{setInt8:function(t,e){J.call(this,t,e<<24>>24)},setUint8:function(t,e){J.call(this,t,e<<24>>24)}},!0)}else x=function(t){u(this,x,"ArrayBuffer");var e=p(t);this._b=b.call(new Array(e),0),this[P]=e},_=function(t,e,n){u(this,_,"DataView"),u(t,x,"DataView");var i=t[P],o=h(e);if(o<0||o>i)throw S("Wrong offset!");if(o+(n=void 0===n?i-o:d(n))>i)throw S("Wrong length!");this[N]=t,this[O]=o,this[P]=n},o&&(H(x,"byteLength","_l"),H(_,"buffer","_b"),H(_,"byteLength","_l"),H(_,"byteOffset","_o")),l(_[g],{getInt8:function(t){return V(this,1,t)[0]<<24>>24},getUint8:function(t){return V(this,1,t)[0]},getInt16:function(t){var e=V(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=V(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return F(V(this,4,t,arguments[1]))},getUint32:function(t){return F(V(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return $(V(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return $(V(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){B(this,1,t,z,e)},setUint8:function(t,e){B(this,1,t,z,e)},setInt16:function(t,e){B(this,2,t,D,e,arguments[2])},setUint16:function(t,e){B(this,2,t,D,e,arguments[2])},setInt32:function(t,e){B(this,4,t,L,e,arguments[2])},setUint32:function(t,e){B(this,4,t,L,e,arguments[2])},setFloat32:function(t,e){B(this,4,t,j,e,arguments[2])},setFloat64:function(t,e){B(this,8,t,q,e,arguments[2])}});m(x,"ArrayBuffer"),m(_,"DataView"),a(_[g],s.VIEW,!0),e.ArrayBuffer=x,e.DataView=_},function(t,e,n){var i=n(41),o=n(56),r=n(2),s=n(3).Reflect;t.exports=s&&s.ownKeys||function(t){var e=i.f(r(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){var i=n(357);t.exports="string"==typeof i?i:i.toString()},function(t,e,n){t.exports=!n(9)&&!n(5)(function(){return 7!=Object.defineProperty(n(71)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){e.f=n(6)},function(t,e,n){var i=n(15),o=n(14),r=n(55)(!1),s=n(73)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),l=0,c=[];for(n in a)n!=s&&i(a,n)&&c.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~r(c,n)||c.push(n));return c}},function(t,e,n){var i=n(8),o=n(2),r=n(29);t.exports=n(9)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);return t}},function(t,e,n){var i=n(14),o=n(41).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(i(t))}},function(t,e,n){"use strict";var i=n(12),o=n(4),r=n(78),s=[].slice,a={};t.exports=Function.bind||function(t){var e=i(this),n=s.call(arguments,1),l=function(){var i=n.concat(s.call(arguments));return this instanceof l?function(t,e,n){if(!(e in a)){for(var i=[],o=0;o>>0||(s.test(n)?16:10))}:i},function(t,e,n){var i=n(3).parseFloat,o=n(48).trim;t.exports=1/i(n(79)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=i(e);return 0===n&&"-"==e.charAt(0)?-0:n}:i},function(t,e,n){var i=n(22);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=i(t))throw TypeError(e);return+t}},function(t,e,n){var i=n(4),o=Math.floor;t.exports=function(t){return!i(t)&&isFinite(t)&&o(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var i=n(82),o=Math.pow,r=o(2,-52),s=o(2,-23),a=o(2,127)*(2-s),l=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),c=i(t);return oa||n!=n?c*(1/0):c*n}},function(t,e,n){var i=n(2);t.exports=function(t,e,n,o){try{return o?e(i(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&i(r.call(t)),e}}},function(t,e,n){var i=n(12),o=n(11),r=n(51),s=n(10);t.exports=function(t,e,n,a,l){i(e);var c=o(t),u=r(c),h=s(c.length),d=l?h-1:0,p=l?-1:1;if(n<2)for(;;){if(d in u){a=u[d],d+=p;break}if(d+=p,l?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:h>d;d+=p)d in u&&(a=e(a,u[d],d,c));return a}},function(t,e,n){"use strict";var i=n(11),o=n(40),r=n(10);t.exports=[].copyWithin||function(t,e){var n=i(this),s=r(n.length),a=o(t,s),l=o(e,s),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?s:o(c,s))-l,s-a),h=1;for(l0;)l in n?n[a]=n[l]:delete n[a],a+=h,l+=h;return n}},function(t,e,n){n(9)&&"g"!=/./g.flags&&n(8).f(RegExp.prototype,"flags",{configurable:!0,get:n(62)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var i=n(2),o=n(4),r=n(95);t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var i=n(119),o=n(49);t.exports=n(66)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=i.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return i.def(o(this,"Map"),0===t?0:t,e)}},i,!0)},function(t,e,n){"use strict";var i=n(8).f,o=n(30),r=n(46),s=n(21),a=n(45),l=n(37),c=n(58),u=n(92),h=n(44),d=n(9),p=n(34).fastKey,f=n(49),v=d?"_s":"size",b=function(t,e){var n,i=p(e);if("F"!==i)return t._i[i];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var u=t(function(t,i){a(t,u,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,null!=i&&l(i,n,t[c],t)});return r(u.prototype,{clear:function(){for(var t=f(this,e),n=t._i,i=t._f;i;i=i.n)i.r=!0,i.p&&(i.p=i.p.n=void 0),delete n[i.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=f(this,e),i=b(n,t);if(i){var o=i.n,r=i.p;delete n._i[i.i],i.r=!0,r&&(r.n=o),o&&(o.p=r),n._f==i&&(n._f=o),n._l==i&&(n._l=r),n[v]--}return!!i},forEach:function(t){f(this,e);for(var n,i=s(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(i(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!b(f(this,e),t)}}),d&&i(u.prototype,"size",{get:function(){return f(this,e)[v]}}),u},def:function(t,e,n){var i,o,r=b(t,e);return r?r.v=n:(t._l=r={i:o=p(e,!0),k:e,v:n,p:i=t._l,n:void 0,r:!1},t._f||(t._f=r),i&&(i.n=r),t[v]++,"F"!==o&&(t._i[o]=r)),t},getEntry:b,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=f(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?u(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,u(1))},n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var i=n(119),o=n(49);t.exports=n(66)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return i.def(o(this,"Set"),t=0===t?0:t,t)}},i)},function(t,e,n){"use strict";var i,o=n(28)(0),r=n(17),s=n(34),a=n(76),l=n(122),c=n(4),u=n(5),h=n(49),d=s.getWeak,p=Object.isExtensible,f=l.ufstore,v={},b=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(c(t)){var e=d(t);return!0===e?f(h(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return l.def(h(this,"WeakMap"),t,e)}},g=t.exports=n(66)("WeakMap",b,m,l,!0,!0);u(function(){return 7!=(new g).set((Object.freeze||Object)(v),7).get(v)})&&(a((i=l.getConstructor(b,"WeakMap")).prototype,m),s.NEED=!0,o(["delete","has","get","set"],function(t){var e=g.prototype,n=e[t];r(e,t,function(e,o){if(c(e)&&!p(e)){this._f||(this._f=new i);var r=this._f[t](e,o);return"set"==t?this:r}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var i=n(46),o=n(34).getWeak,r=n(2),s=n(4),a=n(45),l=n(37),c=n(28),u=n(15),h=n(49),d=c(5),p=c(6),f=0,v=function(t){return t._l||(t._l=new b)},b=function(){this.a=[]},m=function(t,e){return d(t.a,function(t){return t[0]===e})};b.prototype={get:function(t){var e=m(this,t);if(e)return e[1]},has:function(t){return!!m(this,t)},set:function(t,e){var n=m(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var c=t(function(t,i){a(t,c,e,"_i"),t._t=e,t._i=f++,t._l=void 0,null!=i&&l(i,n,t[r],t)});return i(c.prototype,{delete:function(t){if(!s(t))return!1;var n=o(t);return!0===n?v(h(this,e)).delete(t):n&&u(n,this._i)&&delete n[this._i]},has:function(t){if(!s(t))return!1;var n=o(t);return!0===n?v(h(this,e)).has(t):n&&u(n,this._i)}}),c},def:function(t,e,n){var i=o(r(e),!0);return!0===i?v(t).set(e,n):i[t._i]=n,t},ufstore:v}},function(t,e,n){var i=n(26),o=n(10);t.exports=function(t){if(void 0===t)return 0;var e=i(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){"use strict";var i=n(57),o=n(4),r=n(10),s=n(21),a=n(6)("isConcatSpreadable");t.exports=function t(e,n,l,c,u,h,d,p){for(var f,v,b=u,m=0,g=!!d&&s(d,p,3);m0)b=t(e,n,f,r(f.length),b,h-1)-1;else{if(b>=9007199254740991)throw TypeError();e[b]=f}b++}m++}return b}},function(t,e,n){var i=n(10),o=n(81),r=n(25);t.exports=function(t,e,n,s){var a=String(r(t)),l=a.length,c=void 0===n?" ":String(n),u=i(e);if(u<=l||""==c)return a;var h=u-l,d=o.call(c,Math.ceil(h/c.length));return d.length>h&&(d=d.slice(0,h)),s?d+a:a+d}},function(t,e,n){var i=n(29),o=n(14),r=n(52).f;t.exports=function(t){return function(e){for(var n,s=o(e),a=i(s),l=a.length,c=0,u=[];l>c;)r.call(s,n=a[c++])&&u.push(t?[n,s[n]]:s[n]);return u}}},function(t,e,n){var i=n(42),o=n(128);t.exports=function(t){return function(){if(i(this)!=t)throw TypeError(t+"#toJSON isn't generic");return o(this)}}},function(t,e,n){var i=n(37);t.exports=function(t,e){var n=[];return i(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,i,o){return 0===arguments.length||t!=t||e!=e||n!=n||i!=i||o!=o?NaN:t===1/0||t===-1/0?t:(t-e)*(o-i)/(n-e)+i}},function(t,e,n){var i=n(42),o=n(6)("iterator"),r=n(43);t.exports=n(13).isIterable=function(t){var e=Object(t);return void 0!==e[o]||"@@iterator"in e||r.hasOwnProperty(i(e))}},function(t,e,n){"use strict";var i=n(132),o=n(78),r=n(12);t.exports=function(){for(var t=r(this),e=arguments.length,n=new Array(e),s=0,a=i._,l=!1;e>s;)(n[s]=arguments[s++])===a&&(l=!0);return function(){var i,r=arguments.length,s=0,c=0;if(!l&&!r)return o(t,n,this);if(i=n.slice(),l)for(;e>s;s++)i[s]===a&&(i[s]=arguments[c++]);for(;r>c;)i.push(arguments[c++]);return o(t,i,this)}}},function(t,e,n){t.exports=n(3)},function(t,e,n){var i=n(8),o=n(18),r=n(97),s=n(14);t.exports=function(t,e){for(var n,a=r(s(e)),l=a.length,c=0;l>c;)i.f(t,n=a[c++],o.f(e,n));return t}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=(s=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),r=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(r).concat([o]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o1?n-1:0),a=1;a1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=O(t,360),e=O(e,100),n=O(n,100),0===e)i=o=r=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=s(l,a,t+1/3),o=s(l,a,t),r=s(l,a,t-1/3)}return{r:255*i,g:255*o,b:255*r}}(t.h,i,l),h=!0,d="hsl"),t.hasOwnProperty("a")&&(n=t.a));var p,f,v;return n=P(n),{ok:h,format:t.format||d,r:c(255,u(e.r,0)),g:c(255,u(e.g,0)),b:c(255,u(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=a++}function p(t,e,n){t=O(t,255),e=O(e,255),n=O(n,255);var i,o,r=u(t,e,n),s=c(t,e,n),a=(r+s)/2;if(r==s)i=o=0;else{var l=r-s;switch(o=a>.5?l/(2-r-s):l/(r+s),r){case t:i=(e-n)/l+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,r.push(d(i));return r}function C(t,e){e=e||6;for(var n=d(t).toHsv(),i=n.h,o=n.s,r=n.v,s=[],a=1/e;e--;)s.push(d({h:i,s:o,v:r})),r=(r+a)%1;return s}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,i=this.toRgb();return t=i.r/255,e=i.g/255,n=i.b/255,.2126*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=P(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),i=l(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),n=l(100*t.s),i=l(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+i+"%)":"hsla("+e+", "+n+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return v(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,n,i,o){var r=[F(l(t).toString(16)),F(l(e).toString(16)),F(l(n).toString(16)),F(D(i))];if(o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)&&r[3].charAt(0)==r[3].charAt(1))return r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0);return r.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*O(this._r,255))+"%",g:l(100*O(this._g,255))+"%",b:l(100*O(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*O(this._r,255))+"%, "+l(100*O(this._g,255))+"%, "+l(100*O(this._b,255))+"%)":"rgba("+l(100*O(this._r,255))+"%, "+l(100*O(this._g,255))+"%, "+l(100*O(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(N[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+b(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=d(t);n="#"+b(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,i=this._a<1&&this._a>=0;return e||!i||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex4"===t&&(n=this.toHex8String(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(S,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},d.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:z(t[i]));t=n}return d(t,e)},d.equals=function(t,e){return!(!t||!e)&&d(t).toRgbString()==d(e).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(t,e,n){n=0===n?0:n||50;var i=d(t).toRgb(),o=d(e).toRgb(),r=n/100;return d({r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a})},d.readability=function(t,e){var n=d(t),i=d(e);return(o.max(n.getLuminance(),i.getLuminance())+.05)/(o.min(n.getLuminance(),i.getLuminance())+.05)},d.isReadable=function(t,e,n){var i,o,r=d.readability(t,e);switch(o=!1,(i=function(t){var e,n;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==n&&"large"!==n&&(n="small");return{level:e,size:n}}(n)).level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7}return o},d.mostReadable=function(t,e,n){var i,o,r,s,a=null,l=0;o=(n=n||{}).includeFallbackColors,r=n.level,s=n.size;for(var c=0;cl&&(l=i,a=d(e[c]));return d.isReadable(t,a,{level:r,size:s})||!o?a:(n.includeFallbackColors=!1,d.mostReadable(t,["#fff","#000"],n))};var T=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},N=d.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(T);function P(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function O(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=c(e,u(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),o.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function R(t){return c(1,u(0,t))}function $(t){return parseInt(t,16)}function F(t){return 1==t.length?"0"+t:""+t}function z(t){return t<=1&&(t=100*t+"%"),t}function D(t){return o.round(255*parseFloat(t)).toString(16)}function L(t){return $(t)/255}var q,j,H,V=(j="[\\s|\\(]+("+(q="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",H="[\\s|\\(]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")[,|\\s]+("+q+")\\s*\\)?",{CSS_UNIT:new RegExp(q),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(t){return!!V.CSS_UNIT.exec(t)}t.exports?t.exports=d:void 0===(i=function(){return d}.call(e,n,e,t))||(t.exports=i)}(Math)},function(t,e,n){var i=n(358),o=n(359),r=n(360),s=n(361),a=n(362),l=n(363);function c(t){this._setState(t),this._listeners={},this._bind()}c.prototype._setState=i._setState,c.prototype._extendState=i._extendState,c.prototype.set=i.set,c.prototype.get=i.get,c.prototype.down=o.down,c.prototype.up=o.up,c.prototype._trigger=o._trigger,c.prototype._bind=o._bind,c.prototype._map=r._map,c.prototype._offset=r._offset,c.prototype._isNote=r._isNote,c.prototype._toFrequency=r._toFrequency,c.prototype._keyMap=r._keyMap,c.prototype._addKey=s._addKey,c.prototype._removeKey=s._removeKey,c.prototype._isPressed=s._isPressed,c.prototype._makeNote=s._makeNote,c.prototype.clear=s.clear,c.prototype._update=s._update,c.prototype._diff=s._diff,c.prototype._prioritize=a._prioritize,c.prototype._last=a._last,c.prototype._first=a._first,c.prototype._highest=a._highest,c.prototype._lowest=a._lowest,c.prototype._isSpecialKey=l._isSpecialKey,c.prototype._specialKey=l._specialKey,c.prototype._specialKeyMap=l._specialKeyMap,t.exports=c},function(t,e,n){var i=n(364),o=i.library["bundle-node"]?i.library["dist-node"]:i.library.entry;t.exports=n(365)("./"+o)},function(t,e,n){n(141),t.exports=n(366)},function(t,e,n){n(142),n(339),n(53),n(341),n(130),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),t.exports=n(13)},function(t,e,n){n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(174),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(223),n(224),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(91),n(247),n(248),n(115),n(249),n(250),n(251),n(252),n(253),n(118),n(120),n(121),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),t.exports=n(13)},function(t,e,n){"use strict";var i=n(3),o=n(15),r=n(9),s=n(1),a=n(17),l=n(34).KEY,c=n(5),u=n(54),h=n(47),d=n(39),p=n(6),f=n(101),v=n(72),b=n(144),m=n(57),g=n(2),y=n(4),x=n(14),_=n(24),w=n(33),S=n(30),E=n(104),k=n(18),M=n(8),A=n(29),I=k.f,C=M.f,T=E.f,N=i.Symbol,P=i.JSON,O=P&&P.stringify,R=p("_hidden"),$=p("toPrimitive"),F={}.propertyIsEnumerable,z=u("symbol-registry"),D=u("symbols"),L=u("op-symbols"),q=Object.prototype,j="function"==typeof N,H=i.QObject,V=!H||!H.prototype||!H.prototype.findChild,B=r&&c(function(){return 7!=S(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=I(q,e);i&&delete q[e],C(t,e,n),i&&t!==q&&C(q,e,i)}:C,G=function(t){var e=D[t]=S(N.prototype);return e._k=t,e},U=j&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},W=function(t,e,n){return t===q&&W(L,e,n),g(t),e=_(e,!0),g(n),o(D,e)?(n.enumerable?(o(t,R)&&t[R][e]&&(t[R][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,R)||C(t,R,w(1,{})),t[R][e]=!0),B(t,e,n)):C(t,e,n)},Y=function(t,e){g(t);for(var n,i=b(e=x(e)),o=0,r=i.length;r>o;)W(t,n=i[o++],e[n]);return t},K=function(t){var e=F.call(this,t=_(t,!0));return!(this===q&&o(D,t)&&!o(L,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,R)&&this[R][t])||e)},J=function(t,e){if(t=x(t),e=_(e,!0),t!==q||!o(D,e)||o(L,e)){var n=I(t,e);return!n||!o(D,e)||o(t,R)&&t[R][e]||(n.enumerable=!0),n}},X=function(t){for(var e,n=T(x(t)),i=[],r=0;n.length>r;)o(D,e=n[r++])||e==R||e==l||i.push(e);return i},Q=function(t){for(var e,n=t===q,i=T(n?L:x(t)),r=[],s=0;i.length>s;)!o(D,e=i[s++])||n&&!o(q,e)||r.push(D[e]);return r};j||(a((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=d(arguments.length>0?arguments[0]:void 0),e=function(n){this===q&&e.call(L,n),o(this,R)&&o(this[R],t)&&(this[R][t]=!1),B(this,t,w(1,n))};return r&&V&&B(q,t,{configurable:!0,set:e}),G(t)}).prototype,"toString",function(){return this._k}),k.f=J,M.f=W,n(41).f=E.f=X,n(52).f=K,n(56).f=Q,r&&!n(35)&&a(q,"propertyIsEnumerable",K,!0),f.f=function(t){return G(p(t))}),s(s.G+s.W+s.F*!j,{Symbol:N});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)p(Z[tt++]);for(var et=A(p.store),nt=0;et.length>nt;)v(et[nt++]);s(s.S+s.F*!j,"Symbol",{for:function(t){return o(z,t+="")?z[t]:z[t]=N(t)},keyFor:function(t){if(!U(t))throw TypeError(t+" is not a symbol!");for(var e in z)if(z[e]===t)return e},useSetter:function(){V=!0},useSimple:function(){V=!1}}),s(s.S+s.F*!j,"Object",{create:function(t,e){return void 0===e?S(t):Y(S(t),e)},defineProperty:W,defineProperties:Y,getOwnPropertyDescriptor:J,getOwnPropertyNames:X,getOwnPropertySymbols:Q}),P&&s(s.S+s.F*(!j||c(function(){var t=N();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))})),"JSON",{stringify:function(t){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=e=i[1],(y(e)||void 0!==t)&&!U(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!U(e))return e}),i[1]=e,O.apply(P,i)}}),N.prototype[$]||n(16)(N.prototype,$,N.prototype.valueOf),h(N,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(t,e,n){var i=n(29),o=n(56),r=n(52);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,a=n(t),l=r.f,c=0;a.length>c;)l.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var i=n(1);i(i.S,"Object",{create:n(30)})},function(t,e,n){var i=n(1);i(i.S+i.F*!n(9),"Object",{defineProperty:n(8).f})},function(t,e,n){var i=n(1);i(i.S+i.F*!n(9),"Object",{defineProperties:n(103)})},function(t,e,n){var i=n(14),o=n(18).f;n(27)("getOwnPropertyDescriptor",function(){return function(t,e){return o(i(t),e)}})},function(t,e,n){var i=n(11),o=n(19);n(27)("getPrototypeOf",function(){return function(t){return o(i(t))}})},function(t,e,n){var i=n(11),o=n(29);n(27)("keys",function(){return function(t){return o(i(t))}})},function(t,e,n){n(27)("getOwnPropertyNames",function(){return n(104).f})},function(t,e,n){var i=n(4),o=n(34).onFreeze;n(27)("freeze",function(t){return function(e){return t&&i(e)?t(o(e)):e}})},function(t,e,n){var i=n(4),o=n(34).onFreeze;n(27)("seal",function(t){return function(e){return t&&i(e)?t(o(e)):e}})},function(t,e,n){var i=n(4),o=n(34).onFreeze;n(27)("preventExtensions",function(t){return function(e){return t&&i(e)?t(o(e)):e}})},function(t,e,n){var i=n(4);n(27)("isFrozen",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(4);n(27)("isSealed",function(t){return function(e){return!i(e)||!!t&&t(e)}})},function(t,e,n){var i=n(4);n(27)("isExtensible",function(t){return function(e){return!!i(e)&&(!t||t(e))}})},function(t,e,n){var i=n(1);i(i.S+i.F,"Object",{assign:n(76)})},function(t,e,n){var i=n(1);i(i.S,"Object",{is:n(160)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var i=n(1);i(i.S,"Object",{setPrototypeOf:n(77).set})},function(t,e,n){"use strict";var i=n(42),o={};o[n(6)("toStringTag")]="z",o+""!="[object z]"&&n(17)(Object.prototype,"toString",function(){return"[object "+i(this)+"]"},!0)},function(t,e,n){var i=n(1);i(i.P,"Function",{bind:n(105)})},function(t,e,n){var i=n(8).f,o=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in o||n(9)&&i(o,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var i=n(4),o=n(19),r=n(6)("hasInstance"),s=Function.prototype;r in s||n(8).f(s,r,{value:function(t){if("function"!=typeof this||!i(t))return!1;if(!i(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var i=n(1),o=n(106);i(i.G+i.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var i=n(1),o=n(107);i(i.G+i.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var i=n(3),o=n(15),r=n(22),s=n(80),a=n(24),l=n(5),c=n(41).f,u=n(18).f,h=n(8).f,d=n(48).trim,p=i.Number,f=p,v=p.prototype,b="Number"==r(n(30)(v)),m="trim"in String.prototype,g=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,i,o,r=(e=m?e.trim():d(e,3)).charCodeAt(0);if(43===r||45===r){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===r){switch(e.charCodeAt(1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+e}for(var s,l=e.slice(2),c=0,u=l.length;co)return NaN;return parseInt(l,i)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(b?l(function(){v.valueOf.call(n)}):"Number"!=r(n))?s(new f(g(e)),n,p):g(e)};for(var y,x=n(9)?c(f):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;x.length>_;_++)o(f,y=x[_])&&!o(p,y)&&h(p,y,u(f,y));p.prototype=v,v.constructor=p,n(17)(i,"Number",p)}},function(t,e,n){"use strict";var i=n(1),o=n(26),r=n(108),s=n(81),a=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",h=function(t,e){for(var n=-1,i=e;++n<6;)i+=t*c[n],c[n]=i%1e7,i=l(i/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=l(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+s.call("0",7-n.length)+n}return e},f=function(t,e,n){return 0===e?n:e%2==1?f(t,e-1,n*t):f(t*t,e/2,n)};i(i.P+i.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(5)(function(){a.call({})})),"Number",{toFixed:function(t){var e,n,i,a,l=r(this,u),c=o(t),v="",b="0";if(c<0||c>20)throw RangeError(u);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(l*f(2,69,1))-69)<0?l*f(2,-e,1):l/f(2,e,1),n*=4503599627370496,(e=52-e)>0){for(h(0,n),i=c;i>=7;)h(1e7,0),i-=7;for(h(f(10,i,1),0),i=e-1;i>=23;)d(1<<23),i-=23;d(1<0?v+((a=b.length)<=c?"0."+s.call("0",c-a)+b:b.slice(0,a-c)+"."+b.slice(a-c)):v+b}})},function(t,e,n){"use strict";var i=n(1),o=n(5),r=n(108),s=1..toPrecision;i(i.P+i.F*(o(function(){return"1"!==s.call(1,void 0)})||!o(function(){s.call({})})),"Number",{toPrecision:function(t){var e=r(this,"Number#toPrecision: incorrect invocation!");return void 0===t?s.call(e):s.call(e,t)}})},function(t,e,n){var i=n(1);i(i.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var i=n(1),o=n(3).isFinite;i(i.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var i=n(1);i(i.S,"Number",{isInteger:n(109)})},function(t,e,n){var i=n(1);i(i.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var i=n(1),o=n(109),r=Math.abs;i(i.S,"Number",{isSafeInteger:function(t){return o(t)&&r(t)<=9007199254740991}})},function(t,e,n){var i=n(1);i(i.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var i=n(1);i(i.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var i=n(1),o=n(107);i(i.S+i.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var i=n(1),o=n(106);i(i.S+i.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var i=n(1),o=n(110),r=Math.sqrt,s=Math.acosh;i(i.S+i.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:o(t-1+r(t-1)*r(t+1))}})},function(t,e,n){var i=n(1),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var i=n(1),o=Math.atanh;i(i.S+i.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var i=n(1),o=n(82);i(i.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var i=n(1);i(i.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var i=n(1),o=Math.exp;i(i.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var i=n(1),o=n(83);i(i.S+i.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){var i=n(1);i(i.S,"Math",{fround:n(111)})},function(t,e,n){var i=n(1),o=Math.abs;i(i.S,"Math",{hypot:function(t,e){for(var n,i,r=0,s=0,a=arguments.length,l=0;s0?(i=n/l)*i:n;return l===1/0?1/0:l*Math.sqrt(r)}})},function(t,e,n){var i=n(1),o=Math.imul;i(i.S+i.F*n(5)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=+t,i=+e,o=65535&n,r=65535&i;return 0|o*r+((65535&n>>>16)*r+o*(65535&i>>>16)<<16>>>0)}})},function(t,e,n){var i=n(1);i(i.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var i=n(1);i(i.S,"Math",{log1p:n(110)})},function(t,e,n){var i=n(1);i(i.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var i=n(1);i(i.S,"Math",{sign:n(82)})},function(t,e,n){var i=n(1),o=n(83),r=Math.exp;i(i.S+i.F*n(5)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(r(t-1)-r(-t-1))*(Math.E/2)}})},function(t,e,n){var i=n(1),o=n(83),r=Math.exp;i(i.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(r(t)+r(-t))}})},function(t,e,n){var i=n(1);i(i.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var i=n(1),o=n(40),r=String.fromCharCode,s=String.fromCodePoint;i(i.S+i.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(t){for(var e,n=[],i=arguments.length,s=0;i>s;){if(e=+arguments[s++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?r(e):r(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var i=n(1),o=n(14),r=n(10);i(i.S,"String",{raw:function(t){for(var e=o(t.raw),n=r(e.length),i=arguments.length,s=[],a=0;n>a;)s.push(String(e[a++])),a=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var i=n(1),o=n(84)(!1);i(i.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var i=n(1),o=n(10),r=n(85),s="".endsWith;i(i.P+i.F*n(86)("endsWith"),"String",{endsWith:function(t){var e=r(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,i=o(e.length),a=void 0===n?i:Math.min(o(n),i),l=String(t);return s?s.call(e,l,a):e.slice(a-l.length,a)===l}})},function(t,e,n){"use strict";var i=n(1),o=n(85);i(i.P+i.F*n(86)("includes"),"String",{includes:function(t){return!!~o(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var i=n(1);i(i.P,"String",{repeat:n(81)})},function(t,e,n){"use strict";var i=n(1),o=n(10),r=n(85),s="".startsWith;i(i.P+i.F*n(86)("startsWith"),"String",{startsWith:function(t){var e=r(this,t,"startsWith"),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),i=String(t);return s?s.call(e,i,n):e.slice(n,n+i.length)===i}})},function(t,e,n){"use strict";n(20)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(20)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(20)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(20)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(20)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(20)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(20)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(20)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(20)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(20)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(20)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(20)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(20)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var i=n(1);i(i.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var i=n(1),o=n(11),r=n(24);i(i.P+i.F*n(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=r(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var i=n(1),o=n(222);i(i.P+i.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var i=n(5),o=Date.prototype.getTime,r=Date.prototype.toISOString,s=function(t){return t>9?t:"0"+t};t.exports=i(function(){return"0385-07-25T07:06:39.999Z"!=r.call(new Date(-5e13-1))})||!i(function(){r.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),i=e<0?"-":e>9999?"+":"";return i+("00000"+Math.abs(e)).slice(i?-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"}:r},function(t,e,n){var i=Date.prototype,o=i.toString,r=i.getTime;new Date(NaN)+""!="Invalid Date"&&n(17)(i,"toString",function(){var t=r.call(this);return t==t?o.call(this):"Invalid Date"})},function(t,e,n){var i=n(6)("toPrimitive"),o=Date.prototype;i in o||n(16)(o,i,n(225))},function(t,e,n){"use strict";var i=n(2),o=n(24);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return o(i(this),"number"!=t)}},function(t,e,n){var i=n(1);i(i.S,"Array",{isArray:n(57)})},function(t,e,n){"use strict";var i=n(21),o=n(1),r=n(11),s=n(112),a=n(87),l=n(10),c=n(88),u=n(53);o(o.S+o.F*!n(61)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,h,d=r(t),p="function"==typeof this?this:Array,f=arguments.length,v=f>1?arguments[1]:void 0,b=void 0!==v,m=0,g=u(d);if(b&&(v=i(v,f>2?arguments[2]:void 0,2)),null==g||p==Array&&a(g))for(n=new p(e=l(d.length));e>m;m++)c(n,m,b?v(d[m],m):d[m]);else for(h=g.call(d),n=new p;!(o=h.next()).done;m++)c(n,m,b?s(h,v,[o.value,m],!0):o.value);return n.length=m,n}})},function(t,e,n){"use strict";var i=n(1),o=n(88);i(i.S+i.F*n(5)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var i=n(1),o=n(14),r=[].join;i(i.P+i.F*(n(51)!=Object||!n(23)(r)),"Array",{join:function(t){return r.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var i=n(1),o=n(75),r=n(22),s=n(40),a=n(10),l=[].slice;i(i.P+i.F*n(5)(function(){o&&l.call(o)}),"Array",{slice:function(t,e){var n=a(this.length),i=r(this);if(e=void 0===e?n:e,"Array"==i)return l.call(this,t,e);for(var o=s(t,n),c=s(e,n),u=a(c-o),h=new Array(u),d=0;d1&&(i=Math.min(i,r(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in e&&e[i]===t)return i||0;return-1}})},function(t,e,n){var i=n(1);i(i.P,"Array",{copyWithin:n(114)}),n(36)("copyWithin")},function(t,e,n){var i=n(1);i(i.P,"Array",{fill:n(90)}),n(36)("fill")},function(t,e,n){"use strict";var i=n(1),o=n(28)(5),r=!0;"find"in[]&&Array(1).find(function(){r=!1}),i(i.P+i.F*r,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)("find")},function(t,e,n){"use strict";var i=n(1),o=n(28)(6),r="findIndex",s=!0;r in[]&&Array(1)[r](function(){s=!1}),i(i.P+i.F*s,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)(r)},function(t,e,n){n(44)("Array")},function(t,e,n){var i=n(3),o=n(80),r=n(8).f,s=n(41).f,a=n(60),l=n(62),c=i.RegExp,u=c,h=c.prototype,d=/a/g,p=/a/g,f=new c(d)!==d;if(n(9)&&(!f||n(5)(function(){return p[n(6)("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")}))){c=function(t,e){var n=this instanceof c,i=a(t),r=void 0===e;return!n&&i&&t.constructor===c&&r?t:o(f?new u(i&&!r?t.source:t,e):u((i=t instanceof c)?t.source:t,i&&r?l.call(t):e),n?this:h,c)};for(var v=function(t){t in c||r(c,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},b=s(u),m=0;b.length>m;)v(b[m++]);h.constructor=c,c.prototype=h,n(17)(i,"RegExp",c)}n(44)("RegExp")},function(t,e,n){"use strict";n(115);var i=n(2),o=n(62),r=n(9),s=/./.toString,a=function(t){n(17)(RegExp.prototype,"toString",t,!0)};n(5)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?a(function(){var t=i(this);return"/".concat(t.source,"/","flags"in t?t.flags:!r&&t instanceof RegExp?o.call(t):void 0)}):"toString"!=s.name&&a(function(){return s.call(this)})},function(t,e,n){n(63)("match",1,function(t,e,n){return[function(n){"use strict";var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i):new RegExp(n)[e](String(i))},n]})},function(t,e,n){n(63)("replace",2,function(t,e,n){return[function(i,o){"use strict";var r=t(this),s=null==i?void 0:i[e];return void 0!==s?s.call(i,r,o):n.call(String(r),i,o)},n]})},function(t,e,n){n(63)("search",1,function(t,e,n){return[function(n){"use strict";var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i):new RegExp(n)[e](String(i))},n]})},function(t,e,n){n(63)("split",2,function(t,e,i){"use strict";var o=n(60),r=i,s=[].push;if("c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length){var a=void 0===/()??/.exec("")[1];i=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return r.call(n,t,e);var i,l,c,u,h,d=[],p=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,v=void 0===e?4294967295:e>>>0,b=new RegExp(t.source,p+"g");for(a||(i=new RegExp("^"+b.source+"$(?!\\s)",p));(l=b.exec(n))&&!((c=l.index+l[0].length)>f&&(d.push(n.slice(f,l.index)),!a&&l.length>1&&l[0].replace(i,function(){for(h=1;h1&&l.index=v));)b.lastIndex===l.index&&b.lastIndex++;return f===n.length?!u&&b.test("")||d.push(""):d.push(n.slice(f)),d.length>v?d.slice(0,v):d}}else"0".split(void 0,0).length&&(i=function(t,e){return void 0===t&&0===e?[]:r.call(this,t,e)});return[function(n,o){var r=t(this),s=null==n?void 0:n[e];return void 0!==s?s.call(n,r,o):i.call(String(r),n,o)},i]})},function(t,e,n){"use strict";var i,o,r,s,a=n(35),l=n(3),c=n(21),u=n(42),h=n(1),d=n(4),p=n(12),f=n(45),v=n(37),b=n(64),m=n(93).set,g=n(94)(),y=n(95),x=n(116),_=n(65),w=n(117),S=l.TypeError,E=l.process,k=E&&E.versions,M=k&&k.v8||"",A=l.Promise,I="process"==u(E),C=function(){},T=o=y.f,N=!!function(){try{var t=A.resolve(1),e=(t.constructor={})[n(6)("species")]=function(t){t(C,C)};return(I||"function"==typeof PromiseRejectionEvent)&&t.then(C)instanceof e&&0!==M.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),P=function(t){var e;return!(!d(t)||"function"!=typeof(e=t.then))&&e},O=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var i=t._v,o=1==t._s,r=0,s=function(e){var n,r,s,a=o?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{a?(o||(2==t._h&&F(t),t._h=1),!0===a?n=i:(u&&u.enter(),n=a(i),u&&(u.exit(),s=!0)),n===e.promise?c(S("Promise-chain cycle")):(r=P(n))?r.call(n,l,c):l(n)):c(i)}catch(t){u&&!s&&u.exit(),c(t)}};n.length>r;)s(n[r++]);t._c=[],t._n=!1,e&&!t._h&&R(t)})}},R=function(t){m.call(l,function(){var e,n,i,o=t._v,r=$(t);if(r&&(e=x(function(){I?E.emit("unhandledRejection",o,t):(n=l.onunhandledrejection)?n({promise:t,reason:o}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",o)}),t._h=I||$(t)?2:1),t._a=void 0,r&&e.e)throw e.v})},$=function(t){return 1!==t._h&&0===(t._a||t._c).length},F=function(t){m.call(l,function(){var e;I?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})})},z=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()),O(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=P(t))?g(function(){var i={_w:n,_d:!1};try{e.call(t,c(D,i,1),c(z,i,1))}catch(t){z.call(i,t)}}):(n._v=t,n._s=1,O(n,!1))}catch(t){z.call({_w:n,_d:!1},t)}}};N||(A=function(t){f(this,A,"Promise","_h"),p(t),i.call(this);try{t(c(D,this,1),c(z,this,1))}catch(t){z.call(this,t)}},(i=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(46)(A.prototype,{then:function(t,e){var n=T(b(this,A));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=I?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new i;this.promise=t,this.resolve=c(D,t,1),this.reject=c(z,t,1)},y.f=T=function(t){return t===A||t===s?new r(t):o(t)}),h(h.G+h.W+h.F*!N,{Promise:A}),n(47)(A,"Promise"),n(44)("Promise"),s=n(13).Promise,h(h.S+h.F*!N,"Promise",{reject:function(t){var e=T(this);return(0,e.reject)(t),e.promise}}),h(h.S+h.F*(a||!N),"Promise",{resolve:function(t){return w(a&&this===s?A:this,t)}}),h(h.S+h.F*!(N&&n(61)(function(t){A.all(t).catch(C)})),"Promise",{all:function(t){var e=this,n=T(e),i=n.resolve,o=n.reject,r=x(function(){var n=[],r=0,s=1;v(t,!1,function(t){var a=r++,l=!1;n.push(void 0),s++,e.resolve(t).then(function(t){l||(l=!0,n[a]=t,--s||i(n))},o)}),--s||i(n)});return r.e&&o(r.v),n.promise},race:function(t){var e=this,n=T(e),i=n.reject,o=x(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,i)})});return o.e&&i(o.v),n.promise}})},function(t,e,n){"use strict";var i=n(122),o=n(49);n(66)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return i.def(o(this,"WeakSet"),t,!0)}},i,!1,!0)},function(t,e,n){"use strict";var i=n(1),o=n(67),r=n(96),s=n(2),a=n(40),l=n(10),c=n(4),u=n(3).ArrayBuffer,h=n(64),d=r.ArrayBuffer,p=r.DataView,f=o.ABV&&u.isView,v=d.prototype.slice,b=o.VIEW;i(i.G+i.W+i.F*(u!==d),{ArrayBuffer:d}),i(i.S+i.F*!o.CONSTR,"ArrayBuffer",{isView:function(t){return f&&f(t)||c(t)&&b in t}}),i(i.P+i.U+i.F*n(5)(function(){return!new d(2).slice(1,void 0).byteLength}),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(s(this),t);for(var n=s(this).byteLength,i=a(t,n),o=a(void 0===e?n:e,n),r=new(h(this,d))(l(o-i)),c=new p(this),u=new p(r),f=0;i=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}}),i(i.S,"Reflect",{enumerate:function(t){return new r(t)}})},function(t,e,n){var i=n(18),o=n(19),r=n(15),s=n(1),a=n(4),l=n(2);s(s.S,"Reflect",{get:function t(e,n){var s,c,u=arguments.length<3?e:arguments[2];return l(e)===u?e[n]:(s=i.f(e,n))?r(s,"value")?s.value:void 0!==s.get?s.get.call(u):void 0:a(c=o(e))?t(c,n,u):void 0}})},function(t,e,n){var i=n(18),o=n(1),r=n(2);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return i.f(r(t),e)}})},function(t,e,n){var i=n(1),o=n(19),r=n(2);i(i.S,"Reflect",{getPrototypeOf:function(t){return o(r(t))}})},function(t,e,n){var i=n(1);i(i.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var i=n(1),o=n(2),r=Object.isExtensible;i(i.S,"Reflect",{isExtensible:function(t){return o(t),!r||r(t)}})},function(t,e,n){var i=n(1);i(i.S,"Reflect",{ownKeys:n(97)})},function(t,e,n){var i=n(1),o=n(2),r=Object.preventExtensions;i(i.S,"Reflect",{preventExtensions:function(t){o(t);try{return r&&r(t),!0}catch(t){return!1}}})},function(t,e,n){var i=n(8),o=n(18),r=n(19),s=n(15),a=n(1),l=n(33),c=n(2),u=n(4);a(a.S,"Reflect",{set:function t(e,n,a){var h,d,p=arguments.length<4?e:arguments[3],f=o.f(c(e),n);if(!f){if(u(d=r(e)))return t(d,n,a,p);f=l(0)}if(s(f,"value")){if(!1===f.writable||!u(p))return!1;if(h=o.f(p,n)){if(h.get||h.set||!1===h.writable)return!1;h.value=a,i.f(p,n,h)}else i.f(p,n,l(0,a));return!0}return void 0!==f.set&&(f.set.call(p,a),!0)}})},function(t,e,n){var i=n(1),o=n(77);o&&i(i.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var i=n(1),o=n(55)(!0);i(i.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(36)("includes")},function(t,e,n){"use strict";var i=n(1),o=n(124),r=n(11),s=n(10),a=n(12),l=n(89);i(i.P,"Array",{flatMap:function(t){var e,n,i=r(this);return a(t),e=s(i.length),n=l(i,0),o(n,i,i,e,0,1,t,arguments[1]),n}}),n(36)("flatMap")},function(t,e,n){"use strict";var i=n(1),o=n(124),r=n(11),s=n(10),a=n(26),l=n(89);i(i.P,"Array",{flatten:function(){var t=arguments[0],e=r(this),n=s(e.length),i=l(e,0);return o(i,e,e,n,0,void 0===t?1:a(t)),i}}),n(36)("flatten")},function(t,e,n){"use strict";var i=n(1),o=n(84)(!0);i(i.P,"String",{at:function(t){return o(this,t)}})},function(t,e,n){"use strict";var i=n(1),o=n(125),r=n(65);i(i.P+i.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(r),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var i=n(1),o=n(125),r=n(65);i(i.P+i.F*/Version\/10\.\d+(\.\d+)? Safari\//.test(r),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(48)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(48)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var i=n(1),o=n(25),r=n(10),s=n(60),a=n(62),l=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(59)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),i(i.P,"String",{matchAll:function(t){if(o(this),!s(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in l?String(t.flags):a.call(t),i=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return i.lastIndex=r(t.lastIndex),new c(i,e)}})},function(t,e,n){n(72)("asyncIterator")},function(t,e,n){n(72)("observable")},function(t,e,n){var i=n(1),o=n(97),r=n(14),s=n(18),a=n(88);i(i.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,i=r(t),l=s.f,c=o(i),u={},h=0;c.length>h;)void 0!==(n=l(i,e=c[h++]))&&a(u,e,n);return u}})},function(t,e,n){var i=n(1),o=n(126)(!1);i(i.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){var i=n(1),o=n(126)(!0);i(i.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";var i=n(1),o=n(11),r=n(12),s=n(8);n(9)&&i(i.P+n(68),"Object",{__defineGetter__:function(t,e){s.f(o(this),t,{get:r(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(1),o=n(11),r=n(12),s=n(8);n(9)&&i(i.P+n(68),"Object",{__defineSetter__:function(t,e){s.f(o(this),t,{set:r(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var i=n(1),o=n(11),r=n(24),s=n(19),a=n(18).f;n(9)&&i(i.P+n(68),"Object",{__lookupGetter__:function(t){var e,n=o(this),i=r(t,!0);do{if(e=a(n,i))return e.get}while(n=s(n))}})},function(t,e,n){"use strict";var i=n(1),o=n(11),r=n(24),s=n(19),a=n(18).f;n(9)&&i(i.P+n(68),"Object",{__lookupSetter__:function(t){var e,n=o(this),i=r(t,!0);do{if(e=a(n,i))return e.set}while(n=s(n))}})},function(t,e,n){var i=n(1);i(i.P+i.R,"Map",{toJSON:n(127)("Map")})},function(t,e,n){var i=n(1);i(i.P+i.R,"Set",{toJSON:n(127)("Set")})},function(t,e,n){n(69)("Map")},function(t,e,n){n(69)("Set")},function(t,e,n){n(69)("WeakMap")},function(t,e,n){n(69)("WeakSet")},function(t,e,n){n(70)("Map")},function(t,e,n){n(70)("Set")},function(t,e,n){n(70)("WeakMap")},function(t,e,n){n(70)("WeakSet")},function(t,e,n){var i=n(1);i(i.G,{global:n(3)})},function(t,e,n){var i=n(1);i(i.S,"System",{global:n(3)})},function(t,e,n){var i=n(1),o=n(22);i(i.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,n){var i=n(1);i(i.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var i=n(1);i(i.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var i=n(1),o=180/Math.PI;i(i.S,"Math",{degrees:function(t){return t*o}})},function(t,e,n){var i=n(1),o=n(129),r=n(111);i(i.S,"Math",{fscale:function(t,e,n,i,s){return r(o(t,e,n,i,s))}})},function(t,e,n){var i=n(1);i(i.S,"Math",{iaddh:function(t,e,n,i){var o=t>>>0,r=n>>>0;return(e>>>0)+(i>>>0)+((o&r|(o|r)&~(o+r>>>0))>>>31)|0}})},function(t,e,n){var i=n(1);i(i.S,"Math",{isubh:function(t,e,n,i){var o=t>>>0,r=n>>>0;return(e>>>0)-(i>>>0)-((~o&r|~(o^r)&o-r>>>0)>>>31)|0}})},function(t,e,n){var i=n(1);i(i.S,"Math",{imulh:function(t,e){var n=+t,i=+e,o=65535&n,r=65535&i,s=n>>16,a=i>>16,l=(s*r>>>0)+(o*r>>>16);return s*a+(l>>16)+((o*a>>>0)+(65535&l)>>16)}})},function(t,e,n){var i=n(1);i(i.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var i=n(1),o=Math.PI/180;i(i.S,"Math",{radians:function(t){return t*o}})},function(t,e,n){var i=n(1);i(i.S,"Math",{scale:n(129)})},function(t,e,n){var i=n(1);i(i.S,"Math",{umulh:function(t,e){var n=+t,i=+e,o=65535&n,r=65535&i,s=n>>>16,a=i>>>16,l=(s*r>>>0)+(o*r>>>16);return s*a+(l>>>16)+((o*a>>>0)+(65535&l)>>>16)}})},function(t,e,n){var i=n(1);i(i.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var i=n(1),o=n(13),r=n(3),s=n(64),a=n(117);i(i.P+i.R,"Promise",{finally:function(t){var e=s(this,o.Promise||r.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)}})},function(t,e,n){"use strict";var i=n(1),o=n(95),r=n(116);i(i.S,"Promise",{try:function(t){var e=o.f(this),n=r(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var i=n(32),o=n(2),r=i.key,s=i.set;i.exp({defineMetadata:function(t,e,n,i){s(t,e,o(n),r(i))}})},function(t,e,n){var i=n(32),o=n(2),r=i.key,s=i.map,a=i.store;i.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:r(arguments[2]),i=s(o(e),n,!1);if(void 0===i||!i.delete(t))return!1;if(i.size)return!0;var l=a.get(e);return l.delete(n),!!l.size||a.delete(e)}})},function(t,e,n){var i=n(32),o=n(2),r=n(19),s=i.has,a=i.get,l=i.key,c=function(t,e,n){if(s(t,e,n))return a(t,e,n);var i=r(e);return null!==i?c(t,i,n):void 0};i.exp({getMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:l(arguments[2]))}})},function(t,e,n){var i=n(120),o=n(128),r=n(32),s=n(2),a=n(19),l=r.keys,c=r.key,u=function(t,e){var n=l(t,e),r=a(t);if(null===r)return n;var s=u(r,e);return s.length?n.length?o(new i(n.concat(s))):s:n};r.exp({getMetadataKeys:function(t){return u(s(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var i=n(32),o=n(2),r=i.get,s=i.key;i.exp({getOwnMetadata:function(t,e){return r(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var i=n(32),o=n(2),r=i.keys,s=i.key;i.exp({getOwnMetadataKeys:function(t){return r(o(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,e,n){var i=n(32),o=n(2),r=n(19),s=i.has,a=i.key,l=function(t,e,n){if(s(t,e,n))return!0;var i=r(e);return null!==i&&l(t,i,n)};i.exp({hasMetadata:function(t,e){return l(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var i=n(32),o=n(2),r=i.has,s=i.key;i.exp({hasOwnMetadata:function(t,e){return r(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var i=n(32),o=n(2),r=n(12),s=i.key,a=i.set;i.exp({metadata:function(t,e){return function(n,i){a(t,e,(void 0!==i?o:r)(n),s(i))}}})},function(t,e,n){var i=n(1),o=n(94)(),r=n(3).process,s="process"==n(22)(r);i(i.G,{asap:function(t){var e=s&&r.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var i=n(1),o=n(3),r=n(13),s=n(94)(),a=n(6)("observable"),l=n(12),c=n(2),u=n(45),h=n(46),d=n(16),p=n(37),f=p.RETURN,v=function(t){return null==t?void 0:l(t)},b=function(t){var e=t._c;e&&(t._c=void 0,e())},m=function(t){return void 0===t._o},g=function(t){m(t)||(t._o=void 0,b(t))},y=function(t,e){c(t),this._c=void 0,this._o=t,t=new x(this);try{var n=e(t),i=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){i.unsubscribe()}:l(n),this._c=n)}catch(e){return void t.error(e)}m(this)&&b(this)};y.prototype=h({},{unsubscribe:function(){g(this)}});var x=function(t){this._s=t};x.prototype=h({},{next:function(t){var e=this._s;if(!m(e)){var n=e._o;try{var i=v(n.next);if(i)return i.call(n,t)}catch(t){try{g(e)}finally{throw t}}}},error:function(t){var e=this._s;if(m(e))throw t;var n=e._o;e._o=void 0;try{var i=v(n.error);if(!i)throw t;t=i.call(n,t)}catch(t){try{b(e)}finally{throw t}}return b(e),t},complete:function(t){var e=this._s;if(!m(e)){var n=e._o;e._o=void 0;try{var i=v(n.complete);t=i?i.call(n,t):void 0}catch(t){try{b(e)}finally{throw t}}return b(e),t}}});var _=function(t){u(this,_,"Observable","_f")._f=l(t)};h(_.prototype,{subscribe:function(t){return new y(t,this._f)},forEach:function(t){var e=this;return new(r.Promise||o.Promise)(function(n,i){l(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){i(t),o.unsubscribe()}},error:i,complete:n})})}}),h(_,{from:function(t){var e="function"==typeof this?this:_,n=v(c(t)[a]);if(n){var i=c(n.call(t));return i.constructor===e?i:new e(function(t){return i.subscribe(t)})}return new e(function(e){var n=!1;return s(function(){if(!n){try{if(p(t,!1,function(t){if(e.next(t),n)return f})===f)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t2,o=!!i&&s.call(arguments,2);return t(i?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*a,{setTimeout:l(i.setTimeout),setInterval:l(i.setInterval)})},function(t,e,n){var i=n(1),o=n(93);i(i.G+i.B,{setImmediate:o.set,clearImmediate:o.clear})},function(t,e,n){for(var i=n(91),o=n(29),r=n(17),s=n(3),a=n(16),l=n(43),c=n(6),u=c("iterator"),h=c("toStringTag"),d=l.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},f=o(p),v=0;v=n.length)return this._t=void 0,b(1)}while(!x(e,t=n[this._i++]));return b(0,"keys"==i?t:"values"==i?e[t]:[t,e[t]])}),k.prototype=null,o(o.G+o.F,{Dict:k}),o(o.S,"Dict",{keys:S("keys"),values:S("values"),entries:S("entries"),forEach:_(0),map:_(1),filter:_(2),some:_(3),every:_(4),find:_(5),findKey:w,mapPairs:_(7),reduce:function(t,e,n){d(e);var i,o,r=g(t),s=c(r),a=s.length,l=0;if(arguments.length<3){if(!a)throw TypeError("Reduce of empty object with no initial value");i=r[s[l++]]}else i=Object(n);for(;a>l;)x(r,o=s[l++])&&(i=e(i,r[o],o,t));return i},keyOf:h,includes:function(t,e){return void 0!==(e==e?h(t,e):w(t,function(t){return t!=t}))},has:x,get:function(t,e){if(x(t,e))return t[e]},set:function(t,e,n){return y&&e in Object?u.f(t,e,r(0,n)):t[e]=n,t},isDict:function(t){return m(t)&&l(t)===k.prototype}})},function(t,e,n){var i=n(29),o=n(14);t.exports=function(t,e){for(var n,r=o(t),s=i(r),a=s.length,l=0;a>l;)if(r[n=s[l++]]===e)return n}},function(t,e,n){var i=n(2),o=n(53);t.exports=n(13).getIterator=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,n){var i=n(3),o=n(13),r=n(1),s=n(131);r(r.G+r.F,{delay:function(t){return new(o.Promise||i.Promise)(function(e){setTimeout(s.call(e,!0),t)})}})},function(t,e,n){var i=n(132),o=n(1);n(13)._=i._=i._||{},o(o.P+o.F,"Function",{part:n(131)})},function(t,e,n){var i=n(1);i(i.S+i.F,"Object",{isObject:n(4)})},function(t,e,n){var i=n(1);i(i.S+i.F,"Object",{classof:n(42)})},function(t,e,n){var i=n(1),o=n(133);i(i.S+i.F,"Object",{define:o})},function(t,e,n){var i=n(1),o=n(133),r=n(30);i(i.S+i.F,"Object",{make:function(t,e){return o(r(t),e)}})},function(t,e,n){"use strict";n(58)(Number,"Number",function(t){this._l=+t,this._i=0},function(){var t=this._i++,e=!(t"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});i(i.P+i.F,"String",{escapeHTML:function(){return o(this)}})},function(t,e,n){"use strict";var i=n(1),o=n(98)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});i(i.P+i.F,"String",{unescapeHTML:function(){return o(this)}})},function(t,e,n){var i=n(353);"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(354)(i,o);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(134)(!1)).push([t.i,"/*@import url('https://fonts.googleapis.com/css?family=Roboto+Mono');*/\n\nbody {\n\t--label-font-family: sans-serif;\n\t--label-font-size: 14px;\n\n\t--title-font-family: sans-serif;\n\t--title-font-size: 16px;\n\n\t--body-font-family: sans-serif;\n\t--body-font-size: 14px;\n\n\t--color-gray: #a0a0a0;\n\t--color-light-gray: #eee;\n\t--color-dark-gray: #777;\n\t--color-magenta: #F734D7;\n\t--color-teal: #22DBC0;\n\n\t--outline-color: var(--color-dark-gray);\n\n\t--shadow-low: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);\n\t--shadow-medium: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);\n\t--shadow-high: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);\n\n\t--default-margin: 8px 0px 0px 0px;\n\t--side-panel-width: 240px;\n\t--side-panel-transition: 0.2s;\n\n\tfont-family: var(--body-font-family);\n\tfont-size: var(--body-font-size);\n\tline-height: 1.4em;\n\n}\n\nbody #interface {\n\tmax-width: 600px;\n\twidth: 100%;\n\tmin-width: 300px;\n\tmargin: 0 auto;\n}\n\nbody #interface * {\n\tdisplay: inline-block;\n\tmargin: 5px 0;\n\twidth: 100%;\n}",""])},function(t,e,n){var i,o,r={},s=(i=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=i.apply(this,arguments)),o}),a=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var i=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}}(),l=null,c=0,u=[],h=n(355);function d(t,e){for(var n=0;n=0&&u.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=function(){0;return n.nc}();i&&(t.attrs.nonce=i)}return m(e,t.attrs),f(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var s=c++;n=l||(l=b(e)),i=_.bind(null,n,s,!1),o=_.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",m(e,t.attrs),f(t,e),e}(e),i=function(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=h(i));o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([i],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,e),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),i=function(t,e){var n=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var i=[],o=0;o{const t=new e.constructor(n);t.frequency.value=200,t.detune.value=0,t.volume.value=0,t.toDestination().start(0).stop(.005)},.005);this.buffer=i.toArray(0),this.requestUpdate()}})}).call(this,n(135))},function(t,e,n){(t.exports=n(134)(!1)).push([t.i,':host{display:inline-block}#container{margin-top:5px;display:inline-block;width:100%}#container label,#container #units{font-size:var(--label-font-size);font-family:var(--label-font-family);float:left}#container #units[hidden]{display:none}#container input[type="number"]{padding:0;float:right;-webkit-appearance:none;border:none;text-align:right;font-size:var(--label-font-size);font-family:var(--label-font-family);outline-color:var(--outline-color);outline-offset:1px;width:70px;background-color:transparent}#container input[type="number"]:invalid{box-shadow:none}#container #units{float:right}#container #slider{margin-top:5px;width:100%;display:inline-block;position:relative;height:20px}#container #slider input[type="range"]{opacity:0;padding:0;margin:0;width:100%;height:20px}#container #slider #line,#container #slider #circle,#container #slider #anchor{pointer-events:none;position:absolute;left:0px;top:0px}#container #slider #line{position:absolute;top:50%;transform:translate(0, -50%);height:4px;border-radius:2px;width:100%;background-color:#aaa}#container #slider #line #anchor{position:absolute;width:0%;top:0px;height:100%;background-color:black;border-radius:2px}#container #slider #line #anchor.left{left:0px}#container #slider #line #anchor.center{left:50%}#container #slider #circle{--computed-thumb-height: var(--thumb-height, 24px);--computed-thumb-width: var(--thumb-width, 24px);border-radius:2px;width:var(--computed-thumb-width);height:var(--computed-thumb-height);top:calc((20px - var(--computed-thumb-height)) / 2);background-color:black;box-shadow:var(--shadow-low)}#container #slider #circle.focus{outline:5px auto var(--focus-ring-color, black)}\n',""])},function(t,e){t.exports={_setState:function(t){t||(t={}),this._state={},this._extendState({polyphony:4,rows:1,priority:"last",rootNote:60,octaveControls:!0,octave:0,velocityControls:!0,velocity:127,keys:[],buffer:[]}),this._extendState(t)},_extendState:function(t){for(var e in t)this._state[e]=t[e]},set:function(){return 1===arguments.length?this._extendState(arguments[0]):this._state[arguments[0]]=arguments[1],this},get:function(t){return this._state[t]}}},function(t,e){t.exports={down:function(t){this._listeners.down=(this._listeners.down||[]).concat(t)},up:function(t){this._listeners.up=(this._listeners.up||[]).concat(t)},_trigger:function(t){var e=this;if(e._listeners[t]&&e._listeners[t].length){var n=Array.prototype.slice.call(arguments);n.splice(0,1),e._listeners[t].forEach(function(t){t.apply(e,n)})}},_bind:function(){var t=this;if("undefined"!=typeof window&&window.document){window.document.addEventListener("keydown",function(e){t._addKey(e)}),window.document.addEventListener("keyup",function(e){t._removeKey(e)});var e=!0;setInterval(function(){window.document.hasFocus()!==e&&((e=!e)||t.clear())},100)}}}},function(t,e){t.exports={_map:function(t){return this._keyMap[this._state.rows][t]+this._offset()},_offset:function(){return this._state.rootNote-this._keyMap[this._state.rows].root+12*this._state.octave},_isNote:function(t){return!!this._keyMap[this._state.rows][t]},_toFrequency:function(t){return 440*Math.pow(2,(t-69)/12)},_keyMap:{1:{root:60,65:60,87:61,83:62,69:63,68:64,70:65,84:66,71:67,89:68,72:69,85:70,74:71,75:72,79:73,76:74,80:75,186:76,222:77},2:{root:60,90:60,83:61,88:62,68:63,67:64,86:65,71:66,66:67,72:68,78:69,74:70,77:71,188:72,76:73,190:74,186:75,191:76,81:72,50:73,87:74,51:75,69:76,82:77,53:78,84:79,54:80,89:81,55:82,85:83,73:84,57:85,79:86,48:87,80:88,219:89,187:90,221:91}}}},function(t,e){t.exports={_addKey:function(t){if(this._isNote(t.keyCode)&&!this._isPressed(t.keyCode)){var e=this._makeNote(t.keyCode);this._state.keys=(this._state.keys||[]).concat(e),this._update()}else this._isSpecialKey(t.keyCode)&&this._specialKey(t.keyCode)},_removeKey:function(t){if(this._isPressed(t.keyCode)){for(var e,n=0;n=t._state.keys.length?t._state.keys=t._state.keys.map(function(t){return t.isActive=!0,t}):(t._state.keys=t._state.keys.map(function(t){return t.isActive=!1,t}),t["_"+t._state.priority]()),t._state.buffer=[],t._state.keys.forEach(function(e){e.isActive&&t._state.buffer.push(e)})):t._state.buffer=[]},_last:function(){for(var t=this._state.keys.length-this._state.polyphony;t0||n>0;){if(0==e){o.push(l),n--;continue}if(0==n){o.push(c),e--;continue}let r,u=t[e-1][n-1],h=t[e-1][n],d=t[e][n-1];(r=h{throw t})}}f.splice(0,t),p+=t}).observe(b,{characterData:!0});const m={run:t=>(b.textContent=v++,f.push(t),d++),cancel(t){const e=t-p;if(e>=0){if(!f[e])throw new Error("invalid async handle: "+t);f[e]=null}}}; -/** -@license -Copyright (c) 2017 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/ -function g(t){return"slot"===t.localName}class y{static getFlattenedNodes(t){return g(t)?(t=t).assignedNodes({flatten:!0}):Array.from(t.childNodes).map(t=>g(t)?(t=t).assignedNodes({flatten:!0}):[t]).reduce((t,e)=>t.concat(e),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=(()=>{this._schedule()}),this.connect(),this._schedule()}connect(){g(this._target)?this._listenSlots([this._target]):this._target.children&&(this._listenSlots(this._target.children),window.ShadyDOM?this._shadyChildrenObserver=ShadyDOM.observeChildren(this._target,t=>{this._processMutations(t)}):(this._nativeChildrenObserver=new MutationObserver(t=>{this._processMutations(t)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){g(this._target)?this._unlistenSlots([this._target]):this._target.children&&(this._unlistenSlots(this._target.children),window.ShadyDOM&&this._shadyChildrenObserver?(ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,m.run(()=>this.flush()))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e`;class _ extends i.a{static get properties(){return{selectedIndex:{type:Number},attribute:{type:String}}}constructor(){super(),this.selectedIndex=-1,this.options=[],this._observer=new y(this,t=>{this.options=[...this.options,...t.addedNodes.filter(t=>"option"===t.nodeName.toLowerCase())],this.options.length&&-1===this.selectedIndex&&(this.selectedIndex=0),this.requestUpdate()})}updated(t){if(t.has("selectedIndex")&&-1!==this.selectedIndex){const t=this.shadowRoot.querySelector("select");this.dispatchEvent(new CustomEvent("change",{detail:this.value,composed:!0,bubbles:!0})),t&&(t.selectedIndex=this.selectedIndex),this.attribute&&this.dispatchEvent(new CustomEvent(this.attribute,{detail:this.value,composed:!0,bubbles:!0}))}}get value(){return this.options[this.selectedIndex].getAttribute("value")}set value(t){const e=this.options.findIndex(e=>e.getAttribute("value")===t.toString());-1!==e&&(this.selectedIndex=e)}sync(t){this.value=t[this.attribute]}render(){return i.b` - -
- -
${x}
-
- `}}customElements.define("tone-select",_);customElements.define("tone-select-attribute",class extends _{static get properties(){return{label:{type:String},attribute:{type:String}}}constructor(){super(),this.label=""}sync(t){this.value=t[this.attribute]}set(t){t[this.attribute]!==this.value&&(t[this.attribute]=this.value)}render(){return i.b` - -
- - ${super.render()} -
- `}});customElements.define("tone-oscillator-type",class extends i.a{static get properties(){return{attribute:{type:String},nocustom:{type:Boolean},label:{type:String}}}constructor(){super(),this.nocustom=!1,this.value="sine"}sync(t){const e=t[this.attribute];this.value=e;const n=this.shadowRoot.querySelector("tone-select-attribute");n&&n.options.forEach(t=>{const n=t.getAttribute("value");e.includes(n)&&(this.shadowRoot.querySelector("tone-select-attribute").value=n)})}render(){return i.b` - - - - - - ${this.nocustom?i.b``:i.b``} - - `}});customElements.define("tone-oscillator",class extends o.a{static get properties(){return{label:{type:String},sourceType:{type:String},omni:{type:Boolean},frequency:{type:Boolean}}}constructor(){super(),this.label="Oscillator",this.sourceType="oscillator"}setAttribute(t,e,n){"type"===t?"oscillator"===this.sourceType?n.type=e.value:"am"===this.sourceType||"fat"===this.sourceType||"fm"===this.sourceType?n.type=`${this.sourceType}${e.value}`:n.type=e.value:e.set(n)}updated(t){t.has("sourceType")&&this.dispatchEvent(new CustomEvent("sourceType",{detail:this.sourceType,composed:!0,bubbles:!0}))}renderAttributes(){return i.b` - - ${this.omni?i.b`this.sourceType=t.detail} - slot="top" - attribute="sourceType" - id="sourceType"> - - - - - - - `:i.b``} -
- - - - - - - - - - - - - - - - - - - - - - - - - -
- `}render(){return i.b` - - - - ${this.frequency?i.b` - - `:i.b``} - ${this.renderAttributes()} - - `}});const w=i.b``,S=i.b``;customElements.define("tone-rack",class extends i.a{static get properties(){return{collapsed:{type:Boolean},incollapsable:{type:Boolean},square:{type:Boolean},label:{type:String},color:{type:String}}}constructor(){super(),this.incollapsable=!1,this.collapsed=!1,this.square=!1}updated(t){const e=t=>{t.dispatchEvent(new CustomEvent("collapse",{detail:this.collapsed,composed:!0,bubbles:!0}))};t.has("collapsed")&&(e(this),Array.from(this.children).forEach(t=>{t.assignedNodes?Array.from(t.assignedNodes()).forEach(t=>e(t)):e(t),t.dispatchEvent(new CustomEvent("collapse",{detail:this.collapsed,composed:!0,bubbles:!0}))}))}_keydown(t){"ArrowRight"===t.key||"ArrowDown"===t.key?this.collapsed=!1:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(this.collapsed=!0)}render(){return i.b` - -
- ${this.incollapsable?i.b``:i.b` - `} -

${this.label}

-
- - ${this.collapsed?i.b``:i.b``} -
- `}});customElements.define("tone-toggle",class extends i.a{static get properties(){return{label:{type:String},checked:{type:Boolean},attribute:{type:String}}}constructor(){super(),this.label="",this.checked=!1}updated(t){t.has("checked")&&(this.dispatchEvent(new CustomEvent("change",{detail:this.checked,composed:!0,bubbles:!0})),this.attribute&&this.dispatchEvent(new CustomEvent(this.attribute,{detail:this.checked,composed:!0,bubbles:!0})))}sync(t){const e=this.attribute;this.checked=t[e]}set(t){t[this.attribute]=this.checked}_clicked(t){t.stopPropagation(),this.checked=!this.checked,this.shadowRoot.querySelector("button").focus()}render(){return i.b` - -
- -
-
- -
-
- `}});const E="data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV";async function k(t){if("suspended"===Tone.context.state){const e=Tone.context.resume(),n=document.createElement("audio");n.controls=!1,n.preload="auto",n.loop=!1,n.src=E,n.title="Tone.js Examples";let i=Promise.resolve();try{i=await n.play()}catch(t){i=Promise.resolve(),console.log("did not start audio")}await Promise.all([i,e])}}const M=i.b``,A=i.b``;customElements.define("tone-play-toggle",class extends i.a{static get properties(){return{playing:{type:Boolean},disabled:{type:Boolean}}}constructor(){super(),this.playing=!1}updated(t){t.has("playing")&&(this.dispatchEvent(new CustomEvent("change",{detail:this.playing,composed:!0,bubbles:!0})),this.dispatchEvent(new CustomEvent("play",{detail:this.playing,composed:!0,bubbles:!0})))}bind(t){this.addEventListener("change",e=>{e.detail?t.start():t.stop()}),setInterval(()=>{"stopped"===t.state&&(this.playing=!1)},100)}async _clicked(t){await k(),this.playing=!this.playing}render(){return i.b` - -
- -
- `}});var I=n(137),C=n.n(I);customElements.define("tone-player-viz",class extends i.a{static get properties(){return{color:{type:String},loading:{type:Boolean}}}constructor(){super(),this.color="black",this.loading=!0}_computeRMS(t,e){if(this._waveform&&this._waveform.length===e)return;const n=t.toArray(0),i=[];for(let t=0;tMath.scale(Math.pow(t,.8),0,o,0,1))}visualize(t){if(this.loading=!t.loaded,t.loaded){const e=t.buffer,n=this.shadowRoot.querySelector("canvas");n.width=2*n.clientWidth,n.height=2*n.clientHeight;const{width:i,height:o}=n,r=n.getContext("2d");r.clearRect(0,0,i,o),this._computeRMS(e,i);const s=Math.scale(t.loopStart,0,e.duration,0,i);let a=Math.scale(t.loopEnd,0,e.duration,0,i);0===t.loopEnd&&(a=i),r.fillStyle=this.color;const l=C()(this.color).setAlpha(.2).toRgbString();this._waveform.forEach((e,n)=>{const c=e*o,u=t.reverse?i-n:n;t.loop&&(r.fillStyle=s>u||u>a?l:this.color),r.fillRect(u,o/2-c/2,1,c),r.fill()})}}render(){return i.b` - - - the audio file's waveform - -
loading
- `}});customElements.define("tone-player",class extends o.a{static get properties(){return{label:{type:String},duration:{type:Number}}}constructor(){super(),this.label="Player",this.duration=0}bind(t){const e=setInterval(()=>{t.loaded&&(clearInterval(e),this.duration=t.buffer.duration,this.sync(t))},100);super.bind(t)}render(){return i.b` - - this.collapsed=t.detail} - ?collapsed=${this.collapsed} label="${this.label}"> - - - - - - - - - - - - - - `}});var T=n(99),N=n.n(T);customElements.define("tone-slider",class extends i.a{static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},value:{type:Number},default:{type:Number},exp:{type:Number},anchor:{type:String},label:{type:String},units:{type:String},integer:{type:Boolean},attribute:{type:String},bare:{type:Boolean}}}constructor(){super(),this.min=0,this.max=100,this.step=1,this.value=50,this.exp=1,this.anchor="left",this.integer=!1,this.bare=!1,this._setThrottle=-1}_logValue(t){const e=Math.pow(t,this.exp),n=Math.pow(1,this.exp),i=Math.pow(101,this.exp);let o=Math.scale(e,n,i,this.min,this.max);this.integer&&(o=Math.round(o)),this.value=o,this.dispatchEvent(new CustomEvent("input",{composed:!0,detail:this.value}))}_exp(t,e){return Math.sign(t)*Math.pow(Math.abs(t),e)}_logPosition(){const t=Math.scale(this.value,this.min,this.max,Math.pow(1,this.exp),Math.pow(101,this.exp));return Math.pow(t,1/this.exp)}_beautifyVal(){const t=Math.abs(this.min-this.max);return t>10||this.integer?this.value.toFixed(0):t>1&&1===this.exp?this.value.toFixed(1):this.value.toFixed(2)}_getStep(){const t=Math.abs(this.min-this.max);return t>10||this.integer?1:t>1&&1===this.exp?.1:.01}sync(t){const e=this.attribute;void 0!==t[e].value?this.value=Math.clamp(t[e].value,this.min,this.max):this.value=Math.clamp(t[e],this.min,this.max)}set(t){const e=this.attribute;isFinite(this.value)&&(void 0!==t[e].value?t[e].value!==this.value&&(t[e].value=this.value):t[e]!==this.value&&(t[e]=this.value))}updated(t){super.updated(t),t.has("value")&&(this.dispatchEvent(new CustomEvent("change",{composed:!0,detail:this.value,bubbles:!0})),this.attribute&&this.dispatchEvent(new CustomEvent(this.attribute,{composed:!0,detail:this.value,bubbles:!0})))}_numberInput(t){const e=Math.clamp(parseFloat(t.target.value),this.min,this.max);this.integer?this.value=Math.floor(e):this.value=e}render(){const t=Math.clamp(this._logPosition(),0,100);let e=t-1,n=0;return"center"===this.anchor&&(n=50-Math.max(50-e,0),e=Math.abs(50-e)),i.b` - -
"Backspace"===t.key&&void 0!==this.default?this.value=this.default:""}> - - ${this.units} - -
- this._logValue(parseFloat(t.target.value))} - min="1" - max="101" - .step=${Math.pow(this.step,1/this.exp)} - @focus=${()=>this.shadowRoot.querySelector("#circle").classList.add("focus")} - @blur=${()=>this.shadowRoot.querySelector("#circle").classList.remove("focus")} - .value=${t}> -
-
-
-
-
-
- `}});customElements.define("tone-noise",class extends o.a{static get properties(){return{label:{type:String}}}constructor(){super(),this.label="Noise"}render(){return i.b` - - - - - - - - - - - `}});customElements.define("tone-oscilloscope",class extends i.a{constructor(){super(),this._waveform=new Tone.Waveform(256)}bind(t){t.connect(this._waveform),this._canvas=this.shadowRoot.querySelector("canvas"),this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight,this._context=this._canvas.getContext("2d"),this.loop(),window.addEventListener("resize",()=>{this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight})}loop(){requestAnimationFrame(this.loop.bind(this));const t=this._waveform.getValue(),e=this._canvas.width,n=this._canvas.height;this._context.clearRect(0,0,e,n),this._context.beginPath(),this._context.lineWidth=4,t.forEach((i,o)=>{const r=Math.scale(o,0,t.length,0,e),s=Math.scale(i,-1,1,0,n);0===o?this._context.moveTo(r,s):this._context.lineTo(r,s)}),this._context.lineCap="round",this._context.strokeStyle="white",this._context.stroke()}render(){return i.b` - - - waveform of current playing audio - - `}});const P=i.b``,O=i.b``;customElements.define("tone-microphone",class extends o.a{static get properties(){return{label:{type:String},open:{type:Boolean},supported:{type:Boolean}}}constructor(){super(),this.label="Noise",this.inputs=[],this.supported=Tone.UserMedia.supported}async bind(t){if(!this.supported)return;setInterval(()=>{this.open="started"===t.state},100);const e=this.shadowRoot.querySelector("tone-select");this.shadowRoot.querySelector("#mic").addEventListener("click",n=>{k(),this.open?t.close():t.open(e.value)}),e.addEventListener("change",n=>{this.open&&t.open(e.value)}),this.shadowRoot.querySelector("tone-oscilloscope").bind(t),this.inputs=await Tone.UserMedia.enumerateDevices(),this.requestUpdate()}render(){return i.b` - -
- - ${this.supported?i.b` - - ${this.inputs.map(t=>i.b` - - `)} - - - `:i.b` -
UserMedia Not Supported
- `} -
- `}});customElements.define("tone-grain-player",class extends o.a{static get properties(){return{label:{type:String},duration:{type:Number}}}constructor(){super(),this.label="GrainPlayer",this.duration=0}bind(t){const e=setInterval(()=>{t.loaded&&(clearInterval(e),this.duration=t.buffer.duration,this.sync(t))},100);super.bind(t)}render(){return i.b` - - this.collapsed=t.detail} - ?collapsed=${this.collapsed} label="${this.label}"> - - - - - - - - - - - - - - - - - - - - `}});customElements.define("tone-multislider",class extends i.a{static get properties(){return{label:{type:String},length:{type:Number},attribute:{type:String}}}constructor(){super(),this.length=32,this.value=Array.from(new Float32Array(this.length))}_scaleArray(t){const e=Math.max(1,...t);return t.slice(0,this.length).map(t=>Math.clamp(Math.abs(t/e),0,1))}sync(t){this._scaleArray(t[this.attribute]).toString()!==this.value&&(this.value=this._scaleArray(t[this.attribute]),this.requestUpdate())}set(t){t[this.attribute]=this.value}_eventToXY(t){return{x:t.offsetX/t.target.offsetWidth,y:1-t.offsetY/t.target.offsetHeight}}mousedown(t){if(t.buttons){const{x:e,y:n}=this._eventToXY(t),i=this.value.length;if(this.value[Math.floor(e*this.length)]=n,i!==this.value.length)for(let t=0;t - :host { - display: block; - } - - #container { - position: relative; - width: 100%; - height: 55px; - display: block; - background-color: #eee; - margin-top: 5px; - } - - .slider { - width: calc(100% / ${this.length}); - display: inline-block; - height: 100%; - position: relative; - float: left; - pointer-events: none; - } - - .slider .fill { - color: green; - width: 100%; - height: 0%; - background-color: #777; - position: absolute; - bottom: 0px; - } - - label { - font-family: var(--label-font-family); - font-size: var(--label-font-size); - } - - -
- ${t.map(t=>i.b` - -
-
- `)} -
- `}});var R=n(138),$=n.n(R);customElements.define("tone-keyboard-note",class extends i.a{static get properties(){return{note:{type:Number},color:{type:String},activecolor:{type:String},active:{type:Boolean},velocity:{type:Number},touchid:{type:Number}}}fromMidi(t){return Tone.Midi(t).toNote()}constructor(){super(),this.color="#eee",this.activecolor="white",this.active=!1,this.touchid=-1}updated(t){if(t.has("active")){const t=this.active?"noteon":"noteoff";this.active||(this.touchid=-1),this.dispatchEvent(new CustomEvent(t,{detail:{name:this.fromMidi(this.note),midi:this.note,velocity:this.active?1:0},composed:!0,bubbles:!0}))}}mouseover(t){t.buttons&&(this.active=!0,this.shadowRoot.querySelector("button").focus())}keydown(t){k(),t.repeat||" "!==t.key&&"Enter"!==t.key||(this.active=!0)}keyup(t){" "!==t.key&&"Enter"!==t.key||(this.active=!1)}touchstart(t){t.preventDefault(),this.touchid=t.touches[0].identifier,this.active=!0}render(){const t=0!==this.note;return i.b` - -
- ${t?i.b` - `:i.b``} -
- `}});customElements.define("tone-keyboard-octave",class extends i.a{static get properties(){return{octave:{type:Number}}}constructor(){super(),this.octave=1}noteon(t){this.shadowRoot.querySelector(`tone-keyboard-note[note="${t}"]`).active=!0}noteoff(t){this.shadowRoot.querySelector(`tone-keyboard-note[note="${t}"]`).active=!1}_getNoteByTouchId(t){const e=Array.from(this.shadowRoot.querySelectorAll("tone-keyboard-note")).find(e=>e.touchid===t);if(e&&e.note)return e}render(){const t=12*this.octave,e=[0,2,4,5,7,9,11].map(e=>e+t),n=[0,1,3,0,6,8,10,0].map(e=>e?e+t:0);return i.b` - -
-
- ${e.map(t=>i.b` - - `)} -
-
- ${n.map(t=>i.b` - - `)} -
-
- `}});customElements.define("tone-keyboard",class extends i.a{static get properties(){return{rootoctave:{type:Number},octaves:{type:Number},polyphonic:{type:Boolean}}}constructor(){super(),this.rootoctave=4,this.octaves=4,this.polyphonic=!1,this._computerKeyboard=new $.a({polyphony:1/0}),this._computerKeyboard.down(t=>{k(),this.noteon(t.note)}),this._computerKeyboard.up(t=>{this.noteoff(t.note)})}_getNoteByTouchId(t){const e=Array.from(this.shadowRoot.querySelectorAll("tone-keyboard-octave")).find(e=>e._getNoteByTouchId(t));if(e)return e._getNoteByTouchId(t)}_touchmove(t){Array.from(t.changedTouches).forEach(t=>{this._getNoteByTouchId(t.identifier);const e=this._getNoteByTouchId(t.identifier),n=this.shadowRoot.elementFromPoint(t.clientX,t.clientY);if(n&&n.shadowRoot){const i=n.shadowRoot.elementFromPoint(t.clientX,t.clientY);i&&i.note&&e.note!==i.note&&(e.active=!1,e.touchid=-1,i.active=!0,i.touchid=t.identifier)}})}_touchend(t){Array.from(t.changedTouches).forEach(t=>{this._getNoteByTouchId(t.identifier);const e=this._getNoteByTouchId(t.identifier);e&&e.active&&(e.active=!1,e.touchid=-1)})}noteon(t){const e=Math.floor(t/12),n=this.shadowRoot.querySelector(`tone-keyboard-octave[octave="${e}"]`);n&&n.noteon(t)}noteoff(t){const e=Math.floor(t/12),n=this.shadowRoot.querySelector(`tone-keyboard-octave[octave="${e}"]`);n&&n.noteoff(t)}render(){const t=[];for(let e=this.rootoctave;e - #container { - display: flex; - background-color: white; - height: 80px; - } - - tone-keyboard-octave { - flex-grow: 1; - } - -
- ${t.map(t=>i.b` - - `)} -
- `}});var F=n(38),z=n.n(F);customElements.define("tone-midi-in",class extends i.a{constructor(){super(),z.a.enable(t=>{t&&error(t),z.a.addListener("connected",t=>{"input"===t.port.type&&this.requestUpdate()}),z.a.addListener("disconnected",t=>{this.requestUpdate()})})}_flash(){clearTimeout(this._flashTimeout);const t=this.shadowRoot.querySelector("#light");t.classList.add("flash"),this._flashTimeout=setTimeout(()=>t.classList.remove("flash"),100)}_connectMidi(t){if("none"===t.target.value)return void this.shadowRoot.querySelector("#light").classList.remove("connected");this.shadowRoot.querySelector("#light").classList.add("connected");const e=z.a.getInputById(t.target.value);e.addListener("noteon","all",t=>{const e=`${t.note.name}${t.note.octave}`,n=t.note.number;this._flash(),this.dispatchEvent(new CustomEvent("noteon",{detail:{name:e,midi:n,velocity:t.velocity},composed:!0,bubbles:!0}))}),e.addListener("noteoff","all",t=>{const e=`${t.note.name}${t.note.octave}`,n=t.note.number;this._flash(),this.dispatchEvent(new CustomEvent("noteoff",{detail:{name:e,midi:n,velocity:t.velocity},composed:!0,bubbles:!0}))}),e.addListener("controlchange","all",t=>{this._flash()})}render(){return window.WebMidi=z.a,z.a.supported?i.b` - -
-
- - - - ${z.a.inputs.map(t=>i.b` - - `)} - -
- `:i.b``}});customElements.define("tone-piano",class extends i.a{static get properties(){return{polyphonic:{type:Boolean}}}constructor(){super()}bind(t){this.addEventListener("noteon",e=>{t.triggerAttack(e.detail.name)}),this.addEventListener("noteoff",e=>{this.polyphonic?t.triggerRelease(e.detail.name):t.triggerRelease()})}firstUpdated(){super.firstUpdated();const t=this.shadowRoot.querySelector("tone-keyboard");this.shadowRoot.querySelector("tone-midi-in").addEventListener("noteon",e=>{e.stopPropagation(),t.noteon(e.detail.midi)}),this.shadowRoot.querySelector("tone-midi-in").addEventListener("noteoff",e=>{e.stopPropagation(),t.noteoff(e.detail.midi)}),window.addEventListener("resize",this._resize.bind(this)),setTimeout(()=>this._resize(),100)}_resize(){const t=this.shadowRoot.querySelector("#container").clientWidth,e=Math.clamp(Math.floor(t/100)-1,1,8),n=Math.ceil(Math.scale(e,1,8,5,1));this.shadowRoot.querySelector("tone-keyboard").setAttribute("rootoctave",n),this.shadowRoot.querySelector("tone-keyboard").setAttribute("octaves",e)}render(){return i.b` - -
- - - -
- `}});customElements.define("tone-button",class extends i.a{static get properties(){return{label:{type:String},disabled:{type:Boolean}}}constructor(){super()}_clicked(t){k(),this.disabled&&t.stopPropagation()}render(){return i.b` - -
- -
- `}});customElements.define("tone-trigger",class extends i.a{static get properties(){return{triggered:{type:Boolean},disabled:{type:Boolean}}}constructor(){super(),this.triggered=!1}updated(t){t.has("triggered")&&this.dispatchEvent(new CustomEvent("change",{detail:this.triggered,composed:!0,bubbles:!0}))}bind(t){this.addEventListener("change",e=>{e.detail?t.start():t.stop()})}_mousedown(t){k(),"touchstart"===t.type&&t.preventDefault(),this.triggered=!0}_keydown(t){k()," "!==t.key&&"Enter"!==t.key||(this.triggered=!0)}_keyup(t){" "!==t.key&&"Enter"!==t.key||(this.triggered=!1)}render(){return i.b` - -
- -
- `}});customElements.define("tone-step-sequencer",class extends i.a{static get properties(){return{label:{type:String},rows:{type:Number},columns:{type:Number},highlight:{type:Number}}}constructor(){super(),this.rows=4,this.columns=16,this.highlight=-1,this.values=[],this.adding=!1}get currentColumn(){return this.values[Math.clamp(this.highlight,0,this.columns-1)]}_mousedown(t,e,n){t.cancelable&&t.preventDefault(),this.adding=!this.values[e][n],this.values[e][n]=this.adding,this.requestUpdate()}_mousemove(t,e,n){if(t.cancelable&&t.preventDefault(),t.buttons)this.values[e][n]=this.adding,this.requestUpdate();else if(t.changedTouches){const{clientWidth:i,clientHeight:o}=this.shadowRoot.querySelector("#container"),{top:r,left:s}=this.getBoundingClientRect();Array.from(t.changedTouches).forEach(t=>{const a=(t.clientX-s)/i,l=(t.clientY-r)/o;e=Math.floor(a*this.columns),n=Math.floor(l*this.rows),this.values[e][n]=this.adding}),this.requestUpdate()}}updated(t){if(t.has("columns")||t.has("rows")){this.values=[];for(let t=0;t - :host { - display: inline-block; - width: 100%; - height: 120px; - } - #container { - width: 100%; - height: 100%; - display: flex; - } - .column { - flex: 1; - display: flex; - flex-direction: column; - } - - .column.highlight { - background-color: var(--color-gray); - } - - .column.highlight .row { - transition-duration: 0.4s; - } - - .column.highlight .row.filled { - transition: background-color 0.1s; - } - - .column.highlight .row.filled{ - background-color: white; - } - - .row { - flex: 1; - margin: 1px; - background-color: var(--color-light-gray); - transition: background-color 0s; - } - - .row.filled { - background-color: var(--color-teal); - } - -
- ${this.values.map((t,e)=>i.b` -
- ${t.map((t,n)=>i.b` -
this._mousemove(t,e,n)} - @touchmove=${t=>this._mousemove(t,e,n)} - @mousedown=${t=>this._mousedown(t,e,n)} - @touchstart=${t=>this._mousedown(t,e,n)} - @touchend=${()=>this.adding=!1} - @mouseup=${()=>this.adding=!1} - class="row ${t?"filled":""}">
- `)} -
- `)} -
- `}});customElements.define("tone-position",class extends i.a{static get properties(){return{position:{type:Number},min:{type:Number},max:{type:Number}}}constructor(){super(),this.position=0,this.min=0,this.max=1,this._dragging=!1}bind(t){this.tone=t,this.loop(t)}updated(t){if(t.has("position")){const t=Math.scale(this.position,this.min,this.max,0,1);this.dispatchEvent(new CustomEvent("position",{detail:t,composed:!0}))}}loop(t){requestAnimationFrame(this.loop.bind(this,t)),this._dragging||(this.position=t.progress)}_change(t){if(this._dragging=!0,clearTimeout(this._dragTimeout),this._dragTimeout=setTimeout(()=>this._dragging=!1,200),this.tone){const e=Math.scale(t.detail,this.min,this.max,0,this.tone.loopEnd);this.tone.seconds=e,this.position=this.tone.progress}}render(){return i.b` - -
- - -
- `}});customElements.define("tone-slider-2d",class extends i.a{static get properties(){return{x:{type:Number},y:{type:Number}}}constructor(){super(),this.x=.5,this.y=.5}_resize(){const t=this.shadowRoot.querySelector("#container");this._slider.resize(t.clientWidth,t.clientHeight)}_getXY(t){t.stopPropagation(),t.preventDefault();const{clientWidth:e,clientHeight:n}=this.shadowRoot.querySelector("#container");let i=t.offsetX,o=t.offsetY;if(t.changedTouches){const{top:e,left:n}=this.getBoundingClientRect();i=t.changedTouches[0].clientX-n,o=t.changedTouches[0].clientY-e}return{x:Math.clamp(i/e,0,1),y:1-Math.clamp(o/n,0,1)}}_mousedown(t){const{x:e,y:n}=this._getXY(t);this.x=e,this.y=n,this.dispatchEvent(new CustomEvent("mousedown",{detail:{x:this.x,y:this.y},composed:!0}))}_mouseup(t){const{x:e,y:n}=this._getXY(t);this.x=e,this.y=n,this.dispatchEvent(new CustomEvent("mouseup",{detail:{x:this.x,y:this.y},composed:!0}))}_mousemove(t){if(t.buttons||t.changedTouches){const{x:e,y:n}=this._getXY(t);this.x=e,this.y=n,this.dispatchEvent(new CustomEvent("change",{detail:{x:this.x,y:this.y},composed:!0}))}}_mouseleave(t){t.buttons&&this._mouseup(t)}render(){return i.b` - -
-
-
-
- `}});var D=n(50);customElements.define("tone-envelope-viz",class extends D.a{constructor(){super(),this.min=0,this.max=1.1,this.duration=.1,this.alt="envelope curve"}async visualize(t){const e=t.get(),n=e.attack+e.decay+e.release,i=await Tone.Offline(()=>{const t=(new Tone.Envelope).toDestination();t.set(e),t.attack*=1,t.decay*=1,t.release*=1,t.toDestination(),t.triggerAttack(.001),t.triggerRelease(1*(e.attack+e.decay+.01)+.001)},1*(n+.01)+.002);this.buffer=i.toArray(0),this.requestUpdate()}});customElements.define("tone-envelope-curve",class extends i.a{static get properties(){return{label:{type:String},attribute:{type:String},basic:{type:Boolean}}}constructor(){super(),this.basic=!1}sync(t){const e=t[this.attribute];this.shadowRoot.querySelector("tone-select-attribute").value=e}get value(){return this.shadowRoot.querySelector("tone-select-attribute").value}set value(t){this.shadowRoot.querySelector("tone-select-attribute").value=t}render(){let t=i.b``;return this.basic||(t=i.b` - - - - - - `),i.b` - - - - ${t} -
- `}});class L extends o.a{static get properties(){return{label:{type:String}}}constructor(){super(),this.label="Envelope",this.collapsed=!1}renderAttributes(){return i.b``}render(){return i.b` - - this.collapsed=t.detail} - ?collapsed=${this.collapsed} label="${this.label}"> - - - - - - - - - - - - - - ${this.renderAttributes()} - - `}}customElements.define("tone-envelope",L);customElements.define("tone-frequency-envelope",class extends L{renderAttributes(){return i.b` - - - - - `}});customElements.define("tone-meter",class extends i.a{static get properties(){return{stereo:{type:Boolean},level:{type:Boolean},color:{type:String}}}constructor(){super(),this.color="#777"}bind(t){if(this.stereo,this.stereo){const e=new Tone.Split;t.connect(e),this._meters=[new Tone.Meter(.9),new Tone.Meter(.9)],e.left.connect(this._meters[0]),e.right.connect(this._meters[1])}else this._meters=[new Tone.Meter(.9)],t.connect(this._meters[0]);this._canvas=this.shadowRoot.querySelector("canvas"),this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight,this._context=this._canvas.getContext("2d"),this.loop(),window.addEventListener("resize",()=>{this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight})}loop(){requestAnimationFrame(this.loop.bind(this));const{width:t,height:e}=this._canvas,n=this._meters.map(t=>t.getLevel()),i=n.map(t=>Math.clamp(Math.scale(t,-100,6,0,e),4,e));this._context.clearRect(0,0,t,e);const o=t/this._meters.length;this._context.fillStyle=this.color;const r=this._meters.length>1?5:0;i.forEach((t,n)=>{this._context.fillRect(n*o+r*n,e-t,o-r,t)}),this.level&&Array.from(this.shadowRoot.querySelectorAll(".level")).forEach((t,e)=>{let i=n[e];i<-100&&(i=-1/0),t.textContent=i.toFixed(2)})}render(){let t=i.b``;return this.level&&(t=this.stereo?i.b` -
-Infinity
-
-Infinity
- `:i.b` -
-Infinity
- `),i.b` - -
- - audio meter level - - ${this.level?i.b` -
${t}
`:i.b``} -
- `}});var q=n(139),j=n.n(q);customElements.define("tone-presets",class extends i.a{static get properties(){return{label:{type:String},presets:{type:String}}}constructor(){super(),this.label="Presets",this.presets=JSON.stringify("[]"),this._options={}}bind(t){this.addEventListener("preset",e=>{const n=new t.constructor,i=n.get();n.dispose();const o=j()({},i,e.detail);t.set(o),this.dispatchEvent(new CustomEvent("sync",{detail:o,composed:!0,bubbles:!0}))})}_clicked(t,e){const n=Object.assign({},e);this.dispatchEvent(new CustomEvent("preset",{detail:n,composed:!0,bubbles:!0}))}render(){if("undefined"!==this.presets){const t=JSON.parse(this.presets);return i.b` - -
-
${this.label}
-
- ${t.map((t,e)=>i.b` - `)} - -
-
- `}return i.b``}});class H extends o.a{static get properties(){return{label:{type:String},presets:{type:String},nopresets:{type:Boolean},collapsed:{type:Boolean},effect:{type:Boolean},polyphonic:{type:Boolean}}}constructor(){super(),this.label="",this.effect=!1,this.polyphonic=!1}bind(t){this.shadowRoot.querySelector("tone-meter").bind(t);const e=this.shadowRoot.querySelector("tone-presets");e&&e.bind(t),this.polyphonic?t.voices.forEach(t=>super.bind(t)):super.bind(t)}renderAttributes(){return i.b``}render(){const t=i.b` -
- - -
- `;return i.b` - - - - ${this.effect?t:i.b``} -
- ${this.renderAttributes()} -
- ${this.nopresets?i.b``:i.b``} -
- `}}customElements.define("tone-instrument",H);const V=[{portamento:0,oscillator:{type:"fatsine4",spread:60,count:10},envelope:{attack:.4,decay:.01,sustain:1,attackCurve:"sine",releaseCurve:"sine",release:.4}},{portamento:0,oscillator:{type:"square4"},envelope:{attack:2,decay:1,sustain:.2,release:2}},{portamento:0,oscillator:{type:"pulse",width:.8},envelope:{attack:.01,decay:.05,sustain:.2,releaseCurve:"bounce",release:.4}},{portamento:.2,oscillator:{type:"sawtooth"},envelope:{attack:.03,decay:.1,sustain:.2,release:.02}},{portamento:.2,oscillator:{partials:[1,0,2,0,3]},envelope:{attack:.001,decay:1.2,sustain:0,release:1.2}},{portamento:.2,oscillator:{type:"fatcustom",partials:[.2,1,0,.5,.1],spread:40,count:3},envelope:{attack:.001,decay:1.6,sustain:0,release:1.6}},{portamento:0,oscillator:{type:"fatsawtooth",count:3,spread:30},envelope:{attack:.01,decay:.1,sustain:.5,release:.4,attackCurve:"exponential"}},{portamento:0,oscillator:{type:"sine"},envelope:{attack:.001,decay:.1,sustain:.1,release:1.2}}];customElements.define("tone-synth",class extends H{constructor(){super(),this.label="Synth",this.presets=JSON.stringify(V)}renderAttributes(){return i.b` - - - - `}});const B=[{portamento:0,oscillator:{type:"square"},filter:{Q:6,type:"lowpass",rolloff:-24},envelope:{attack:.005,decay:.1,sustain:.9,release:1},filterEnvelope:{attack:.06,decay:.2,sustain:.5,release:2,baseFrequency:200,octaves:7,exponent:2}},{portamento:0,oscillator:{type:"sawtooth"},filter:{Q:2,type:"bandpass",rolloff:-24},envelope:{attack:.01,decay:.1,sustain:.2,release:.6},filterEnvelope:{attack:.02,decay:.4,sustain:1,release:.7,releaseCurve:"linear",baseFrequency:20,octaves:5}},{portamento:0,oscillator:{type:"fmsquare5",modulationType:"triangle",modulationIndex:2,harmonicity:.501},filter:{Q:1,type:"lowpass",rolloff:-24},envelope:{attack:.01,decay:.1,sustain:.4,release:2},filterEnvelope:{attack:.01,decay:.1,sustain:.8,release:1.5,baseFrequency:50,octaves:4.4}},{portamento:.08,oscillator:{type:"custom",partials:[2,1,3,2,.4]},filter:{Q:4,type:"lowpass",rolloff:-48},envelope:{attack:.04,decay:.06,sustain:.4,release:1},filterEnvelope:{attack:.01,decay:.1,sustain:.6,release:1.5,baseFrequency:50,octaves:3.4}},{portamento:.01,oscillator:{type:"sawtooth"},filter:{Q:2,type:"lowpass",rolloff:-24},envelope:{attack:.1,decay:.1,sustain:.6,release:.5},filterEnvelope:{attack:.05,decay:.8,sustain:.4,release:1.5,baseFrequency:2e3,octaves:1.5}},{portamento:0,oscillator:{type:"pwm",modulationFrequency:1},filter:{Q:6,rolloff:-24},envelope:{attack:.025,decay:.3,sustain:.9,release:2},filterEnvelope:{attack:.245,decay:.131,sustain:.5,release:2,baseFrequency:20,octaves:7.2,exponent:2}},{portamento:0,oscillator:{type:"sawtooth"},filter:{Q:3,type:"highpass",rolloff:-12},envelope:{attack:.01,decay:.3,sustain:0,release:.9},filterEnvelope:{attack:.01,decay:.1,sustain:0,release:.1,baseFrequency:800,octaves:-1.2}}];customElements.define("tone-mono-synth",class extends H{constructor(){super(),this.label="MonoSynth",this.presets=JSON.stringify(B)}renderAttributes(){return i.b` - - - - - - `}});const G=[{frequency:300,envelope:{attack:.001,decay:.20958529411764706,sustain:0,release:.4888,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},harmonicity:17.075,modulationIndex:36.84,resonance:378.8235294117647,octaves:2.25},{frequency:200,envelope:{attack:.01,decay:.0427764705882353,sustain:0,release:.4888,attackCurve:"linear",decayCurve:"linear",releaseCurve:"exponential"},harmonicity:12,modulationIndex:21.04,resonance:106.19607843137256,octaves:4},{frequency:300,envelope:{attack:.09584313725490196,decay:.26265196078431374,sustain:0,release:.4888,attackCurve:"ripple",decayCurve:"exponential",releaseCurve:"exponential"},harmonicity:.5,modulationIndex:11.56,resonance:474.0882352941176,octaves:.99},{frequency:300,envelope:{attack:.001,decay:.4,sustain:0,release:.2,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},harmonicity:12,modulationIndex:20,resonance:800,octaves:1.5}];customElements.define("tone-metal-synth",class extends H{constructor(){super(),this.label="MetalSynth",this.presets=JSON.stringify(G)}renderAttributes(){return i.b` - - - - - - `}});const U=[{pitchDecay:.0033411764705882354,octaves:.8300000000000001,oscillator:{frequency:440,detune:0,phase:0,type:"fmsine",modulationIndex:.1,modulationType:"sawtooth",harmonicity:.44,volume:0,mute:!1},envelope:{attack:6e-4,decay:.25,sustain:0,release:1.4,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"exponential"}},{pitchDecay:.008,octaves:2,oscillator:{type:"sine",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},envelope:{attack:6e-4,decay:.5,sustain:0,release:1.4,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"exponential"}},{pitchDecay:.019729411764705884,octaves:4.845,oscillator:{frequency:440,detune:0,phase:0,spread:80.4,count:3,type:"fatsine",partialCount:0,volume:0,mute:!1},envelope:{attack:.011560784313725491,decay:.22226666666666667,sustain:0,release:1.4,attackCurve:"sine",decayCurve:"exponential",releaseCurve:"exponential"}}];customElements.define("tone-membrane-synth",class extends H{constructor(){super(),this.label="MembraneSynth",this.presets=JSON.stringify(U)}renderAttributes(){return i.b` - - - - - `}});customElements.define("tone-noise-synth",class extends H{constructor(){super(),this.label="NoiseSynth"}renderAttributes(){return i.b` - - - `}});const W=[{harmonicity:1,modulationIndex:20.848,portamento:.024,oscillator:{type:"sawtooth9",frequency:440,detune:0,phase:0,partialCount:9},envelope:{attack:.012926470588235294,decay:.05975,sustain:.16,release:.18211764705882355,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"exponential"},modulation:{type:"custom",frequency:440,detune:0,phase:0,partials:[.8105694691387023,0,.0900632743487447,0,.03242277876554809,0,.016542234064055146,0,.010007030483193857,0,.00669892123255126,0,.004796269048158,0,.6,0,.0028047386475387615,.4727272727272728,.002245344789857901,0,.0018380260071172384,0,.0015322674274833694,0,.0012969111506219236,.8727272727272728,.0011118922759104286,0,.0009638162534348421,0,.0008434645880735718,0],partialCount:32},modulationEnvelope:{attack:.012926470588235294,decay:.08784411764705882,sustain:0,release:.08627941176470588,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"cosine"}},{harmonicity:1.515,modulationIndex:6.483999999999999,detune:0,oscillator:{type:"sawtooth3",frequency:440,detune:0,phase:0,partialCount:3,volume:0,mute:!1},envelope:{attack:.010585294117647059,decay:.27689411764705885,sustain:0,release:.7328941176470589,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},modulation:{type:"square",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},modulationEnvelope:{attack:.01,decay:.05975,sustain:0,release:.13635,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"exponential"},portamento:0},{harmonicity:1.655,modulationIndex:40,detune:0,oscillator:{type:"square",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},envelope:{attack:.09584313725490196,decay:.13174117647058822,sustain:.25,release:.5,attackCurve:"exponential",decayCurve:"exponential",releaseCurve:"exponential"},modulation:{type:"triangle",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},modulationEnvelope:{attack:.0427764705882353,decay:.8596519607843138,sustain:.08,release:3.392894117647059,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},portamento:.15899999999999997}];customElements.define("tone-fm-synth",class extends H{constructor(){super(),this.label="FMSynth",this.presets=JSON.stringify(W)}renderAttributes(){return i.b` - - - - - - - - `}});const Y=[{harmonicity:3.51,detune:0,oscillator:{type:"sawtooth",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},envelope:{attack:.01682843137254902,decay:.2,sustain:.3,release:.3,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},modulation:{type:"sine",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},modulationEnvelope:{attack:.6661147058823529,decay:1.1665411764705882,sustain:1,release:2.151691176470588,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},portamento:0},{harmonicity:2.88,detune:0,oscillator:{frequency:440,detune:0,phase:0,width:0,volume:0,mute:!1,type:"pulse"},envelope:{attack:.20958529411764706,decay:1.9219607843137254,sustain:.08,release:1.5132911764705883,attackCurve:"exponential",decayCurve:"linear",releaseCurve:"exponential"},modulation:{type:"square",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},modulationEnvelope:{attack:.01682843137254902,decay:1.1665411764705882,sustain:1,release:2.151691176470588,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},portamento:0},{harmonicity:2.355,detune:0,oscillator:{type:"sawtooth",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},envelope:{attack:.19729411764705884,decay:1.1072313725490197,sustain:.3,release:2.8358588235294118,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},modulation:{type:"triangle",frequency:440,detune:0,phase:0,partialCount:0,volume:0,mute:!1},modulationEnvelope:{attack:.09584313725490196,decay:1.1665411764705882,sustain:1,release:2.151691176470588,attackCurve:"linear",decayCurve:"exponential",releaseCurve:"exponential"},portamento:0}];customElements.define("tone-am-synth",class extends H{constructor(){super(),this.label="AMSynth",this.presets=JSON.stringify(Y)}renderAttributes(){return i.b` - - - - - - - `}});customElements.define("tone-sampler",class extends H{constructor(){super(),this.label="Sampler"}renderAttributes(){return i.b` - - - - - - - `}});customElements.define("tone-duo-synth",class extends H{constructor(){super(),this.label="MembraneSynth"}renderAttributes(){return i.b` - - - - - - `}});customElements.define("tone-filter-viz",class extends D.a{constructor(){super(),this.min=0,this.max=2.5,this.alt="filter response curve"}drawBackground(t,e,n){t.fillStyle="rgba(255, 255, 255, 0.3)",t.fillRect(0,.6*n,e,3),t.fill()}async visualize(t){this.buffer=t.getFrequencyResponse().map(t=>Math.pow(t,.5)),this.requestUpdate()}});customElements.define("tone-filter",class extends o.a{static get properties(){return{label:{type:String},frequency:{type:Boolean}}}constructor(){super(),this.label="Filter"}render(){return i.b` - - this.collapsed=t.detail} - ?collapsed=${this.collapsed} label="${this.label}"> - - - - - - - - - - - - - - - - - - - ${this.frequency?i.b` - - `:i.b``} - - - - `}});customElements.define("tone-volume-slider",class extends i.a{static get properties(){return{value:{type:Number},attribute:{type:String}}}constructor(){super(),this.value=0}sync(t){this.shadowRoot.querySelector("tone-slider").sync(t)}render(){return i.b` - -
-
- this.value=t.detail} - bare> -
-
${this.value>=0?"+":""}${this.value.toFixed(0)} db
-
- `}});customElements.define("tone-channel",class extends o.a{static get properties(){return{label:{type:String},solo:{type:Boolean},mute:{type:Boolean},muted:{type:Boolean}}}bind(t){this.shadowRoot.querySelector("tone-meter").bind(t),this.addEventListener("mute",e=>{t.mute=e.detail}),this.addEventListener("solo",e=>{t.solo=e.detail}),setInterval(()=>{this.muted=t.muted},100),super.bind(t)}updated(t){super.updated(t),t.has("solo")&&this.dispatchEvent(new CustomEvent("solo",{detail:this.solo,composed:!0,bubbles:!0})),t.has("mute")&&this.dispatchEvent(new CustomEvent("mute",{detail:this.mute,composed:!0,bubbles:!0}))}render(){return i.b` - -
-

${this.label}

-
- - - -
- - -
- - -
-
- `}});customElements.define("tone-transport",class extends o.a{static get properties(){return{controls:{type:Boolean},position:{type:Boolean}}}constructor(){super(),this.collapsed=!0}bind(t){super.bind(t),this.shadowRoot.querySelector("tone-play-toggle").bind(t),setInterval(()=>{this.shadowRoot.querySelector("#position").textContent=t.position},100)}render(){return i.b` - -
-
- -
0:0:0
-
- - - ${this.controls?i.b` - - - - - - - - - `:i.b``} -
- `}});customElements.define("tone-compressor",class extends o.a{static get properties(){return{label:{type:String}}}constructor(){super(),this.label="Compressor",this.collapsed=!1}renderAttributes(){return i.b``}render(){return i.b` - - this.collapsed=t.detail} - ?collapsed=${this.collapsed} label="${this.label}"> - - - - - - - - - - - - - `}});const K=i.b``,J=(i.b``,i.b``);customElements.define("tone-unmute",class extends o.a{static get properties(){return{suspended:{type:Boolean},muted:{type:Boolean},focused:{type:Boolean},novolume:{type:Boolean}}}constructor(){super(),this.suspended=!0,this.muted=!1,this.focused=!1,setInterval(()=>{this.suspended="suspended"===Tone.context.state},100)}updated(t){if(t.has("muted")){Tone.Master.mute=this.muted;const t=this.shadowRoot.querySelector("#volume");this.novolume||this.muted||t.min!=t.value||(t.value=0)}}_clicked(t){k(),"suspended"!==Tone.context.state&&(this.muted=!this.muted)}_adjustVolume(t){t.detail===t.target.min?this.muted=!0:this.muted=!1,Tone.Master.volume.value=t.detail}render(){return i.b` - -
- - - ${this.novolume?i.b``:i.b` - this.focused=!1} - @focus=${t=>this.focused=!0} - id="volume" - @change=${this._adjustVolume.bind(this)} - bare min="-60" max="0" value="0">`} - -
- `}});customElements.define("tone-top-bar",class extends i.a{constructor(){super()}updated(){const t=this.shadowRoot.querySelector("canvas");t.width=2*t.clientWidth,t.width=2*t.clientHeight;const{width:e,height:n}=t,i=t.getContext("2d"),o=function(t){const e=new Array(t),n=new Array(t),i=new Array(t),o=new Array(t),r=[e,i,o,n];for(let n=0;n{const o=Math.scale(t,-1,1,.25*n,.75*n);0===e?i.moveTo(e,o):i.lineTo(e,o)}),i.lineTo(e,n),i.lineTo(0,n),i.fillStyle="#22DBC0",i.fill()}render(){return i.b` - - - - `}});customElements.define("tone-content",class extends i.a{render(){return i.b` - -
- -
- `}});const X=i.b``,Q=i.b``;customElements.define("tone-drawer",class extends i.a{static get properties(){return{collapsed:{type:Boolean},label:{type:String}}}constructor(){super(),this.collapsed=window.innerHeight<700,this.label="Components"}updated(t){if(t.has("collapsed")&&!this.collapsed){const t=t=>{t.dispatchEvent(new CustomEvent("collapse",{detail:this.collapsed,composed:!0,bubbles:!0}))};Array.from(this.children).forEach(e=>{e.assignedNodes?Array.from(e.assignedNodes()).forEach(e=>t(e)):t(e),e.dispatchEvent(new CustomEvent("collapse",{detail:this.collapsed,composed:!0,bubbles:!0}))}),window.dispatchEvent(new CustomEvent("resize"))}}render(){return i.b` - -
- -

${this.label}

-
- ${this.collapsed?i.b``:i.b``} -
-
- `}});customElements.define("tone-explanation",class extends i.a{static get properties(){return{label:{type:String}}}constructor(){super()}render(){return i.b` - -
-

${this.label}

-
- -
-
- `}});customElements.define("tone-loader",class extends i.a{static get properties(){return{loaded:{type:Boolean},progress:{type:Number}}}constructor(){super(),this.progress=0,this.loaded=!1,Tone.Buffer.on("progress",t=>{this.progress=t}),Tone.loaded().then(()=>{this.loaded=!0,setTimeout(()=>{this.remove()},500)})}render(){return i.b` - -
-
-
-
-
- `}});const Z=i.b``,tt=i.b``;customElements.define("tone-side-panel",class extends i.a{static get properties(){return{collapsed:{type:Boolean}}}constructor(){super(),this.collapsed=!0,this.examples={},this.fetchExamples()}async fetchExamples(){try{const t=await fetch("./js/ExampleList.json");this.examples=await t.json(),this.requestUpdate()}catch(t){console.log("could not load example list")}}updated(t){t.has("collapsed")&&this.dispatchEvent(new CustomEvent("collapse",{detail:this.collapsed,composed:!0}))}render(){const t=0===Object.keys(this.examples).length;return i.b` - -
- -
- ${this.collapsed?i.b``:i.b` -

Examples

-
${t?"Loading...":""}
- ${Object.entries(this.examples).map(([t,e])=>i.b` -

${t}

-
    - ${Object.entries(e).map(([t,e])=>i.b` -
  • ${t}
  • - `)} -
- `)} - `} -
-
- `}});customElements.define("tone-example",class extends i.a{static get properties(){return{collapsed:{type:Boolean},open:{type:Boolean}}}constructor(){super(),this.collapsed=!0}updated(t){t.has("open")&&(this.collapsed=!this.open)}render(){return i.b` - -
- this.collapsed=t.detail} - > -
- - -
-
- `}});customElements.define("tone-waveform",class extends i.a{constructor(){super(),this._waveform=function(t){const e=new Array(t),n=new Array(t),i=new Array(t),o=new Array(t),r=[e,i,o,n];for(let n=0;n - - :host, #container, canvas { - width: 100%; - height: 100%; - position: absolute; - top: 0px; - left: 0px; - } - - #container { - background-color: var(--color-magenta); - } - - -
- -
- `}});const et=i.b``;customElements.define("tone-start-context",class extends i.a{static get properties(){return{running:{type:Boolean},disabled:{type:Boolean}}}constructor(){super(),this.running=!1}firstUpdated(){const t=setInterval(()=>{this.running="running"===Tone.context.state,this.running&&clearInterval(t)},100)}async _clicked(t){await k(),this.running="running"===Tone.context.state}render(){return i.b` - -
- -
- `}});customElements.define("tone-demo",class extends i.a{static get properties(){return{autoplay:{type:Boolean}}}firstUpdated(){super.firstUpdated(),this.shadowRoot.querySelector("tone-waveform").bind(Tone.Master)}render(){return i.b` - -
- - ${this.autoplay?i.b``:i.b``} -
- -
-
- `}});customElements.define("tone-fft",class extends i.a{constructor(){super(),this._fft=new Tone.FFT(256)}bind(t){t.connect(this._fft),this._canvas=this.shadowRoot.querySelector("canvas"),this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight,this._context=this._canvas.getContext("2d"),this.loop(),window.addEventListener("resize",()=>{this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight})}loop(){requestAnimationFrame(this.loop.bind(this));const t=this._fft.getValue(),e=this._canvas.width,n=this._canvas.height;this._context.clearRect(0,0,e,n),this._context.fillStyle="white",t.forEach((i,o)=>{const r=Math.scale(o,0,t.length,0,e),s=Math.clamp(Math.scale(i,-100,0,0,n),0,n);this._context.fillRect(r,n/2-s/2,2,s),this._context.fill()})}render(){return i.b` - - - waveform of current playing audio - - `}});customElements.define("tone-loop",class extends i.a{static get properties(){return{color:{type:String}}}constructor(){super(),this.color="#777"}bind(t){this._canvas=this.shadowRoot.querySelector("canvas"),this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight,this._context=this._canvas.getContext("2d"),this.loop(t),window.addEventListener("resize",()=>{this._canvas.width=2*this._canvas.clientWidth,this._canvas.height=2*this._canvas.clientHeight})}loop(t){requestAnimationFrame(this.loop.bind(this,t));const{width:e,height:n}=this._canvas,i=this._context;i.clearRect(0,0,e,n),i.fillStyle="#eee";const o=Math.min(e,n);i.arc(e/2,n/2,o/2,0,2*Math.PI,!1),i.fill();const r=t.progress;i.beginPath(),i.fillStyle=this.color,i.moveTo(e/2,n/2);const s=Math.PI/2;i.arc(e/2,n/2,o/2,-s,r*Math.PI*2-s,!1),i.fill()}render(){return i.b` - -
- - audio meter level - -
- `}});class nt extends H{constructor(){super(),this.effect=!0}}customElements.define("tone-effect",nt);customElements.define("tone-chorus",class extends nt{constructor(){super(),this.label="Chorus"}renderAttributes(){return i.b` - - - - - - `}});customElements.define("tone-chebyshev",class extends nt{constructor(){super(),this.label="Chebyshev"}renderAttributes(){return i.b` - - `}});customElements.define("tone-freeverb",class extends nt{constructor(){super(),this.label="Freeverb"}renderAttributes(){return i.b` - - - `}});customElements.define("tone-tremolo",class extends nt{constructor(){super(),this.label="Tremolo"}renderAttributes(){return i.b` - - - - - `}});customElements.define("tone-auto-filter",class extends nt{constructor(){super(),this.label="AutoFilter"}renderAttributes(){return i.b` - - - - - - - `}});customElements.define("tone-auto-panner",class extends nt{constructor(){super(),this.label="AutoPanner"}renderAttributes(){return i.b` - - - - `}});customElements.define("tone-ping-pong-delay",class extends nt{constructor(){super(),this.label="PingPongDelay"}renderAttributes(){return i.b` - - - `}});customElements.define("tone-reverb",class extends nt{static get properties(){return{generating:{type:Boolean}}}constructor(){super(),this.label="Reverb",this.generating=!1}bind(t){super.bind(t),this.generate(t);let e=-1;this.addEventListener("change",()=>{this.generating=!0,clearTimeout(e),e=setTimeout(()=>{this.generate(t)},100)})}async generate(t){this.generating=!0,await t.generate(),this.generating=!1}renderAttributes(){return i.b` - ${this.generating?i.b` -
Generating...
- `:i.b``} - - - `}});customElements.define("tone-distortion",class extends nt{constructor(){super(),this.label="Distortion"}renderAttributes(){return i.b` - - `}})}]); \ No newline at end of file diff --git a/examples/jump.html b/examples/jump.html index a997cf35..38bb7687 100644 --- a/examples/jump.html +++ b/examples/jump.html @@ -7,11 +7,11 @@ - + - - + +