!function(){var t=function(t){var e;return function(n){return e||t(e={exports:{},parent:n},e.exports),e.exports}},e=t(function(t,e){"use strict";var i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l,re.inherits=ee;var o=r({}),s=n({});re.inherits(l,o);for(var a=i(s.prototype),u=0;u-1?setImmediate:ie.nextTick;d.WritableState=c,re.inherits=ee;var a,u={deprecate:En},h=tn.Buffer,l=r.Uint8Array||function(){};function f(){}function c(t,n){o=o||e({}),t=t||{};var r=n instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var a=t.highWaterMark,u=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:r&&(u||0===u)?u:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(ie.nextTick(i,r),ie.nextTick(b,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),b(t,e))}(t,n,r,e,i);else{var o=v(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||g(t,n),r?s(y,t,n,o,i):y(t,n,o,i)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function d(t){if(o=o||e({}),!(a.call(d,this)||this instanceof o))return new d(t);this._writableState=new c(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),hn.call(this)}function p(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function y(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),b(t,e)}function g(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,o=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)o[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;o.allBuffers=u,p(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;n;){var h=n.chunk,l=n.encoding,f=n.callback;if(p(t,e,!1,e.objectMode?1:h.length,h,l,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function v(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function m(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),b(t,e)})}function b(t,e){var n=v(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,ie.nextTick(m,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}re.inherits(d,hn),c.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(c.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(d,Symbol.hasInstance,{value:function(t){return!!a.call(this,t)||this===d&&t&&t._writableState instanceof c}})):a=function(t){return t instanceof this},d.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},d.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,s=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof l);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=f),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),ie.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),ie.nextTick(r,o),i=!1),i}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n)),e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(d.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),d.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},d.prototype._writev=null,d.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,b(t,e),n&&(e.finished?ie.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(d.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),d.prototype.destroy=un.destroy,d.prototype._undestroy=un.undestroy,d.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,mt,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}),r=t(function(t,n){(function(n,r){"use strict";t.exports=c;var i;c.ReadableState=f,Rt.EventEmitter;var o=function(t,e){return t.listeners(e).length},s=tn.Buffer,a=r.Uint8Array||function(){};re.inherits=ee;var u=void 0;u=Q&&Q.debuglog?Q.debuglog("stream"):function(){};var h;re.inherits(c,hn);var l=["error","close","destroy","pause","resume"];function f(t,n){i=i||e({}),t=t||{};var r=n instanceof i;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var o=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new on,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=ln.StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function c(t){if(i=i||e({}),!(this instanceof c))return new c(t);this._readableState=new f(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),hn.call(this)}function d(t,e,n,r,i){var o,u=t._readableState;return null===e?(u.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,v(t)}}(t,u)):(i||(o=function(t,e){var n,r;return r=e,s.isBuffer(r)||r instanceof a||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(u,e)),o?t.emit("error",o):u.objectMode||e&&e.length>0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):p(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!n?(e=u.decoder.write(e),u.objectMode||0!==e.length?p(t,u,e,!1):b(t,u)):p(t,u,e,!1))):r||(u.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=y?t=y:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function v(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?ie.nextTick(m,t):m(t))}function m(t){u("emit readable"),t.emit("readable"),S(t)}function b(t,e){e.readingMore||(e.readingMore=!0,ie.nextTick(w,t,e))}function w(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;return to.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=s.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0==(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e),r}(t,e.buffer,e.decoder),n);var n}function x(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,ie.nextTick(T,e,t))}function T(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function L(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?x(this):v(this),null;if(0===(t=g(t,e))&&e.ended)return 0===e.length&&x(this),null;var r,i=e.needReadable;return u("need readable",i),(0===e.length||e.length-t0?A(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&x(this)),null!==r&&this.emit("data",r),r},c.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},c.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,u("pipe count=%d opts=%j",i.pipesCount,e);var s=e&&!1===e.end||t===n.stdout||t===n.stderr?g:a;function a(){u("onend"),t.end()}i.endEmitted?ie.nextTick(s):r.once("end",s),t.on("unpipe",function e(n,o){u("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,u("cleanup"),t.removeListener("close",p),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",e),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||h())});var h=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,S(t))}}(r);t.on("drain",h);var l=!1,f=!1;function c(e){u("ondata"),f=!1,!1!==t.write(e)||f||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==L(i.pipes,t))&&!l&&(u("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function d(e){u("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",y),g()}function y(){u("onfinish"),t.removeListener("close",p),g()}function g(){u("unpipe"),r.unpipe(t)}return r.on("data",c),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener("error",n);t._events&&t._events.error?se(t._events.error)?t._events.error.unshift(n):t._events.error=[n,t._events.error]:t.on("error",n)}(t,0,d),t.once("close",p),t.once("finish",y),t.emit("pipe",r),i.flowing||(u("pipe resume"),r.resume()),t},c.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;othis.maxAge&&(this.remove(t),1))},s.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},s.prototype.evict=function(){this.tail&&this.remove(this.tail)};var a={};function u(t,e,n){this.cache="number"==typeof n?new o(n):n||new o(100),this.state=t,this.emit=e}function h(t){return new(t.bind.apply(t,arguments))}"function"==typeof Symbol&&Symbol.iterator,a=u,u.prototype.render=function(t,e){var n=this.cache.get(e);if(!n){for(var r=[],i=2,o=arguments.length;i0;)t.queue.shift()(e);t.scheduled=!1,t.queue.length&&t.schedule()})}},d.prototype.setTimeout=function(t){setTimeout(t,0,{timeRemaining:function(){return 1}})},l=function(){var t;return c?(window._nanoScheduler||(window._nanoScheduler=new d(!0)),t=window._nanoScheduler):t=new d,t},"function"==typeof Symbol&&Symbol.iterator;var p,y=l();g.disabled=!0;try{p=window.performance,g.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!p.mark}catch(t){}function g(t){if(g.disabled)return v;var e=(1e4*p.now()).toFixed()%Number.MAX_SAFE_INTEGER,n="start-"+e+"-"+t;function r(r){var i="end-"+e+"-"+t;p.mark(i),y.push(function(){var o=null;try{var s=t+" ["+e+"]";p.measure(s,n,i),p.clearMarks(n),p.clearMarks(i)}catch(t){o=t}r&&r(o,t)})}return p.mark(n),r.uuid=e,r}function v(t){t&&y.push(function(){t(new Error("nanotiming: performance API unavailable"))})}var m=g,b=function(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){var o=i-(n=e+n>i?i-e:n);for(r=e;r0&&this._emit(this._listeners[t],e),this._starListeners.length>0&&this._emit(this._starListeners,t,e,i.uuid),i(),this},_.prototype.on=_.prototype.addListener=function(t,e){return"*"===t?this._starListeners.push(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)),this},_.prototype.prependListener=function(t,e){return"*"===t?this._starListeners.unshift(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].unshift(e)),this},_.prototype.once=function(t,e){var n=this;return this.on(t,function r(){e.apply(n,arguments),n.removeListener(t,r)}),this},_.prototype.prependOnceListener=function(t,e){var n=this;return this.prependListener(t,function r(){e.apply(n,arguments),n.removeListener(t,r)}),this},_.prototype.removeListener=function(t,e){return"*"===t?(this._starListeners=this._starListeners.slice(),n(this._starListeners,e)):(void 0!==this._listeners[t]&&(this._listeners[t]=this._listeners[t].slice()),n(this._listeners[t],e));function n(t,e){if(t){var n=t.indexOf(e);return-1!==n?(b(t,n,1),!0):void 0}}},_.prototype.removeAllListeners=function(t){return t?"*"===t?this._starListeners=[]:this._listeners[t]=[]:(this._starListeners=[],this._listeners={}),this},_.prototype.listeners=function(t){var e="*"!==t?this._listeners[t]:this._starListeners,n=[];if(e)for(var r=e.length,i=0;i=0;--u)s=(a=r[u]).name,i=a.namespaceURI,o=a.value,i?(s=a.localName||s,e.getAttributeNS(i,s)!==o&&e.setAttributeNS(i,s,o)):e.hasAttribute(s)?e.getAttribute(s)!==o&&("null"===o||"undefined"===o?e.removeAttribute(s):e.setAttribute(s,o)):e.setAttribute(s,o);for(var h=n.length-1;h>=0;--h)!1!==(a=n[h]).specified&&(s=a.name,(i=a.namespaceURI)?(s=a.localName||s,t.hasAttributeNS(i,s)||e.removeAttributeNS(i,s)):t.hasAttributeNS(null,s)||e.removeAttribute(s))}(t,e),3!==n&&8!==n||e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue),"INPUT"===r?function(t,e){var n=t.value,r=e.value;L(t,e,"checked"),L(t,e,"disabled"),n!==r&&(e.setAttribute("value",n),e.value=n),"null"===n&&(e.value="",e.removeAttribute("value")),t.hasAttributeNS(null,"value")?"range"===e.type&&(e.value=n):e.removeAttribute("value")}(t,e):"OPTION"===r?function(t,e){L(t,e,"selected")}(t,e):"TEXTAREA"===r&&function(t,e){var n=t.value;if(n!==e.value&&(e.value=n),e.firstChild&&e.firstChild.nodeValue!==n){if(""===n&&e.firstChild.nodeValue===e.placeholder)return;e.firstChild.nodeValue=n}}(t,e),function(t,e){for(var n=0;n0&&ft(t[r].childNodes,e)}}(nt=function t(e,n,r,i){return n=n||function(){},r=r||function(){},e.setAttribute(ot,"o"+st),rt["o"+st]=[n,r,0,i||t.caller],st+=1,e}).KEY_ATTR=ot;var ct,dt=nt.KEY_ID=it,pt=nt.KEY_ATTR;function yt(t){this._hasWindow="undefined"!=typeof window,this._id=null,this._ncID=null,this._olID=null,this._proxy=null,this._loaded=!1,this._rootNodeName=null,this._name=t||"nanocomponent",this._rerender=!1,this._handleLoad=this._handleLoad.bind(this),this._handleUnload=this._handleUnload.bind(this),this._arguments=[];var e=this;Object.defineProperty(this,"element",{get:function(){var t=tt.getElementById(e._id);if(t)return t.dataset.nanocomponent===e._ncID?t:void 0}})}ct=yt,yt.prototype.render=function(){for(var t,e=m(this._name+".render"),n=new Array(arguments.length),r=0;r1)for(var n=1;n=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,r=function(t){return n.exec(t).slice(1)};function i(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!r;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,r="/"===s.charAt(0))}return n=e(i(n.split("/"),function(t){return!!t}),!r).join("/"),(r?"/":"")+n||"."},Nt.normalize=function(t){var n=Nt.isAbsolute(t),r="/"===o(t,-1);return(t=e(i(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&r&&(t+="/"),(n?"/":"")+t},Nt.isAbsolute=function(t){return"/"===t.charAt(0)},Nt.join=function(){var t=Array.prototype.slice.call(arguments,0);return Nt.normalize(i(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},Nt.relative=function(t,e){function n(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=Nt.resolve(t).substr(1),e=Nt.resolve(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),o=Math.min(r.length,i.length),s=o,a=0;a0&&s.length>i){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,"object"===("undefined"==typeof console?"undefined":Bt(console))&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else s=o[e]=n,++t._eventsCount;return t}function Ht(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(n=s[t]))return!1;var h="function"==typeof n;switch(r=arguments.length){case 1:!function(t,e,n){if(e)t.call(n);else for(var r=t.length,i=Gt(t,r),o=0;o=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(var n=i,r=n+1,o=t.length;r=0;r--)this.removeListener(t,e[r]);return this},Ut.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n0?Reflect.ownKeys(this._events):[]};var Yt={},Kt={linear:function(t){return t},quadratic:function(t){return Math.pow(t,2)},cubic:function(t){return Math.pow(t,3)},quartic:function(t){return Math.pow(t,4)},quintic:function(t){return Math.pow(t,5)},sigmoid:function(t){return 1/(1+Math.exp(-t))}},Xt=function(t){return Math.sin(t*(Math.PI/2))};Kt.sinusoidal=Xt,Kt.sin=Xt;var Jt=function(t){return Math.pow(2,10*(t-1))};Kt.exponential=Jt,Kt.expo=Jt,Kt.exp=Jt,Kt.circular=function(t){return 1-Math.sqrt(1-t*t)},Kt.uniqueList=["linear","quadratic","cubic","quartic","quintic","sinusoidal","exponential","circular","sigmoid"],Yt=Yt=Kt;var Zt={},Qt=function(t){return~~(1e3*t)/1e3};Zt=Zt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Array(t);n.start=void 0!==n.start?n.start:0,n.end=void 0!==n.end?n.end:1;for(var i=Math.abs(n.end-n.start)/(r.length-1),o=1;o2&&void 0!==arguments[2]?arguments[2]:{},r=Zt(t,e,n),i=~~((n=Object.assign({},{duration:1e3,repeat:!1},n)).duration/t),o=new Rt,s=0,a=setInterval(function(){o.emit("data",r[s]),++s>=r.length&&(!1===n.repeat?(clearInterval(a),o.emit("end")):(o.emit("repeat"),s=0))},i);return o.on("requestStop",function(){clearInterval(a),o.emit("end")}),o};var ee={};function ne(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}ee="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t};var re={};(function(t){var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(t){return Object.prototype.toString.call(t)}re.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},re.isBoolean=function(t){return"boolean"==typeof t},re.isNull=function(t){return null===t},re.isNullOrUndefined=function(t){return null==t},re.isNumber=function(t){return"number"==typeof t},re.isString=function(t){return"string"==typeof t},re.isSymbol=function(t){return"symbol"===(void 0===t?"undefined":e(t))},re.isUndefined=function(t){return void 0===t},re.isRegExp=function(t){return"[object RegExp]"===n(t)},re.isObject=function(t){return"object"===(void 0===t?"undefined":e(t))&&null!==t},re.isDate=function(t){return"[object Date]"===n(t)},re.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},re.isFunction=function(t){return"function"==typeof t},re.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===(void 0===t?"undefined":e(t))||void 0===t},re.isBuffer=t.isBuffer}).call(this,{isBuffer:function(t){return null!=t&&(ne(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ne(t.slice(0,0))}(t)||!!t._isBuffer)}});var ie={};(function(t){"use strict";ie=!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?{nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(a-1),s=0;s0?r-4:r,u=0;u>16&255,o[s++]=e>>8&255,o[s++]=255&e;return 2===i&&(e=he[t.charCodeAt(u)]<<2|he[t.charCodeAt(u+1)]>>4,o[s++]=255&e),1===i&&(e=he[t.charCodeAt(u)]<<10|he[t.charCodeAt(u+1)]<<4|he[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=255&e),o},fromByteArray:function(t){for(var e,n=t.length,r=n%3,i=[],o=0,s=n-r;os?s:o+16383));return 1===r?(e=t[n-1],i.push(ue[e>>2]+ue[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(ue[e>>10]+ue[e>>4&63]+ue[e<<2&63]+"=")),i.join("")}},ue=[],he=[],le="undefined"!=typeof Uint8Array?Uint8Array:Array,fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ce=0,de=fe.length;ce0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function ye(t,e,n){for(var r,i,o=[],s=e;s>18&63]+ue[i>>12&63]+ue[i>>6&63]+ue[63&i]);return o.join("")}he["-".charCodeAt(0)]=62,he["_".charCodeAt(0)]=63;var ge={read:function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,l=-7,f=n?i-1:0,c=n?-1:1,d=t[e+f];for(f+=c,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=c,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=c,l-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=h}return(d?-1:1)*s*Math.pow(2,o-r)},write:function(t,e,n,r,i,o){var s,a,u,h=8*o-i-1,l=(1<>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?c/u:c*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[n+d]=255&s,d+=p,s/=256,h-=8);t[n+d-p]|=128*y}},ve={};ve.Buffer=we,ve.SlowBuffer=function(t){return+t!=t&&(t=0),we.alloc(+t)},ve.INSPECT_MAX_BYTES=50;var me=2147483647;function be(t){if(t>me)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=we.prototype,e}function we(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Se(t)}return _e(t,e,n)}function _e(t,e,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return Ze(t)||t&&Ze(t.buffer)?function(t,e,n){if(e<0||t.byteLength=me)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+me.toString(16)+" bytes");return 0|t}function Te(t,e){if(we.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Ze(t))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Ke(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Xe(t).length;default:if(r)return Ke(t).length;e=(""+e).toLowerCase(),r=!0}}function Le(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function ke(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Qe(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=we.from(e,r)),we.isBuffer(e))return 0===e.length?-1:Ce(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Ce(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Ce(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var f=!0,c=0;ci&&(r=i):r=i;var o=e.length;r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function Ie(t,e,n){return 0===e&&n===t.length?ae.fromByteArray(t):ae.fromByteArray(t.slice(e,n))}function Pe(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+f<=n)switch(f){case 1:h<128&&(l=h);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&h)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&h)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(t){var e=t.length;if(e<=Ue)return String.fromCharCode.apply(String,t);for(var n="",r=0;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return We(this,e,n);case"utf8":case"utf-8":return Pe(this,e,n);case"ascii":return De(this,e,n);case"latin1":case"binary":return qe(this,e,n);case"base64":return Ie(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fe(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},we.prototype.toLocaleString=we.prototype.toString,we.prototype.equals=function(t){if(!we.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===we.compare(this,t)},we.prototype.inspect=function(){var t="",e=ve.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),""},we.prototype.compare=function(t,e,n,r,i){if(!we.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,s=n-e,a=Math.min(o,s),u=this.slice(r,i),h=t.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Me(this,t,e,n);case"utf8":case"utf-8":return Ne(this,t,e,n);case"ascii":return Oe(this,t,e,n);case"latin1":case"binary":return Re(this,t,e,n);case"base64":return Be(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return je(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},we.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ue=4096;function De(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ii)&&(n=i);for(var o="",s=e;sn)throw new RangeError("Trying to access beyond buffer length")}function He(t,e,n,r,i,o){if(!we.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function $e(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function ze(t,e,n,r,i){return e=+e,n>>>=0,i||$e(t,0,n,4),ge.write(t,e,n,r,23,4),n+4}function Ge(t,e,n,r,i){return e=+e,n>>>=0,i||$e(t,0,n,8),ge.write(t,e,n,r,52,8),n+8}we.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||Ve(t,e,this.length);for(var r=this[t],i=1,o=0;++o>>=0,e>>>=0,n||Ve(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},we.prototype.readUInt8=function(t,e){return t>>>=0,e||Ve(t,1,this.length),this[t]},we.prototype.readUInt16LE=function(t,e){return t>>>=0,e||Ve(t,2,this.length),this[t]|this[t+1]<<8},we.prototype.readUInt16BE=function(t,e){return t>>>=0,e||Ve(t,2,this.length),this[t]<<8|this[t+1]},we.prototype.readUInt32LE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},we.prototype.readUInt32BE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},we.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||Ve(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},we.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||Ve(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},we.prototype.readInt8=function(t,e){return t>>>=0,e||Ve(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},we.prototype.readInt16LE=function(t,e){t>>>=0,e||Ve(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},we.prototype.readInt16BE=function(t,e){t>>>=0,e||Ve(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},we.prototype.readInt32LE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},we.prototype.readInt32BE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},we.prototype.readFloatLE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),ge.read(this,t,!0,23,4)},we.prototype.readFloatBE=function(t,e){return t>>>=0,e||Ve(t,4,this.length),ge.read(this,t,!1,23,4)},we.prototype.readDoubleLE=function(t,e){return t>>>=0,e||Ve(t,8,this.length),ge.read(this,t,!0,52,8)},we.prototype.readDoubleBE=function(t,e){return t>>>=0,e||Ve(t,8,this.length),ge.read(this,t,!1,52,8)},we.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||He(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||He(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},we.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,1,255,0),this[e]=255&t,e+1},we.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},we.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},we.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},we.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},we.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);He(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},we.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);He(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},we.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},we.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},we.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},we.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},we.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||He(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},we.prototype.writeFloatLE=function(t,e,n){return ze(this,t,e,!0,n)},we.prototype.writeFloatBE=function(t,e,n){return ze(this,t,e,!1,n)},we.prototype.writeDoubleLE=function(t,e,n){return Ge(this,t,e,!0,n)},we.prototype.writeDoubleBE=function(t,e,n){return Ge(this,t,e,!1,n)},we.prototype.copy=function(t,e,n,r){if(!we.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,r),e);return i},we.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!we.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){var i=t.charCodeAt(0);("utf8"===r&&i<128||"latin1"===r)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Xe(t){return ae.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Ye,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Je(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Ze(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function Qe(t){return t!=t}var tn={},en=ve.Buffer;function nn(t,e){for(var n in t)e[n]=t[n]}function rn(t,e,n){return en(t,e,n)}en.from&&en.alloc&&en.allocUnsafe&&en.allocUnsafeSlow?tn=ve:(nn(ve,tn),tn.Buffer=rn),nn(en,rn),rn.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return en(t,e,n)},rn.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=en(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},rn.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return en(t)},rn.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return ve.SlowBuffer(t)};var on={},sn=tn.Buffer;function an(t,e){t.emit("error",e)}on=function(){function t(){!function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return sn.alloc(0);if(1===this.length)return this.head.data;for(var e,n,r=sn.allocUnsafe(t>>>0),i=this.head,o=0;i;)e=r,n=o,i.data.copy(e,n),o+=i.data.length,i=i.next;return r},t}(),Q&&Q.inspect&&Q.inspect.custom&&(on.prototype[Q.inspect.custom]=function(){var t=Q.inspect({length:this.length});return this.constructor.name+" "+t});var un={destroy:function(t,e){var n=this,r=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return r||i?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||ie.nextTick(an,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(ie.nextTick(an,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}},hn=Rt.EventEmitter,ln={},fn=tn.Buffer,cn=fn.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function dn(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(fn.isEncoding===cn||!cn(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=gn,this.end=vn,e=4;break;case"utf8":this.fillLast=yn,e=4;break;case"base64":this.text=mn,this.end=bn,e=3;break;default:return this.write=wn,void(this.end=_n)}this.lastNeed=0,this.lastTotal=0,this.lastChar=fn.allocUnsafe(e)}function pn(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function yn(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function gn(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function vn(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function mn(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function bn(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function wn(t){return t.toString(this.encoding)}function _n(t){return t&&t.length?this.write(t):""}ln.StringDecoder=dn,dn.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},dn.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};var En={};(function(t){function e(e){try{if(!t.localStorage)return!1}catch(t){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}En=function(t,n){if(e("noDeprecation"))return t;var r=!1;return function(){if(!r){if(e("throwDeprecation"))throw new Error(n);e("traceDeprecation")?console.trace(n):console.warn(n),r=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var Sn=e({}),An=Tn,xn=e({});function Tn(t){if(!(this instanceof Tn))return new Tn(t);xn.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length2&&void 0!==arguments[2]?arguments[2]:{},r=Zt(t,e,n),i=~~((n=Object.assign({},{duration:1e3,repeat:!1},n)).duration/t),o=new jn.Readable,s=0;return o._read=function(){setTimeout(function(){if(s>r.length-1)return o.push(null);o.push(r[s].toString()),s++},i)},o};var Dn={},qn=Zt;qn.event=te,qn.stream=Un,qn.uniqueList=Yt.uniqueList,Dn=Dn=qn;var Wn=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};return void 0===t.eases.list[e]&&(t.eases.list[e]=new Gn),function(){var t=document.createElement("div");return Ot(t,[arguments[0]]),t}(t.eases.list[e].render(e,n))}Kn.use(function(t,e){t.eases={list:{},event:{}}}),Kn.use(function(t,e){e.on("DOMContentLoaded",function(){})}),Kn.use(function(t,e){e.on("navigate",function(){console.log("Navigated to "+t.route)})}),Kn.route(i.getBaseRoute(),function(t,e){return function(){var t=document.createElement("body"),e=document.createElement("nav"),n=document.createElement("div");n.setAttribute("class","nav-wrapper");var r=document.createElement("div");r.setAttribute("class","center brand-logo"),Ot(r,["Easing"]);var i=document.createElement("a");i.setAttribute("href","https://github.com/rook2pawn/node-easing"),i.setAttribute("class","brand-logo right");var o=document.createElement("img");o.setAttribute("src","assets/github.png"),Ot(i,[o]),Ot(n,["\n ",r,"\n ",i,"\n "]),Ot(e,["\n ",n,"\n "]);var s=document.createElement("div");s.setAttribute("class","container row");var a=document.createElement("div");a.setAttribute("class","col s12");var u=document.createElement("span");u.setAttribute("class","flow-text"),Ot(u,["Event"]),Ot(a,[u]),Ot(s,["\n ",a,"\n ",arguments[0],"\n "]);var h=document.createElement("div");h.setAttribute("class","clear");var l=document.createElement("div");l.setAttribute("class","container row");var f=document.createElement("div");f.setAttribute("class","col s12");var c=document.createElement("span");c.setAttribute("class","flow-text"),Ot(c,["Static"]),Ot(f,[c]),Ot(l,["\n ",f,"\n ",arguments[1],"\n "]);var d=document.createElement("div");d.setAttribute("class","clear");var p=document.createElement("div");p.setAttribute("class","container row");var y=document.createElement("div");y.setAttribute("class","col s12");var g=document.createElement("span");g.setAttribute("class","flow-text"),Ot(g,["Static - End to end"]),Ot(y,[g]),Ot(p,["\n ",y,"\n\n ",arguments[2],"\n "]);var v=document.createElement("div");return v.setAttribute("class","clear"),Ot(t,["\n ",e,"\n\n ",s,"\n ",h,"\n ",l,"\n ",d,"\n ",p,"\n ",v,"\n\n "]),t}(Dn.uniqueList.map(function(e){return function(){var t=document.createElement("div");return Ot(t,[arguments[0]]),t}(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return void 0===t.eases.event[e]&&(t.eases.event[e]=new Yn),function(){var t=document.createElement("div");return Ot(t,[arguments[0]]),t}(t.eases.event[e].render(e,n))}(t,e))}),Dn.uniqueList.map(function(e){return function(){var t=document.createElement("div");return Ot(t,[arguments[0]]),t}(Xn(t,e))}),Dn.uniqueList.map(function(e){return function(){var t=document.createElement("div");return Ot(t,[arguments[0]]),t}(Xn(t,e,{endToEnd:!0}))}))}),Kn.mount("body")}(); //# sourceMappingURL=bundle.js.map