-
Notifications
You must be signed in to change notification settings - Fork 1
/
bundle.js
45 lines (33 loc) · 242 KB
/
bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),_jquery=require("jquery"),_jquery2=_interopRequireDefault(_jquery),_lodash=require("lodash.range"),_lodash2=_interopRequireDefault(_lodash),_timbreMod=require("./timbreMod.js"),_timbreMod2=_interopRequireDefault(_timbreMod),T=void 0;document.body.addEventListener("click",function(){(0,_timbreMod2.default)(),T=timbre});var colors=["#F5BF16","#5CBAEB","#FF385C","#A1EF8B","#59EAE6","#BDD4DE","#FF530D","#06D6A0"],Interval=function(){function t(e){_classCallCheck(this,t),this.container=(0,_jquery2.default)("form"),this.opts=e,this.$dots=this._generateDots(),this.counter=0,this.inter=0,this.env=T("perc",{a:50,r:2500})}return _createClass(t,[{key:"start",value:function(){var t=this,e=T("PluckGen",{env:this.env,mul:this.opts.volume});this.inter=T("interval",{interval:this.opts.interval},function(){e.noteOnWithFreq(t.opts.freq,80);var r=t.counter%t.$dots.length;t._showDot(r),t.counter++}).set({buddies:e}),this.inter.start()}},{key:"stop",value:function(){this.inter.stop()}},{key:"_generateDots",value:function(){var t=this,e=void 0,r=void 0;this.container.width()>50?(r=this.container.width()/1.6,(e=100/this.opts.numDotsForThisFreq)<2&&(e=2)):(e=100/this.opts.numDotsForThisFreq,r=this.container.width()/1.3+e,e<2&&(e=2)),console.log(e);var i=2*e,o=this.opts.levels+1,n=2*Math.PI/o,s={x:this.container.width()/2,y:this.container.height()/2},a=this.opts.numDotsForThisFreq;return a>100&&(a=100),(0,_lodash2.default)(a).map(function(o){var a={x:(r+o*i)*Math.cos(n*t.opts.id)+s.x-e/2,y:(r+o*i)*Math.sin(n*t.opts.id)+s.y-e/2},u=(0,_jquery2.default)('<div class="dot"></div>').css({top:a.y,right:a.x,width:e,height:e});return t.container.append(u),u.css({backgroundColor:colors[t.opts.id]})})}},{key:"_showDot",value:function(t){this.$dots.forEach(function(e,r,i){r<=t?e.show():e.hide()})}}]),t}();exports.default=Interval;
},{"./timbreMod.js":3,"jquery":7,"lodash.range":8}],2:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function timbrePoly(e){for(var r=[+e.A,+e.B],t=+e.levels>6?6:+e.levels,u=+e.bpm,o=[],a=60/u*1e3/Math.pow(r[0],t),i=[1,10/9,5/4,4/3,1.5,5/3,15/8].map(function(e){return 200*e}),l=t,n=0,v=void 0,p=void 0,s=void 0,_=0;_<=t;_+=1)s=Math.pow(e.B,l)*Math.pow(e.A,n),l--,n++,v=Math.pow(r[0],t-_)*Math.pow(r[1],_),p=new _interval2.default({id:_,levels:t,interval:a*v,volume:.2,freq:i[_],numDotsForThisFreq:s,maxNumDots:Math.pow(Math.max(e.A,e.B),t)}),p.start(),o.push(p);return o}Object.defineProperty(exports,"__esModule",{value:!0});var _jquery=require("jquery"),_jquery2=_interopRequireDefault(_jquery),_interval=require("./interval.js"),_interval2=_interopRequireDefault(_interval);exports.default=timbrePoly;
},{"./interval.js":1,"jquery":7}],3:[function(require,module,exports){
(function (global){
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="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};exports.default=function(){!function(t){var e=function(){return d.apply(null,arguments)},i=Array.prototype.slice,n=0,s=1,r=[8e3,11025,12e3,16e3,22050,24e3,32e3,44100,48e3],a=[32,64,128,256],o=null,h={},u={},l="undefined"!=typeof window?"browser":"undefined"!=typeof module&&module.exports?"node":"unknown",c="browser"===l&&/(iPhone|iPad|iPod|Android)/i.test(navigator.userAgent),f=!1,p=120,d=function(){var t,e,n=i.call(arguments),s=n[0];switch(void 0===s?"undefined":_typeof(s)){case"string":h[s]?t=new h[s](n.slice(1)):u[s]?t=u[s](n.slice(1)):(e=/^(.+?)(?:\.(ar|kr))?$/.exec(s))&&(s=e[1],h[s]?t=new h[s](n.slice(1)):u[s]&&(t=u[s](n.slice(1))),t&&e[2]&&t[e[2]]());break;case"number":t=new T(n);break;case"boolean":t=new I(n);break;case"function":t=new R(n);break;case"object":if(null!==s){if(s instanceof k)return s;if(s.context instanceof k)return s.context;b(s)?t=new D(n):g(s)&&(t=new O(n))}}void 0===t&&(t=new A(n.slice(1)),console.warn('T("'+s+'") is not defined.'));var r=t._;return r.originkey=s,r.meta=v(t),r.emit("init"),t},v=function(t){for(var e,i,n=t._.meta,s=t;null!==s&&s.constructor!==Object;){e=Object.getOwnPropertyNames(s);for(var r=0,a=e.length;r<a;++r)n[e[r]]||(/^(constructor$|process$|_)/.test(e[r])?n[e[r]]="ignore":(i=Object.getOwnPropertyDescriptor(s,e[r]),"function"==typeof i.value?n[e[r]]="function":(i.get||i.set)&&(n[e[r]]="property")));s=Object.getPrototypeOf(s)}return n};Object.defineProperties(e,{version:{value:"14.10.12"},envtype:{value:l},envmobile:{value:c},env:{get:function(){return o.impl.env}},samplerate:{get:function(){return o.samplerate}},channels:{get:function(){return o.channels}},cellsize:{get:function(){return o.cellsize}},currentTime:{get:function(){return o.currentTime}},isPlaying:{get:function(){return o.status===s}},isRecording:{get:function(){return 3===o.status}},amp:{set:function(t){"number"==typeof t&&(o.amp=t)},get:function(){return o.amp}},bpm:{set:function(t){"number"==typeof t&&5<=t&&t<=300&&(p=t)},get:function(){return p}}}),e.bind=function(t,i){return o.bind(t,i),e},e.setup=function(t){return o.setup(t),e},e.play=function(){return o.play(),e},e.pause=function(){return o.pause(),e},e.reset=function(){return o.reset(),o.events.emit("reset"),e},e.on=e.addListener=function(t,i){return o.on(t,i),e},e.once=function(t,i){return o.once(t,i),e},e.off=e.removeListener=function(t,i){return o.off(t,i),e},e.removeAllListeners=function(t){return o.removeAllListeners(t),e},e.listeners=function(t){return o.listeners(t)},e.rec=function(){return o.rec.apply(o,arguments)},e.timevalue=function(){var t=function(t){var e,i=p;return(e=/^bpm(\d+(?:\.\d+)?)/i.exec(t))&&(i=Math.max(5,Math.min(300,+(e[1]||0)))),i};return function(i){var n,s,r;if(n=/^(\d+(?:\.\d+)?)Hz$/i.exec(i))return 0==+n[1]?0:1e3/+n[1];if(n=/L(\d+)?(\.*)$/i.exec(i))return s=60/t(i)*(4/(n[1]||4))*1e3,s*=[1,1.5,1.75,1.875][(n[2]||"").length]||1;if(n=/^(\d+(?:\.\d+)?|\.(?:\d+))(min|sec|m)s?$/i.exec(i))switch(n[2]){case"min":return 60*+(n[1]||0)*1e3;case"sec":return 1e3*+(n[1]||0);case"m":return+(n[1]||0)}return(n=/^(?:([0-5]?[0-9]):)?(?:([0-5]?[0-9]):)(?:([0-5]?[0-9]))(?:\.([0-9]{1,3}))?$/.exec(i))?(r=3600*(n[1]||0)+60*(n[2]||0)+(n[3]||0),r=1e3*r+(0|((n[4]||"")+"00").substr(0,3))):(n=/(\d+)\.(\d+)\.(\d+)$/i.exec(i))?(r=480*(4*n[1]+ +n[2])+ +n[3],60/t(i)*(r/480)*1e3):(n=/(\d+)ticks$/i.exec(i))?60/t(i)*(n[1]/480)*1e3:(n=/^(\d+)samples(?:\/(\d+)Hz)?$/i.exec(i))?1e3*n[1]/(n[2]||e.samplerate):0}}();var m=e.fn={SignalArray:Float32Array,currentTimeIncr:0,emptycell:null,FINISHED_STATE:n,PLAYING_STATE:s,UNSCHEDULED_STATE:2,SCHEDULED_STATE:3},g=m.isArray=Array.isArray,b=m.isDictionary=function(t){return"object"===(void 0===t?"undefined":_typeof(t))&&t.constructor===Object};m.nop=function(){return this},m.isSignalArray=function(t){return t instanceof m.SignalArray||!(!Array.isArray(t)||!t.__klass||2!==t.__klass.type)},m.extend=function(t,e){function i(){this.constructor=t}e=e||k;for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},m.constructorof=function(t,e){for(var i=t&&t.prototype;i;){if(i===e.prototype)return!0;i=Object.getPrototypeOf(i)}return!1},m.register=function(t,e){m.constructorof(e,k)?h[t]=e:u[t]=e},m.alias=function(t,e){h[e]?h[t]=h[e]:u[e]&&(u[t]=u[e])},m.getClass=function(t){return h[t]},m.pointer=function(t,e,i){return e=t.byteOffset+e*t.constructor.BYTES_PER_ELEMENT,"number"==typeof i?new t.constructor(t.buffer,e,i):new t.constructor(t.buffer,e)},m.nextTick=function(t){return o.nextTick(t),e},m.fixAR=function(t){t._.ar=!0,t._.aronly=!0},m.fixKR=function(t){t._.ar=!1,t._.kronly=!0},m.changeWithValue=function(){var t=this._,e=t.value*t.mul+t.add;isNaN(e)&&(e=0);for(var i=this.cells[0],n=0,s=i.length;n<s;++n)i[n]=e},m.changeWithValue.unremovable=!0,m.clone=function(t){var e=new t.constructor([]);return e._.ar=t._.ar,e._.mul=t._.mul,e._.add=t._.add,e._.bypassed=t._.bypassed,e},m.timer=function(){var t=function(t){return function(){-1===o.timers.indexOf(t)&&(o.timers.push(t),o.events.emit("addObject"),t._.emit("start"),m.buddies_start(t))}},e=function(t){return function(){var e=o.timers.indexOf(t);-1!==e&&(o.timers.splice(e,1),t._.emit("stop"),o.events.emit("removeObject"),m.buddies_stop(t))}};return function(i){var n=t(i),s=e(i);return i.nodeType=k.TIMER,i.start=function(){return o.nextTick(n),i},i.stop=function(){return o.nextTick(s),i},i}}(),m.listener=function(){var t=function(t){return function(){-1===o.listeners.indexOf(t)&&(o.listeners.push(t),o.events.emit("addObject"),t._.emit("listen"),m.buddies_start(t))}},e=function(t){return function(){var e=o.listeners.indexOf(t);-1!==e&&(o.listeners.splice(e,1),t._.emit("unlisten"),o.events.emit("removeObject"),m.buddies_stop(t))}};return function(i){var n=t(i),s=e(i);return i.nodeType=k.LISTENER,i.listen=function(t){return arguments.length&&i.append.apply(i,arguments),i.nodes.length&&o.nextTick(n),i},i.unlisten=function(){return arguments.length&&i.remove.apply(i,arguments),i.nodes.length||o.nextTick(s),i},i}}(),m.make_onended=function(t,e){return function(){if(t.playbackState=n,"number"==typeof e)for(var i=t.cells[0],s=t.cells[1],r=t.cells[2],a=0,o=s.length;a<o;++a)i[0]=s[a]=r[a]=e;t._.emit("ended")}},m.inputSignalAR=function(t){var e,i,n,r,a,o,h=t.cells[0],u=t.cells[1],l=t.cells[2],c=t.nodes,f=c.length,p=h.length,d=t.tickID;if(2===t.numChannels){if(n=!0,0!==f){for(e=0;e<f;++e)if(c[e].playbackState===s){c[e].process(d),u.set(c[e].cells[1]),l.set(c[e].cells[2]),n=!1,++e;break}for(;e<f;++e)if(c[e].playbackState===s)for(c[e].process(d),a=c[e].cells[1],o=c[e].cells[2],i=p;i;)i-=8,u[i]+=a[i],l[i]+=o[i],u[i+1]+=a[i+1],l[i+1]+=o[i+1],u[i+2]+=a[i+2],l[i+2]+=o[i+2],u[i+3]+=a[i+3],l[i+3]+=o[i+3],u[i+4]+=a[i+4],l[i+4]+=o[i+4],u[i+5]+=a[i+5],l[i+5]+=o[i+5],u[i+6]+=a[i+6],l[i+6]+=o[i+6],u[i+7]+=a[i+7],l[i+7]+=o[i+7]}n&&(u.set(m.emptycell),l.set(m.emptycell))}else{if(n=!0,0!==f){for(e=0;e<f;++e)if(c[e].playbackState===s){c[e].process(d),h.set(c[e].cells[0]),n=!1,++e;break}for(;e<f;++e)if(c[e].playbackState===s)for(r=c[e].process(d).cells[0],i=p;i;)i-=8,h[i]+=r[i],h[i+1]+=r[i+1],h[i+2]+=r[i+2],h[i+3]+=r[i+3],h[i+4]+=r[i+4],h[i+5]+=r[i+5],h[i+6]+=r[i+6],h[i+7]+=r[i+7]}n&&h.set(m.emptycell)}},m.inputSignalKR=function(t){var e,i=t.nodes,n=i.length,r=t.tickID,a=0;for(e=0;e<n;++e)i[e].playbackState===s&&(a+=i[e].process(r).cells[0][0]);return a},m.outputSignalAR=function(t){var e,i=t.cells[0],n=t.cells[1],s=t.cells[2],r=t._.mul,a=t._.add;if(2===t.numChannels)for(e=i.length;e;)e-=8,n[e]=n[e]*r+a,s[e]=s[e]*r+a,n[e+1]=n[e+1]*r+a,s[e+1]=s[e+1]*r+a,n[e+2]=n[e+2]*r+a,s[e+2]=s[e+2]*r+a,n[e+3]=n[e+3]*r+a,s[e+3]=s[e+3]*r+a,n[e+4]=n[e+4]*r+a,s[e+4]=s[e+4]*r+a,n[e+5]=n[e+5]*r+a,s[e+5]=s[e+5]*r+a,n[e+6]=n[e+6]*r+a,s[e+6]=s[e+6]*r+a,n[e+7]=n[e+7]*r+a,s[e+7]=s[e+7]*r+a,i[e]=.5*(n[e]+s[e]),i[e+1]=.5*(n[e+1]+s[e+1]),i[e+2]=.5*(n[e+2]+s[e+2]),i[e+3]=.5*(n[e+3]+s[e+3]),i[e+4]=.5*(n[e+4]+s[e+4]),i[e+5]=.5*(n[e+5]+s[e+5]),i[e+6]=.5*(n[e+6]+s[e+6]),i[e+7]=.5*(n[e+7]+s[e+7]);else if(1!==r||0!==a)for(e=i.length;e;)e-=8,i[e]=i[e]*r+a,i[e+1]=i[e+1]*r+a,i[e+2]=i[e+2]*r+a,i[e+3]=i[e+3]*r+a,i[e+4]=i[e+4]*r+a,i[e+5]=i[e+5]*r+a,i[e+6]=i[e+6]*r+a,i[e+7]=i[e+7]*r+a},m.outputSignalKR=function(t){var e,i=t.cells[0],n=t.cells[1],s=t.cells[2],r=t._.mul,a=t._.add,o=i[0]*r+a;if(2===t.numChannels)for(e=i.length;e;)e-=8,i[e]=i[e+1]=i[e+2]=i[e+3]=i[e+4]=i[e+5]=i[e+6]=i[e+7]=n[e]=n[e+1]=n[e+2]=n[e+3]=n[e+4]=n[e+5]=n[e+6]=n[e+7]=s[e]=s[e+1]=s[e+2]=s[e+3]=s[e+4]=s[e+5]=s[e+6]=s[e+7]=o;else for(e=i.length;e;)e-=8,i[e]=i[e+1]=i[e+2]=i[e+3]=i[e+4]=i[e+5]=i[e+6]=i[e+7]=o},m.buddies_start=function(t){var e,i,n,s=t._.buddies;for(i=0,n=s.length;i<n;++i)switch(e=s[i],e.nodeType){case k.DSP:e.play();break;case k.TIMER:e.start();break;case k.LISTENER:e.listen()}},m.buddies_stop=function(t){var e,i,n,s=t._.buddies;for(i=0,n=s.length;i<n;++i)switch(e=s[i],e.nodeType){case k.DSP:e.pause();break;case k.TIMER:e.stop();break;case k.LISTENER:e.unlisten()}},m.fix_iOS6_1_problem=function(t){o.fix_iOS6_1_problem(t)};var _,y=e.modules={},w=y.EventEmitter=function(){function t(t){this.context=t,this.events={}}var e=t.prototype;return e.emit=function(t){var e=this.events[t];if(!e)return!1;var n;if("function"==typeof e){switch(arguments.length){case 1:e.call(this.context);break;case 2:e.call(this.context,arguments[1]);break;case 3:e.call(this.context,arguments[1],arguments[2]);break;default:n=i.call(arguments,1),e.apply(this.context,n)}return!0}if(g(e)){n=i.call(arguments,1);for(var s=e.slice(),r=0,a=s.length;r<a;++r)s[r]instanceof k?s[r].bang.apply(s[r],n):s[r].apply(this.context,n);return!0}if(!(e instanceof k))return!1;n=i.call(arguments,1),e.bang.apply(e,n)},e.on=function(t,e){if("function"!=typeof e&&!(e instanceof k))throw new Error("addListener takes instances of Function or timbre.Object");var i=this.events;return i[t]?g(i[t])?i[t].push(e):i[t]=[i[t],e]:i[t]=e,this},e.once=function(t,e){var i,n=this;if("function"==typeof e)i=function(){n.off(t,i),e.apply(n.context,arguments)};else{if(!(e instanceof k))throw new Error("once takes instances of Function or timbre.Object");i=function(){n.off(t,i),e.bang.apply(e,arguments)}}return i.listener=e,n.on(t,i),this},e.off=function(t,e){if("function"!=typeof e&&!(e instanceof k))throw new Error("removeListener takes instances of Function or timbre.Object");var i=this.events;if(!i[t])return this;var n=i[t];if(g(n)){for(var s=-1,r=0,a=n.length;r<a;++r)if(n[r]===e||n[r].listener&&n[r].listener===e){s=r;break}if(s<0)return this;n.splice(s,1),0===n.length&&(i[t]=null)}else(n===e||n.listener&&n.listener===e)&&(i[t]=null);return this},e.removeAllListeners=function(t){var e=this.events,i=!1,n=e[t];if(g(n))for(var s=n.length;s--;){var r=n[s];r.unremovable?i=!0:this.off(t,r)}else n&&(n.unremovable?i=!0:this.off(t,n));return i||(e[t]=null),this},e.listeners=function(t){var e,i=this.events;if(!i[t])return[];if(i=i[t],!g(i))return i.unremovable?[]:[i];i=i.slice(),e=[];for(var n=0,s=i.length;n<s;++n)i[n].unremovable||e.push(i[n]);return e},t}(),x=y.Deferred=function(){function t(t){this.context=t||this,this._state="pending",this._doneList=[],this._failList=[],this._promise=new e(this)}function e(t){this.context=t.context,this.then=t.then,this.done=function(){return t.done.apply(t,arguments),this},this.fail=function(){return t.fail.apply(t,arguments),this},this.pipe=function(){return t.pipe.apply(t,arguments)},this.always=function(){return t.always.apply(t,arguments),this},this.promise=function(){return this},this.isResolved=function(){return t.isResolved()},this.isRejected=function(){return t.isRejected()}}var n=t.prototype,s=function(t,e,i,n){if("pending"===this._state){this._state=t;for(var s=0,r=e.length;s<r;++s)e[s].apply(i,n);this._doneList=this._failList=null}},r=function(t){return t&&"function"==typeof t.promise};return n.resolve=function(){var t=i.call(arguments,0);return s.call(this,"resolved",this._doneList,this.context||this,t),this},n.resolveWith=function(t){var e=i.call(arguments,1);return s.call(this,"resolved",this._doneList,t,e),this},n.reject=function(){var t=i.call(arguments,0);return s.call(this,"rejected",this._failList,this.context||this,t),this},n.rejectWith=function(t){var e=i.call(arguments,1);return s.call(this,"rejected",this._failList,t,e),this},n.promise=function(){return this._promise},n.done=function(){for(var t=i.call(arguments),e="resolved"===this._state,n="pending"===this._state,s=this._doneList,r=0,a=t.length;r<a;++r)"function"==typeof t[r]&&(e?t[r]():n&&s.push(t[r]));return this},n.fail=function(){for(var t=i.call(arguments),e="rejected"===this._state,n="pending"===this._state,s=this._failList,r=0,a=t.length;r<a;++r)"function"==typeof t[r]&&(e?t[r]():n&&s.push(t[r]));return this},n.always=function(){return this.done.apply(this,arguments),this.fail.apply(this,arguments),this},n.then=function(t,e){return this.done(t).fail(e)},n.pipe=function(e,n){var s=this,a=new t(this.context);return this.done(function(){var t=e.apply(s.context,arguments);r(t)?t.then(function(){var e=i.call(arguments);a.resolveWith.apply(a,[t].concat(e))}):a.resolveWith(s,t)}),this.fail(function(){if("function"==typeof n){var t=n.apply(s.context,arguments);r(t)&&t.fail(function(){var e=i.call(arguments);a.rejectWith.apply(a,[t].concat(e))})}else a.reject.apply(a,arguments)}),a.promise()},n.isResolved=function(){return"resolved"===this._state},n.isRejected=function(){return"rejected"===this._state},n.state=function(){return this._state},t.when=function(e){var n=0,s=i.call(arguments),a=s.length,o=a;1!==a||r(e)||(o=0);var h=1===o?e:new t;if(a>1)for(var u=new Array(a),l=function(){h.reject()};n<a;++n)s[n]&&r(s[n])?s[n].promise().done(function(t,e){return function(n){e[t]=arguments.length>1?i.call(arguments):n,--o||h.resolve.apply(h,e)}}(n,u)).fail(l):(u[n]=s[n],--o);return o||h.resolve.apply(h,s),h.promise()},t}(),k=e.Object=function(){function t(i,n){this._={};var r=this._.events=new w(this);if(this._.emit=function(){return r.emit.apply(r,arguments)},b(n[0])){var a=n.shift(),h=a.in;this.once("init",function(){this.set(a),h&&(g(h)?this.append.apply(this,h):h instanceof t&&this.append(h))})}switch(this.tickID=-1,this.nodes=n.map(e),this.cells=[],this.numChannels=i,i){case 0:this.L=this.R=new S(null),this.cells[0]=this.cells[1]=this.cells[2]=this.L.cell;break;case 1:this.L=this.R=new S(this),this.cells[0]=this.cells[1]=this.cells[2]=this.L.cell;break;case 2:this.L=new S(this),this.R=new S(this),this.cells[0]=new m.SignalArray(o.cellsize),this.cells[1]=this.L.cell,this.cells[2]=this.R.cell}this.playbackState=s,this.nodeType=t.DSP,this._.ar=!0,this._.mul=1,this._.add=0,this._.dac=null,this._.bypassed=!1,this._.meta={},this._.samplerate=o.samplerate,this._.cellsize=o.cellsize,this._.buddies=[]}t.DSP=1,t.TIMER=2,t.LISTENER=3;var n=t.prototype;return Object.defineProperties(n,{isAr:{get:function(){return this._.ar}},isKr:{get:function(){return!this._.ar}},isBypassed:{get:function(){return this._.bypassed}},isEnded:{get:function(){return!(1&this.playbackState)}},mul:{set:function(t){"number"==typeof t&&(this._.mul=t,this._.emit("setMul",t))},get:function(){return this._.mul}},add:{set:function(t){"number"==typeof t&&(this._.add=t,this._.emit("setAdd",t))},get:function(){return this._.add}},buddies:{set:function(e){g(e)||(e=[e]),this._.buddies=e.filter(function(e){return e instanceof t})},get:function(){return this._.buddies}}}),n.toString=function(){return this.constructor.name},n.valueOf=function(){return o.tickID!==this.tickID&&this.process(o.tickID),this.cells[0][0]},n.append=function(){if(arguments.length>0){var t=i.call(arguments).map(e);this.nodes=this.nodes.concat(t),this._.emit("append",t)}return this},n.appendTo=function(t){return t.append(this),this},n.remove=function(){if(arguments.length>0){for(var t,e=this.nodes,i=[],n=0,s=arguments.length;n<s;++n)-1!==(t=e.indexOf(arguments[n]))&&(i.push(e[t]),e.splice(t,1));i.length>0&&this._.emit("remove",i)}return this},n.removeFrom=function(t){return t.remove(this),this},n.removeAll=function(){var t=this.nodes.slice();return this.nodes=[],t.length>0&&this._.emit("remove",t),this},n.removeAtIndex=function(t){var e=this.nodes[t];return e&&(this.nodes.splice(t,1),this._.emit("remove",[e])),this},n.postMessage=function(t){return this._.emit("message",t),this},n.to=function(e){if(e instanceof t)e.append(this);else{var n=i.call(arguments);b(n[1])?n.splice(2,0,this):n.splice(1,0,this),e=d.apply(null,n)}return e},n.splice=function(e,i,n){var s;return i?i instanceof t&&(s=i.nodes.indexOf(n),-1!==s&&i.nodes.splice(s,1),e instanceof t?(e.nodes.push(this),i.nodes.push(e)):i.nodes.push(this)):this._.dac&&(e instanceof t?n instanceof t?n._.dac&&(n._.dac._.node=e,e._.dac=n._.dac,n._.dac=null,e.nodes.push(this)):this._.dac&&(this._.dac._.node=e,e._.dac=this._.dac,this._.dac=null,e.nodes.push(this)):n instanceof t&&n._.dac&&(n._.dac._.node=this,this._.dac=n._.dac,n._.dac=null)),this},n.on=n.addListener=function(t,e){return this._.events.on(t,e),this},n.once=function(t,e){return this._.events.once(t,e),this},n.off=n.removeListener=function(t,e){return this._.events.off(t,e),this},n.removeAllListeners=function(t){return this._.events.removeAllListeners(t),this},n.listeners=function(t){return this._.events.listeners(t)},n.set=function(t,e){var i,n,s=this._.meta;switch(void 0===t?"undefined":_typeof(t)){case"string":switch(s[t]){case"property":this[t]=e;break;case"function":this[t](e);break;default:for(i=this;null!==i;)n=Object.getOwnPropertyDescriptor(i,t),n&&("function"==typeof n.value?(s[t]="function",this[t](e)):(n.get||n.set)&&(s[t]="property",this[t]=e)),i=Object.getPrototypeOf(i)}break;case"object":for(i in t)this.set(i,t[i])}return this},n.get=function(t){if("property"===this._.meta[t])return this[t]},n.bang=function(){return this._.emit.apply(this,["bang"].concat(i.call(arguments))),this},n.process=m.nop,n.bypass=function(){return this._.bypassed=0===arguments.length||!!arguments[0],this},n.play=function(){var t=this._.dac;return null===t&&(t=this._.dac=new M(this)),t.play()&&this._.emit.apply(this,["play"].concat(i.call(arguments))),m.buddies_start(this),this},n.pause=function(){var t=this._.dac;return t&&t.playbackState===s&&(t.pause(),this._.dac=null,this._.emit("pause")),m.buddies_stop(this),this},n.start=n.stop=n.listen=n.unlisten=function(){return this},n.ar=function(){return 0===arguments.length||arguments[0]?this._.kronly||(this._.ar=!0,this._.emit("ar",!0)):this.kr(!0),this},n.kr=function(){return 0===arguments.length||arguments[0]?this._.aronly||(this._.ar=!1,this._.emit("ar",!1)):this.ar(!0),this},n.plot="browser"===l?function(t){var e=this._,i=t.target;if(!i)return this;var n,s=t.width||i.width||320,r=t.height||i.height||240,a=(t.x||0)+.5,o=t.y||0,h=i.getContext("2d");n=void 0!==t.foreground?t.foreground:e.plotForeground||"rgb( 0, 128, 255)";var u;u=void 0!==t.background?t.background:e.plotBackground||"rgb(255, 255, 255)";var l,c,f,p,d,v=t.lineWidth||e.plotLineWidth||1,m=!!e.plotCyclic,g=e.plotData||this.cells[0],b=t.range||e.plotRange||[-1.2,1.2],_=b[0],y=r/(b[1]-_),w=s/g.length,x=g.length;if(h.save(),h.rect(a,o,s,r),null!==u&&(h.fillStyle=u,h.fillRect(a,o,s,r)),e.plotBefore&&e.plotBefore.call(this,h,a,o,s,r),e.plotBarStyle)for(h.fillStyle=n,l=0,d=0;d<x;++d)f=(g[d]-_)*y,c=r-f,h.fillRect(l+a,c+o,w,f),l+=w;else{for(h.strokeStyle=n,h.lineWidth=v,h.beginPath(),l=0,p=r-(g[0]-_)*y,h.moveTo(l+a,p+o),d=1;d<x;++d)l+=w,c=r-(g[d]-_)*y,h.lineTo(l+a,c+o);m?h.lineTo(l+w+a,p+o):h.lineTo(l+w+a,c+o),h.stroke()}e.plotAfter&&e.plotAfter.call(this,h,a,o,s,r);var k=t.border||e.plotBorder;return k&&(h.strokeStyle="string"==typeof k?k:"#000",h.lineWidth=1,h.strokeRect(a,o,s,r)),h.restore(),this}:m.nop,t}(),S=e.ChannelObject=function(){function t(t){e.Object.call(this,-1,[]),m.fixAR(this),this._.parent=t,this.cell=new m.SignalArray(o.cellsize),this.L=this.R=this,this.cells[0]=this.cells[1]=this.cells[2]=this.cell,this.numChannels=1}return m.extend(t),t.prototype.process=function(t){return this.tickID!==t&&(this.tickID=t,this._.parent&&this._.parent.process(t)),this},t}(),A=function(){function t(t){k.call(this,2,t)}return m.extend(t),t.prototype.process=function(t){var e=this._;return this.tickID!==t&&(this.tickID=t,e.ar?(m.inputSignalAR(this),m.outputSignalAR(this)):(this.cells[0][0]=m.inputSignalKR(this),m.outputSignalKR(this))),this},m.register("+",t),t}(),T=function(){function t(t){if(k.call(this,1,[]),m.fixKR(this),this.value=t[0],b(t[1])){var e=t[1];this.once("init",function(){this.set(e)})}this.on("setAdd",m.changeWithValue),this.on("setMul",m.changeWithValue)}m.extend(t);var e=t.prototype;return Object.defineProperties(e,{value:{set:function(t){"number"==typeof t&&(this._.value=isNaN(t)?0:t,m.changeWithValue.call(this))},get:function(){return this._.value}}}),t}(),I=function(){function t(t){if(k.call(this,1,[]),m.fixKR(this),this.value=t[0],b(t[1])){var e=t[1];this.once("init",function(){this.set(e)})}this.on("setAdd",m.changeWithValue),this.on("setMul",m.changeWithValue)}m.extend(t);var e=t.prototype;return Object.defineProperties(e,{value:{set:function(t){this._.value=t?1:0,m.changeWithValue.call(this)},get:function(){return!!this._.value}}}),t}(),R=function(){function t(t){if(k.call(this,1,[]),m.fixKR(this),this.func=t[0],this._.value=0,b(t[1])){var e=t[1];this.once("init",function(){this.set(e)})}this.on("setAdd",m.changeWithValue),this.on("setMul",m.changeWithValue)}m.extend(t);var e=t.prototype;return Object.defineProperties(e,{func:{set:function(t){"function"==typeof t&&(this._.func=t)},get:function(){return this._.func}},args:{set:function(t){g(t)?this._.args=t:this._.args=[t]},get:function(){return this._.args}}}),e.bang=function(){var t=this._,e=i.call(arguments).concat(t.args),n=t.func.apply(this,e);return"number"==typeof n&&(t.value=n,m.changeWithValue.call(this)),this._.emit("bang"),this},t}(),O=function(){function t(t){k.call(this,1,[]);var e,i;for(e=0,i=t[0].length;e<i;++e)this.append(t[0][e]);if(b(t[1])){var n=t[1];this.once("init",function(){this.set(n)})}}m.extend(t);var e=t.prototype;return Object.defineProperties(e,{}),e.bang=function(){var t,e,n=["bang"].concat(i.call(arguments)),s=this.nodes;for(t=0,e=s.length;t<e;++t)s[t].bang.apply(s[t],n);return this},e.postMessage=function(t){var e,i,n=this.nodes;for(e=0,i=n.length;e<i;++e)n[e].postMessage(t);return this},e.process=function(t){var e=this._;return this.tickID!==t&&(this.tickID=t,e.ar?(m.inputSignalAR(this),m.outputSignalAR(this)):(this.cells[0][0]=m.inputSignalKR(this),m.outputSignalKR(this))),this},t}(),D=function(){function t(t){if(k.call(this,1,[]),m.fixKR(this),b(t[1])){var e=t[1];this.once("init",function(){this.set(e)})}}m.extend(t);var e=t.prototype;return Object.defineProperties(e,{}),t}(),M=function(){function t(t){k.call(this,2,[]),this.playbackState=n;var s=this._;s.node=t,s.onplay=e(this),s.onpause=i(this)}m.extend(t);var e=function(t){return function(){-1===o.inlets.indexOf(t)&&(o.inlets.push(t),o.events.emit("addObject"),t.playbackState=s,t._.emit("play"))}},i=function(t){return function(){var e=o.inlets.indexOf(t);-1!==e&&(o.inlets.splice(e,1),t.playbackState=n,t._.emit("pause"),o.events.emit("removeObject"))}},r=t.prototype;return r.play=function(){return o.nextTick(this._.onplay),-1===o.inlets.indexOf(this)},r.pause=function(){o.nextTick(this._.onpause)},r.process=function(t){var e=this._.node;1&e.playbackState?(e.process(t),this.cells[1].set(e.cells[1]),this.cells[2].set(e.cells[2])):(this.cells[1].set(m.emptycell),this.cells[2].set(m.emptycell))},t}(),L=function(){function t(){this.context=this,this.tickID=0,this.impl=null,this.amp=.8,this.status=n,this.samplerate=44100,this.channels=2,this.cellsize=64,this.streammsec=20,this.streamsize=0,this.currentTime=0,this.nextTicks=[],this.inlets=[],this.timers=[],this.listeners=[],this.deferred=null,this.recStart=0,this.recBuffers=null,this.delayProcess=e(this),this.events=null,m.currentTimeIncr=1e3*this.cellsize/this.samplerate,m.emptycell=new m.SignalArray(this.cellsize),this.reset(!0)}var e=function(t){return function(){t.recStart=Date.now(),t.process()}},o=t.prototype;o.bind=function(t,e){if("function"==typeof t){var i=new t(this,e);this.impl=i,this.impl.defaultSamplerate&&(this.samplerate=this.impl.defaultSamplerate)}return this},o.setup=function(t){return"object"===(void 0===t?"undefined":_typeof(t))&&(-1!==r.indexOf(t.samplerate)&&(t.samplerate<=this.impl.maxSamplerate?this.samplerate=t.samplerate:this.samplerate=this.impl.maxSamplerate),-1!==a.indexOf(t.cellsize)&&(this.cellsize=t.cellsize),"undefined"!=typeof Float64Array&&void 0!==t.f64&&(f=!!t.f64,m.SignalArray=f?Float64Array:Float32Array)),m.currentTimeIncr=1e3*this.cellsize/this.samplerate,m.emptycell=new m.SignalArray(this.cellsize),this},o.getAdjustSamples=function(t){var e,i;return t=t||this.samplerate,e=this.streammsec/1e3*t,i=Math.ceil(Math.log(e)*Math.LOG2E),1<<(i=i<8?8:i>14?14:i)},o.play=function(){return this.status===n&&(this.status=s,this.streamsize=this.getAdjustSamples(),this.strmL=new m.SignalArray(this.streamsize),this.strmR=new m.SignalArray(this.streamsize),this.impl.play(),this.events.emit("play")),this},o.pause=function(){return this.status===s&&(this.status=n,this.impl.pause(),this.events.emit("pause")),this},o.reset=function(t){return t&&(this.events=new w(this).on("addObject",function(){this.status===n&&this.play()}).on("removeObject",function(){this.status===s&&this.inlets.length+this.timers.length+this.listeners.length===0&&this.pause()})),this.currentTime=0,this.nextTicks=[],this.inlets=[],this.timers=[],this.listeners=[],this},o.process=function(){var t,e,i,n,s,r,a,o,h=this.tickID,u=this.strmL,l=this.strmR,c=this.amp,f=this.streamsize,p=0,d=this.cellsize,v=this.streamsize/this.cellsize,g=this.timers,b=this.inlets,_=this.listeners,y=m.currentTimeIncr;for(n=0;n<f;++n)u[n]=l[n]=0;for(;v--;){for(++h,s=0,r=g.length;s<r;++s)1&g[s].playbackState&&g[s].process(h);for(s=0,r=b.length;s<r;++s)if(t=b[s],t.process(h),1&t.playbackState)for(e=t.cells[1],i=t.cells[2],a=0,n=p;a<d;++a,++n)u[n]+=e[a],l[n]+=i[a];for(p+=d,s=0,r=_.length;s<r;++s)1&_[s].playbackState&&_[s].process(h);for(this.currentTime+=y,o=this.nextTicks.splice(0),s=0,r=o.length;s<r;++s)o[s]()}for(n=0;n<f;++n)t=u[n]*c,t<-1?t=-1:t>1&&(t=1),u[n]=t,t=l[n]*c,t<-1?t=-1:t>1&&(t=1),l[n]=t;this.tickID=h;var w=this.currentTime;if(3===this.status){if(2===this.recCh)this.recBuffers.push(new m.SignalArray(u)),this.recBuffers.push(new m.SignalArray(l));else{var x=new m.SignalArray(u.length);for(n=0,f=x.length;n<f;++n)x[n]=.5*(u[n]+l[n]);this.recBuffers.push(x)}if(w>=this.maxDuration)this.deferred.sub.reject();else if(w>=this.recDuration)this.deferred.sub.resolve();else{var k=Date.now();k-this.recStart>20?setTimeout(this.delayProcess,10):this.process()}}},o.nextTick=function(t){this.status===n?t():this.nextTicks.push(t)},o.rec=function(){m.fix_iOS6_1_problem(!0);var t=new x(this);if(this.deferred)return console.warn("rec deferred is exists??"),t.reject().promise();if(this.status!==n)return console.log("status is not none",this.status),t.reject().promise();var e=0,s=arguments,r=b(s[e])?s[e++]:{},a=s[e];if("function"!=typeof a)return console.warn("no function"),t.reject().promise();this.deferred=t,this.status=3,this.reset();var o=new d("+"),u=new x(this),l={done:function(){u.resolve.apply(u,i.call(arguments))},send:function(){o.append.apply(o,arguments)}},c=this;return u.then(h,function(){m.fix_iOS6_1_problem(!1),h.call(c,!0)}),this.deferred.sub=u,this.savedSamplerate=this.samplerate,this.samplerate=r.samplerate||this.samplerate,this.recDuration=r.recDuration||1/0,this.maxDuration=r.maxDuration||6e5,this.recCh=r.ch||1,2!==this.recCh&&(this.recCh=1),this.recBuffers=[],this.streamsize=this.getAdjustSamples(),this.strmL=new m.SignalArray(this.streamsize),this.strmR=new m.SignalArray(this.streamsize),this.inlets.push(o),a(l),setTimeout(this.delayProcess,10),t.promise()};var h=function(){this.status=n,this.reset();var t,e=this.recBuffers,i=this.samplerate,s=this.streamsize;this.samplerate=this.savedSamplerate,t=this.recDuration!==1/0?this.recDuration*i*.001|0:(e.length>>this.recCh-1)*s;var r,a,o=t/s|0,h=0,u=0,l=t;if(2===this.recCh){var c=new m.SignalArray(t),f=new m.SignalArray(t),p=new m.SignalArray(t);for(a=0;a<o;++a)if(c.set(e[h++],u),f.set(e[h++],u),u+=s,(l-=s)>0&&l<s){c.set(e[h++].subarray(0,l),u),f.set(e[h++].subarray(0,l),u);break}for(a=0,o=t;a<o;++a)p[a]=.5*(c[a]+f[a]);r={samplerate:i,channels:2,buffer:[p,c,f]}}else{var d=new m.SignalArray(t);for(a=0;a<o;++a)if(d.set(e[h++],u),u+=s,(l-=s)>0&&l<s){d.set(e[h++].subarray(0,l),u);break}r={samplerate:i,channels:1,buffer:[d]}}var v=[].concat.apply([r],arguments);this.deferred.resolve.apply(this.deferred,v),this.deferred=null};return o.on=function(t,e){this.events.on(t,e)},o.once=function(t,e){this.events.once(t,e)},o.off=function(t,e){this.events.off(t,e)},o.removeAllListeners=function(t){this.events.removeListeners(t)},o.listeners=function(t){return this.events.listeners(t)},o.fix_iOS6_1_problem=function(t){this.impl.fix_iOS6_1_problem&&this.impl.fix_iOS6_1_problem(t)},t}(),j=null;"undefined"!=typeof window&&(_=window.AudioContext||window.webkitAudioContext),j=void 0!==_?function(t){var e,i,n=new _;m._audioContext=n,this.maxSamplerate=n.sampleRate,this.defaultSamplerate=n.sampleRate,this.env="webkit";var s=navigator.userAgent;if(s.match(/linux/i)?t.streammsec*=8:s.match(/win(dows)?\s*(nt 5\.1|xp)/i)&&(t.streammsec*=4),this.play=function(){var s,r,a,o=t.getAdjustSamples(n.sampleRate),h=t.streamsize;t.samplerate===n.sampleRate?s=function(e){var i=e.outputBuffer;t.process(),i.getChannelData(0).set(t.strmL),i.getChannelData(1).set(t.strmR)}:2*t.samplerate===n.sampleRate?s=function(e){var i,n,s=t.strmL,r=t.strmR,a=e.outputBuffer,o=a.getChannelData(0),h=a.getChannelData(1),u=a.length;for(t.process(),i=n=0;i<u;i+=2,++n)o[i]=o[i+1]=s[n],h[i]=h[i+1]=r[n]}:(r=h,a=t.samplerate/n.sampleRate,s=function(e){var i,n=t.strmL,s=t.strmR,o=e.outputBuffer,u=o.getChannelData(0),l=o.getChannelData(1),c=o.length;for(i=0;i<c;++i)r>=h&&(t.process(),r-=h),u[i]=n[0|r],l[i]=s[0|r],r+=a}),e=n.createBufferSource(),i=n.createScriptProcessor(o,2,t.channels),i.onaudioprocess=s,e.noteOn&&e.noteOn(0),e.connect(i),i.connect(n.destination)},this.pause=function(){e.disconnect(),i.disconnect()},c){var r=0,a=n.createBufferSource();this.fix_iOS6_1_problem=function(t){r+=t?1:-1,1===r?(a.noteOn(0),a.connect(n.destination)):0===r&&a.disconnect()}}}:function(t){this.maxSamplerate=48e3,this.defaultSamplerate=44100,this.env="nop",this.play=function(){},this.pause=function(){}},o=(new L).bind(j);var P=e;"node"===l||"undefined"!=typeof module&&module.exports?module.exports=global.timbre=P:"browser"===l&&(P.noConflict=function(){var t=window.timbre,e=window.T;return function(i){return window.T===P&&(window.T=e),i&&window.timbre===P&&(window.timbre=t),P}}(),window.timbre=window.T=P),function(){if("nop"===o.impl.env&&"browser"===l&&!c){var t=navigator;if(!(function(e){try{return t.plugins&&t.mimeTypes&&t.mimeTypes.length?t.plugins["Shockwave Flash"].description.match(/([0-9]+)/)[e]:new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").match(/([0-9]+)/)[e]}catch(t){return-1}}(0)<10)){var e,i=function(){var t=document.getElementsByTagName("script");if(t&&t.length)for(var e,i=0,n=t.length;i<n;++i)if(e=/^(.*\/)timbre(?:\.dev)?\.js$/i.exec(t[i].src))return e[1]+"timbre.swf"}();window.timbrejs_flashfallback_init=function(){function t(t){var n=0;this.maxSamplerate=44100,this.defaultSamplerate=44100,this.env="flash",this.play=function(){var s,r=new Array(t.streamsize*t.channels),a=t.streammsec,o=0,h=t.streamsize/t.samplerate*1e3,u=Date.now();s=function(){if(!(o>Date.now()-u)){var i=t.strmL,n=t.strmR,s=r.length,a=i.length;for(t.process();a--;)r[--s]=32768*n[a]|0,
r[--s]=32768*i[a]|0;e.writeAudio(r.join(" ")),o+=h}},e.setup?(e.setup(t.channels,t.samplerate),n=setInterval(s,a)):console.warn("Cannot find "+i)},this.pause=function(){0!==n&&(e.cancel(),clearInterval(n),n=0)}}o.bind(t),delete window.timbrejs_flashfallback_init};var n,s,r=i,a=r+"?"+ +new Date,h="TimbreFlashPlayer",u=document.createElement("div");u.id="TimbreFlashPlayerDiv",u.style.display="inline",u.width=u.height=1,t.plugins&&t.mimeTypes&&t.mimeTypes.length?(n=document.createElement("object"),n.id=h,n.classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",n.width=n.height=1,n.setAttribute("data",a),n.setAttribute("type","application/x-shockwave-flash"),s=document.createElement("param"),s.setAttribute("name","allowScriptAccess"),s.setAttribute("value","always"),n.appendChild(s),u.appendChild(n)):u.innerHTML='<object id="'+h+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1" height="1"><param name="movie" value="'+a+'" /><param name="bgcolor" value="#FFFFFF" /><param name="quality" value="high" /><param name="allowScriptAccess" value="always" /></object>',window.addEventListener("load",function(){document.body.appendChild(u),e=document[h]})}}}()}(),function(t){function e(t){this.samplerate=t,this.frequency=340,this.Q=1,this.gain=0,this.x1L=this.x2L=this.y1L=this.y2L=0,this.x1R=this.x2R=this.y1R=this.y2R=0,this.b0=this.b1=this.b2=this.a1=this.a2=0,this.setType("lpf")}var i=e.prototype;i.process=function(t,e){var i,n,s,r,a,o,h=this.x1L,u=this.x2L,l=this.y1L,c=this.y2L,f=this.x1R,p=this.x2R,d=this.y1R,v=this.y2R,m=this.b0,g=this.b1,b=this.b2,_=this.a1,y=this.a2;for(a=0,o=t.length;a<o;++a)i=t[a],s=m*i+g*h+b*u-_*l-y*c,u=h,h=i,c=l,l=s,n=e[a],r=m*n+g*f+b*p-_*d-y*v,p=f,f=n,v=d,d=r,t[a]=s,e[a]=r;this.x1L=h,this.x2L=u,this.y1L=l,this.y2L=c,this.x1R=f,this.x2R=p,this.y1R=d,this.y2R=v},i.setType=function(t){var e;(e=n[t])&&(this.type=t,e.call(this,this.frequency,this.Q,this.gain))},i.setParams=function(t,e,i){this.frequency=t,this.Q=e,this.gain=i;var s=n[this.type];return s&&s.call(this,t,e,i),this};var n={lowpass:function(t,e){if((t/=.5*this.samplerate)>=1)this.b0=1,this.b1=this.b2=this.a1=this.a2=0;else if(t<=0)this.b0=this.b1=this.b2=this.a1=this.a2=0;else{e=e<0?0:e;var i=Math.pow(10,.05*e),n=Math.sqrt(.5*(4-Math.sqrt(16-16/(i*i)))),s=Math.PI*t,r=.5*n*Math.sin(s),a=.5*(1-r)/(1+r),o=(.5+a)*Math.cos(s),h=.25*(.5+a-o);this.b0=2*h,this.b1=4*h,this.b2=this.b0,this.a1=2*-o,this.a2=2*a}},highpass:function(t,e){if((t/=.5*this.samplerate)>=1)this.b0=this.b1=this.b2=this.a1=this.a2=0;else if(t<=0)this.b0=1,this.b1=this.b2=this.a1=this.a2=0;else{e=e<0?0:e;var i=Math.pow(10,.05*e),n=Math.sqrt((4-Math.sqrt(16-16/(i*i)))/2),s=Math.PI*t,r=.5*n*Math.sin(s),a=.5*(1-r)/(1+r),o=(.5+a)*Math.cos(s),h=.25*(.5+a+o);this.b0=2*h,this.b1=-4*h,this.b2=this.b0,this.a1=2*-o,this.a2=2*a}},bandpass:function(t,e){if((t/=.5*this.samplerate)>0&&t<1)if(e>0){var i=Math.PI*t,n=Math.sin(i)/(2*e),s=Math.cos(i),r=1/(1+n);this.b0=n*r,this.b1=0,this.b2=-n*r,this.a1=-2*s*r,this.a2=(1-n)*r}else this.b0=this.b1=this.b2=this.a1=this.a2=0;else this.b0=this.b1=this.b2=this.a1=this.a2=0},lowshelf:function(t,e,i){t/=.5*this.samplerate;var n=Math.pow(10,i/40);if(t>=1)this.b0=n*n,this.b1=this.b2=this.a1=this.a2=0;else if(t<=0)this.b0=1,this.b1=this.b2=this.a1=this.a2=0;else{var s=Math.PI*t,r=.5*Math.sin(s)*Math.sqrt(0*(n+1/n)+2),a=Math.cos(s),o=2*Math.sqrt(n)*r,h=n+1,u=n-1,l=1/(h+u*a+o);this.b0=n*(h-u*a+o)*l,this.b1=2*n*(u-h*a)*l,this.b2=n*(h-u*a-o)*l,this.a1=-2*(u+h*a)*l,this.a2=(h+u*a-o)*l}},highshelf:function(t,e,i){t/=.5*this.samplerate;var n=Math.pow(10,i/40);if(t>=1)this.b0=1,this.b1=this.b2=this.a1=this.a2=0;else if(t<=0)this.b0=n*n,this.b1=this.b2=this.a1=this.a2=0;else{var s=Math.PI*t,r=.5*Math.sin(s)*Math.sqrt(0*(n+1/n)+2),a=Math.cos(s),o=2*Math.sqrt(n)*r,h=n+1,u=n-1,l=1/(h-u*a+o);this.b0=n*(h+u*a+o)*l,this.b1=-2*n*(u+h*a)*l,this.b2=n*(h+u*a-o)*l,this.a1=2*(u-h*a)*l,this.a2=(h-u*a-o)*l}},peaking:function(t,e,i){if((t/=.5*this.samplerate)>0&&t<1){var n=Math.pow(10,i/40);if(e>0){var s=Math.PI*t,r=Math.sin(s)/(2*e),a=Math.cos(s),o=1/(1+r/n);this.b0=(1+r*n)*o,this.b1=-2*a*o,this.b2=(1-r*n)*o,this.a1=this.b1,this.a2=(1-r/n)*o}else this.b0=n*n,this.b1=this.b2=this.a1=this.a2=0}else this.b0=1,this.b1=this.b2=this.a1=this.a2=0},notch:function(t,e){if((t/=.5*this.samplerate)>0&&t<1)if(e>0){var i=Math.PI*t,n=Math.sin(i)/(2*e),s=Math.cos(i),r=1/(1+n);this.b0=r,this.b1=-2*s*r,this.b2=r,this.a1=this.b1,this.a2=(1-n)*r}else this.b0=this.b1=this.b2=this.a1=this.a2=0;else this.b0=1,this.b1=this.b2=this.a1=this.a2=0},allpass:function(t,e){if((t/=.5*this.samplerate)>0&&t<1)if(e>0){var i=Math.PI*t,n=Math.sin(i)/(2*e),s=Math.cos(i),r=1/(1+n);this.b0=(1-n)*r,this.b1=-2*s*r,this.b2=(1+n)*r,this.a1=this.b1,this.a2=this.b0}else this.b0=-1,this.b1=this.b2=this.a1=this.a2=0;else this.b0=1,this.b1=this.b2=this.a1=this.a2=0}};n.lpf=n.lowpass,n.hpf=n.highpass,n.bpf=n.bandpass,n.bef=n.notch,n.brf=n.notch,n.apf=n.allpass,t.modules.Biquad=e}(timbre),function(t){function e(e){this.samplerate=e;var i=Math.round(Math.log(.1*e)*Math.LOG2E);this.buffersize=1<<i,this.bufferL=new t.fn.SignalArray(this.buffersize+1),this.bufferR=new t.fn.SignalArray(this.buffersize+1),this.wave=null,this._wave=null,this.writeIndex=this.buffersize>>1,this.readIndex=0,this.delayTime=20,this.rate=4,this.depth=20,this.feedback=.2,this.wet=.5,this.phase=0,this.phaseIncr=0,this.phaseStep=4,this.setWaveType("sin"),this.setDelayTime(this.delayTime),this.setRate(this.rate)}var i=e.prototype,n=[];n[0]=function(){for(var t=new Float32Array(512),e=0;e<512;++e)t[e]=Math.sin(2*Math.PI*(e/512));return t}(),n[1]=function(){for(var t,e=new Float32Array(512),i=0;i<512;++i)t=i/512-.25,e[i]=1-4*Math.abs(Math.round(t)-t);return e}(),i.setWaveType=function(t){"sin"===t?(this.wave=t,this._wave=n[0]):"tri"===t&&(this.wave=t,this._wave=n[1])},i.setDelayTime=function(t){this.delayTime=t;for(var e=this.writeIndex-(t*this.samplerate*.001|0);e<0;)e+=this.buffersize;this.readIndex=e},i.setRate=function(t){this.rate=t,this.phaseIncr=512*this.rate/this.samplerate*this.phaseStep},i.process=function(t,e){var i,n,s,r,a,o=this.bufferL,h=this.bufferR,u=this.buffersize,l=u-1,c=this._wave,f=this.phase,p=this.phaseIncr,d=this.writeIndex,v=this.readIndex,m=this.depth,g=this.feedback,b=this.wet,_=1-b,y=t.length,w=this.phaseStep;for(r=0;r<y;){for(s=c[0|f]*m,f+=p;f>512;)f-=512;for(a=0;a<w;++a,++r)n=v+u+s&l,i=.5*(o[n]+o[n+1]),o[d]=t[r]-i*g,t[r]=t[r]*_+i*b,i=.5*(h[n]+h[n+1]),h[d]=e[r]-i*g,e[r]=e[r]*_+i*b,d=d+1&l,v=v+1&l}this.phase=f,this.writeIndex=d,this.readIndex=v},t.modules.Chorus=e}(timbre),function(t){function e(e,n){this.samplerate=e,this.channels=n,this.lastPreDelayFrames=0,this.preDelayReadIndex=0,this.preDelayWriteIndex=s,this.ratio=-1,this.slope=-1,this.linearThreshold=-1,this.dbThreshold=-1,this.dbKnee=-1,this.kneeThreshold=-1,this.kneeThresholdDb=-1,this.ykneeThresholdDb=-1,this.K=-1,this.attackTime=.003,this.releaseTime=.25,this.preDelayTime=.006,this.dbPostGain=0,this.effectBlend=1,this.releaseZone1=.09,this.releaseZone2=.16,this.releaseZone3=.42,this.releaseZone4=.98,this.detectorAverage=0,this.compressorGain=1,this.meteringGain=1,this.delayBufferL=new t.fn.SignalArray(i),this.delayBufferR=2===n?new t.fn.SignalArray(i):this.delayBufferL,this.preDelayTime=6,this.preDelayReadIndex=0,this.preDelayWriteIndex=s,this.maxAttackCompressionDiffDb=-1,this.meteringReleaseK=1-Math.exp(-1/(.325*this.samplerate)),this.setAttackTime(this.attackTime),this.setReleaseTime(this.releaseTime),this.setPreDelayTime(this.preDelayTime),this.setParams(-24,30,12)}var i=1024,n=i-1,s=256,r=e.prototype;r.clone=function(){var t=new e(this.samplerate,this.channels);return t.setAttackTime(this.attackTime),t.setReleaseTime(this.releaseTime),t.setPreDelayTime(this.preDelayTime),t.setParams(this.dbThreshold,this.dbKnee,this.ratio),t},r.setAttackTime=function(t){this.attackTime=Math.max(.001,t),this._attackFrames=this.attackTime*this.samplerate},r.setReleaseTime=function(t){this.releaseTime=Math.max(.001,t);var e=this.releaseTime*this.samplerate;this._satReleaseFrames=.0025*this.samplerate;var i=e*this.releaseZone1,n=e*this.releaseZone2,s=e*this.releaseZone3,r=e*this.releaseZone4;this._kA=.9999999999999998*i+1.8432219684323923e-16*n-1.9373394351676423e-16*s+8.824516011816245e-18*r,this._kB=-1.5788320352845888*i+2.3305837032074286*n-.9141194204840429*s+.1623677525612032*r,this._kC=.5334142869106424*i-1.272736789213631*n+.9258856042207512*s-.18656310191776226*r,this._kD=.08783463138207234*i-.1694162967925622*n+.08588057951595272*s-.00429891410546283*r,this._kE=-.042416883008123074*i+.1115693827987602*n-.09764676325265872*s+.028494263462021576*r},r.setPreDelayTime=function(t){this.preDelayTime=t;var e=t*this.samplerate;if(e>i-1&&(e=i-1),this.lastPreDelayFrames!==e){this.lastPreDelayFrames=e;for(var n=0,s=this.delayBufferL.length;n<s;++n)this.delayBufferL[n]=this.delayBufferR[n]=0;this.preDelayReadIndex=0,this.preDelayWriteIndex=e}},r.setParams=function(t,e,i){this._k=this.updateStaticCurveParameters(t,e,i);var n=this.saturate(1,this._k),s=1/n;s=Math.pow(s,.6),this._masterLinearGain=Math.pow(10,.05*this.dbPostGain)*s},r.kneeCurve=function(t,e){return t<this.linearThreshold?t:this.linearThreshold+(1-Math.exp(-e*(t-this.linearThreshold)))/e},r.saturate=function(t,e){var i;if(t<this.kneeThreshold)i=this.kneeCurve(t,e);else{var n=t?20*Math.log(t)*Math.LOG10E:-1e3,s=this.ykneeThresholdDb+this.slope*(n-this.kneeThresholdDb);i=Math.pow(10,.05*s)}return i},r.slopeAt=function(t,e){if(t<this.linearThreshold)return 1;var i=1.001*t,n=t?20*Math.log(t)*Math.LOG10E:-1e3,s=i?20*Math.log(i)*Math.LOG10E:-1e3,r=this.kneeCurve(t,e),a=this.kneeCurve(i,e),o=r?20*Math.log(r)*Math.LOG10E:-1e3;return((a?20*Math.log(a)*Math.LOG10E:-1e3)-o)/(s-n)},r.kAtSlope=function(t){for(var e=this.dbThreshold+this.dbKnee,i=Math.pow(10,.05*e),n=.1,s=1e4,r=5,a=0;a<15;++a){this.slopeAt(i,r)<t?s=r:n=r,r=Math.sqrt(n*s)}return r},r.updateStaticCurveParameters=function(t,e,i){this.dbThreshold=t,this.linearThreshold=Math.pow(10,.05*t),this.dbKnee=e,this.ratio=i,this.slope=1/this.ratio,this.kneeThresholdDb=t+e,this.kneeThreshold=Math.pow(10,.05*this.kneeThresholdDb);var n=this.kAtSlope(1/this.ratio),s=this.kneeCurve(this.kneeThreshold,n);return this.ykneeThresholdDb=s?20*Math.log(s)*Math.LOG10E:-1e3,this._k=n,this._k},r.process=function(t,e){for(var i=1-this.effectBlend,s=this.effectBlend,r=this._k,a=this._masterLinearGain,o=this._satReleaseFrames,h=this._kA,u=this._kB,l=this._kC,c=this._kD,f=this._kE,p=t.length/64,d=0,v=this.detectorAverage,m=this.compressorGain,g=this.maxAttackCompressionDiffDb,b=1/this._attackFrames,_=this.preDelayReadIndex,y=this.preDelayWriteIndex,w=this.detectorAverage,x=this.delayBufferL,k=this.delayBufferR,S=this.meteringGain,A=this.meteringReleaseK,T=0;T<p;++T){var I,R=Math.asin(v)/(.5*Math.PI),O=R>m,D=m/R,M=D?20*Math.log(D)*Math.LOG10E:-1e3;if((M===1/0||isNaN(M))&&(M=-1),O){g=-1,D=M,D=D<-12?0:D>0?3:.25*(D+12);var L=D*D,j=L*D,P=L*L,F=h+u*D+l*L+c*j+f*P,q=5/F;I=Math.pow(10,.05*q)}else{(-1===g||g<M)&&(g=M);D=.25/Math.max(.5,g),I=1-Math.pow(D,b)}for(var B=64;B--;){var E=0,C=.5*(t[d]+e[d]);x[y]=t[d],k[y]=e[d],C<0&&(C*=-1),E<C&&(E=C);var N=E;N<0&&(N*=-1);var z=this.saturate(N,r),G=N<=1e-4?1:z/N,W=G?-20*Math.log(G)*Math.LOG10E:1e3;W<2&&(W=2);var V=W/o,K=Math.pow(10,.05*V)-1;w+=(G-w)*(G>w?K:1),w>1&&(w=1),I<1?m+=(R-m)*I:(m*=I)>1&&(m=1);var $=Math.sin(.5*Math.PI*m),Y=i+s*a*$,H=20*Math.log($)*Math.LOG10E;H<S?S=H:S+=(H-S)*A,t[d]=x[_]*Y,e[d]=k[_]*Y,d++,_=_+1&n,y=y+1&n}w<1e-6&&(w=1e-6),m<1e-6&&(m=1e-6)}this.preDelayReadIndex=_,this.preDelayWriteIndex=y,this.detectorAverage=w,this.compressorGain=m,this.maxAttackCompressionDiffDb=g,this.meteringGain=S},r.reset=function(){this.detectorAverage=0,this.compressorGain=1,this.meteringGain=1;for(var t=0,e=this.delayBufferL.length;t<e;++t)this.delayBufferL[t]=this.delayBufferR[t]=0;this.preDelayReadIndex=0,this.preDelayWriteIndex=s,this.maxAttackCompressionDiffDb=-1},t.modules.Compressor=e}(timbre),function(t){function e(){}e.prototype.decode=function(t,i,n){if("string"==typeof t){if(/\.wav$/.test(t))return e.wav_decode(t,i,n);if(e.ogg_decode&&/\.ogg$/.test(t))return e.ogg_decode(t,i,n);if(e.mp3_decode&&/\.mp3$/.test(t))return e.mp3_decode(t,i,n)}else if("object"===(void 0===t?"undefined":_typeof(t))){if("wav"===t.type)return e.wav_decode(t.data,i,n);if(e.ogg_decode&&"ogg"===t.type)return e.ogg_decode(t.data,i,n);if(e.mp3_decode&&"mp3"===t.type)return e.mp3_decode(t.data,i,n)}return e.webkit_decode?"object"===(void 0===t?"undefined":_typeof(t))?e.webkit_decode(t.data||t,i,n):e.webkit_decode(t,i,n):e.moz_decode?e.moz_decode(t,i,n):void i(!1)},t.modules.Decoder=e,"browser"===t.envtype?e.getBinaryWithPath=function(e,i){t.fn.fix_iOS6_1_problem(!0);var n=new XMLHttpRequest;n.open("GET",e),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(n.response?i(new Uint8Array(n.response)):void 0!==n.responseBody&&i(new Uint8Array(VBArray(n.responseBody).toArray())),t.fn.fix_iOS6_1_problem(!1))},n.send()}:e.getBinaryWithPath=function(t,e){e("no support")};var i=function(t){for(var e,i,n,s,r,a=new Int32Array(t.length/3),o=0,h=t.length,u=0;o<h;)e=t[o++],i=t[o++],n=t[o++],s=e+(i<<8)+(n<<16),r=8388608&s?s-16777216:s,a[u++]=r;return a};e.wav_decode=function(){var t=function(t,e,n){if("RIFF"!==String.fromCharCode(t[0],t[1],t[2],t[3]))return e(!1);if(t[4]+(t[5]<<8)+(t[6]<<16)+(t[7]<<24)+8!==t.length)return e(!1);if("WAVE"!==String.fromCharCode(t[8],t[9],t[10],t[11]))return e(!1);if("fmt "!==String.fromCharCode(t[12],t[13],t[14],t[15]))return e(!1);for(var s=t[22]+(t[23]<<8),r=t[24]+(t[25]<<8)+(t[26]<<16)+(t[27]<<24),a=t[34]+(t[35]<<8),o=36;o<t.length&&"data"!==String.fromCharCode(t[o],t[o+1],t[o+2],t[o+3]);)o+=1;if(o>=t.length)return e(!1);o+=4;var h=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+(t[o+3]<<24),u=(h/s>>1)/r;if(o+=4,h>t.length-o)return e(!1);var l,c,f;l=new Float32Array(u*r|0),2===s&&(c=new Float32Array(l.length),f=new Float32Array(l.length)),e({samplerate:r,channels:s,buffer:[l,c,f],duration:u}),8===a?t=new Int8Array(t.buffer,o):16===a?t=new Int16Array(t.buffer,o):32===a?t=new Int32Array(t.buffer,o):24===a&&(t=i(new Uint8Array(t.buffer,o)));var p,d,v,m=1/((1<<a-1)-1);if(2===s)for(o=d=0,p=l.length;o<p;++o)v=c[o]=t[d++]*m,v+=f[o]=t[d++]*m,l[o]=.5*v;else for(o=0,p=l.length;o<p;++o)l[o]=t[o]*m;n()};return function(i,n,s){"string"==typeof i?e.getBinaryWithPath(i,function(e){t(e,n,s)}):t(i,n,s)}}(),e.webkit_decode=function(){if(void 0!==t.fn._audioContext){var i=t.fn._audioContext,n=function(t,e,n){var s,r,a,o,h;if("string"==typeof t)return n(!1);var u;try{u=i.createBuffer(t.buffer,!1)}catch(t){return e(!1)}s=i.sampleRate,r=u.numberOfChannels,2===r?(a=u.getChannelData(0),o=u.getChannelData(1)):a=o=u.getChannelData(0),h=a.length/s;for(var l=new Float32Array(a),c=0,f=l.length;c<f;++c)l[c]=.5*(l[c]+o[c]);e({samplerate:s,channels:r,buffer:[l,a,o],duration:h}),n()};return function(t,i,s){if(t instanceof File){var r=new FileReader;r.onload=function(t){n(new Uint8Array(t.target.result),i,s)},r.readAsArrayBuffer(t)}else"string"==typeof t?e.getBinaryWithPath(t,function(t){n(t,i,s)}):n(t,i,s)}}}(),e.moz_decode=function(){if("function"==typeof Audio&&"function"==typeof(new Audio).mozSetup)return function(t,e,i){var n,s,r,a,o,h,u=0,l=new Audio(t);l.volume=0,l.addEventListener("loadedmetadata",function(){n=l.mozSampleRate,s=l.mozChannels,h=l.duration,r=new Float32Array(l.duration*n|0),2===s&&(a=new Float32Array(l.duration*n|0),o=new Float32Array(l.duration*n|0)),2===s?l.addEventListener("MozAudioAvailable",function(t){for(var e,i=t.frameBuffer,n=0,s=i.length;n<s;n+=2)e=a[u]=i[n],e+=o[u]=i[n+1],r[u]=.5*e,u+=1},!1):l.addEventListener("MozAudioAvailable",function(t){for(var e=t.frameBuffer,i=0,n=e.length;i<n;++i)r[i]=e[i],u+=1},!1),l.play(),setTimeout(function(){e({samplerate:n,channels:s,buffer:[r,a,o],duration:h})},1e3)},!1),l.addEventListener("ended",function(){i()},!1),l.load()}}()}(timbre),function(t){function e(t){this.samplerate=t||44100,this.value=n,this.status=f,this.curve="linear",this.step=1,this.releaseNode=null,this.loopNode=null,this.emit=null,this._envValue=new i(t),this._table=[],this._initValue=n,this._curveValue=0,this._defaultCurveType=r,this._index=0,this._counter=0}function i(t){this.samplerate=t,this.value=n,this.step=1,this._curveType=r,this._curveValue=0,this._grow=0,this._a2=0,this._b1=0,this._y1=0,this._y2=0}var n=e.ZERO=1e-6,s=e.CurveTypeSet=0,r=e.CurveTypeLin=1,a=e.CurveTypeExp=2,o=e.CurveTypeSin=3,h=e.CurveTypeWel=4,u=e.CurveTypeCurve=5,l=e.CurveTypeSqr=6,c=e.CurveTypeCub=7,f=e.StatusWait=0,p=e.StatusGate=1,d=e.StatusSustain=2,v=e.StatusRelease=3,m=e.StatusEnd=4,g={set:s,lin:r,linear:r,exp:a,exponential:a,sin:o,sine:o,wel:h,welch:h,sqr:l,squared:l,cub:c,cubed:c};e.CurveTypeDict=g;var b=e.prototype;b.clone=function(){var t=new e(this.samplerate);return t._table=this._table,t._initValue=this._initValue,t.setCurve(this.curve),null!==this.releaseNode&&t.setReleaseNode(this.releaseNode+1),null!==this.loopNode&&t.setLoopNode(this.loopNode+1),t.setStep(this.step),t.reset(),t},b.setTable=function(t){this._initValue=t[0],this._table=t.slice(1),this.value=this._envValue.value=this._initValue,this._index=0,this._counter=0,this.status=f},b.setCurve=function(t){"number"==typeof t?(this._defaultCurveType=u,this._curveValue=t,this.curve=t):(this._defaultCurveType=g[t]||null,this.curve=t)},b.setReleaseNode=function(t){"number"==typeof t&&t>0&&(this.releaseNode=t-1)},b.setLoopNode=function(t){"number"==typeof t&&t>0&&(this.loopNode=t-1)},b.setStep=function(t){this.step=this._envValue.step=t},b.reset=function(){this.value=this._envValue.value=this._initValue,this._index=0,this._counter=0,this.status=f},b.release=function(){null!==this.releaseNode&&this._index<=this.releaseNode&&(this._counter=0,this._index=this.releaseNode,this.status=v)},b.getInfo=function(t){var e,i,n=this._table,s=0,r=1/0,a=1/0,o=!1;for(e=0,i=n.length;e<i;++e){this.loopNode===e&&(r=s),this.releaseNode===e&&(s<t?s+=t:s=t,a=s);var h=n[e];Array.isArray(h)&&(s+=h[1])}return r!==1/0&&a===1/0&&(s+=t,o=!0),{totalDuration:s,loopBeginTime:r,releaseBeginTime:a,isEndlessLoop:o}},b.calcStatus=function(){var t,e,i,n,a=this.status,o=this._table,h=this._index,l=this._counter,c=this._curveValue,g=this._defaultCurveType,b=this.loopNode,_=this.releaseNode,y=this._envValue,w=null;switch(a){case f:case m:break;case p:case v:for(;l<=0;)if(h>=o.length){if(a===p&&null!==b){h=b;continue}a=m,l=1/0,n=s,w="ended"}else if(a!==p||h!==_)t=o[h++],e=t[0],n=null===t[2]?g:t[2],n===u&&(c=t[3],Math.abs(c)<.001&&(n=r)),i=t[1],l=y.setNext(e,i,n,c);else{if(null!==b&&b<_){h=b;continue}a=d,l=1/0,n=s,w="sustained"}}return this.status=a,this.emit=w,this._index=h,this._counter=l,a},b.next=function(){return 1&this.calcStatus()&&(this.value=this._envValue.next()||n),this._counter-=1,this.value},b.process=function(t){var e,i=this._envValue,s=t.length;if(1&this.calcStatus())for(e=0;e<s;++e)t[e]=i.next()||n;else{var r=this.value||n;for(e=0;e<s;++e)t[e]=r}this.value=t[s-1],this._counter-=t.length},i.prototype.setNext=function(t,e,i,n){var f,p,d,v,m,g,b,y=this.step,w=this.value,x=.001*e*this.samplerate/y|0;switch(x<1&&(x=1,i=s),i){case s:this.value=t;break;case r:f=(t-w)/x;break;case a:f=0!==w?Math.pow(t/w,1/x):0;break;case o:p=Math.PI/x,v=.5*(t+w),m=2*Math.cos(p),g=.5*(t-w),b=g*Math.sin(.5*Math.PI-p),w=v-g;break;case h:p=.5*Math.PI/x,m=2*Math.cos(p),t>=w?(v=w,g=0,b=-Math.sin(p)*(t-w)):(v=t,g=w-t,b=Math.cos(p)*(w-t)),w=v+g;break;case u:d=(t-w)/(1-Math.exp(n)),v=w+d,m=d,f=Math.exp(n/x);break;case l:g=Math.sqrt(w),b=Math.sqrt(t),f=(b-g)/x;break;case c:g=Math.pow(w,.33333333),b=Math.pow(t,.33333333),f=(b-g)/x}return this.next=_[i],this._grow=f,this._a2=v,this._b1=m,this._y1=g,this._y2=b,x};var _=[];_[s]=function(){return this.value},_[r]=function(){return this.value+=this._grow,this.value},_[a]=function(){return this.value*=this._grow,this.value},_[o]=function(){var t=this._b1*this._y1-this._y2;return this.value=this._a2-t,this._y2=this._y1,this._y1=t,this.value},_[h]=function(){var t=this._b1*this._y1-this._y2;return this.value=this._a2+t,this._y2=this._y1,this._y1=t,this.value},_[u]=function(){return this._b1*=this._grow,this.value=this._a2-this._b1,this.value},_[l]=function(){return this._y1+=this._grow,this.value=this._y1*this._y1,this.value},_[c]=function(){return this._y1+=this._grow,this.value=this._y1*this._y1*this._y1,this.value},i.prototype.next=_[s],t.modules.Envelope=e,t.modules.EnvelopeValue=i}(timbre),function(t){function e(e){e="number"==typeof e?e:512,e=1<<Math.ceil(Math.log(e)*Math.LOG2E),this.length=e,this.buffer=new t.fn.SignalArray(e),this.real=new t.fn.SignalArray(e),this.imag=new t.fn.SignalArray(e),this._real=new t.fn.SignalArray(e),this._imag=new t.fn.SignalArray(e),this.mag=new t.fn.SignalArray(e>>1),this.minDecibels=-30,this.maxDecibels=-100;var i=n.get(e);this._bitrev=i.bitrev,this._sintable=i.sintable,this._costable=i.costable}var i=e.prototype;i.setWindow=function(e){if("string"==typeof e){var i=/([A-Za-z]+)(?:\(([01]\.?\d*)\))?/.exec(e);if(null!==i){var n=i[1].toLowerCase(),r=void 0!==i[2]?+i[2]:.25,a=s[n];if(a){this._window||(this._window=new t.fn.SignalArray(this.length));var o=this._window,h=0,u=this.length;for(r=r<0?0:r>1?1:r;h<u;++h)o[h]=a(h,u,r);this.windowName=e}}}},i.forward=function(t){var e,i,n,s,r,a,o,h,u,l,c,f=this.buffer,p=this.real,d=this.imag,v=this._window,m=this._bitrev,g=this._sintable,b=this._costable,_=f.length;if(v)for(e=0;e<_;++e)f[e]=t[e]*v[e];else f.set(t);for(e=0;e<_;++e)p[e]=f[m[e]],d[e]=0;for(n=1;n<_;n=s)for(r=0,s=n+n,a=_/s,i=0;i<n;i++){for(o=b[r],h=g[r],e=i;e<_;e+=s)u=e+n,l=h*d[u]+o*p[u],c=o*d[u]-h*p[u],p[u]=p[e]-l,p[e]+=l,d[u]=d[e]-c,d[e]+=c;r+=a}var y,w,x=this.mag;for(e=0;e<_;++e)y=p[e],w=d[e],x[e]=Math.sqrt(y*y+w*w);return{real:p,imag:d}},i.inverse=function(t,e){var i,n,s,r,a,o,h,u,l,c,f,p=this.buffer,d=this._real,v=this._imag,m=this._bitrev,g=this._sintable,b=this._costable,_=p.length;for(i=0;i<_;++i)n=m[i],d[i]=+t[n],v[i]=-e[n];for(s=1;s<_;s=r)for(a=0,r=s+s,o=_/r,n=0;n<s;n++){for(h=b[a],u=g[a],i=n;i<_;i+=r)l=i+s,c=u*v[l]+h*d[l],f=h*v[l]-u*d[l],d[l]=d[i]-c,d[i]+=c,v[l]=v[i]-f,v[i]+=f;a+=o}for(i=0;i<_;++i)p[i]=d[i]/_;return p},i.getFrequencyData=function(t){var e,i=this.minDecibels,n=Math.min(this.mag.length,t.length);if(n){var s,r=this.mag,a=0;for(e=0;e<n;++e)s=r[e],t[e]=s?20*Math.log(s)*Math.LOG10E:i,a<t[e]&&(a=t[e])}return t};var n={get:function(e){return n[e]||function(){var i,s,r=function(){var t,i,n,s,r;for(t=new Int16Array(e),r=e>>1,i=n=0;t[i]=n,!(++i>=e);){for(s=r;s<=n;)n-=s,s>>=1;n+=s}return t}(),a=Math.floor(Math.log(e)/Math.LN2),o=new t.fn.SignalArray((1<<a)-1),h=new t.fn.SignalArray((1<<a)-1),u=2*Math.PI;for(i=0,s=o.length;i<s;++i)o[i]=Math.sin(u*(i/e)),h[i]=Math.cos(u*(i/e));return n[e]={bitrev:r,sintable:o,costable:h},n[e]}()}},s=function(){var t=Math.PI,e=2*Math.PI,i=Math.abs,n=Math.pow,s=Math.cos,r=Math.sin,a=function(e){return r(t*e)/(t*e)},o=Math.E;return{rectangular:function(){return 1},hann:function(t,i){return.5*(1-s(e*t/(i-1)))},hamming:function(t,i){return.54-.46*s(e*t/(i-1))},tukery:function(e,i,n){return e<n*(i-1)/2?.5*(1+s(t*(2*e/(n*(i-1))-1))):(i-1)*(1-n/2)<e?.5*(1+s(t*(2*e/(n*(i-1))-2/n+1))):1},cosine:function(e,i){return r(t*e/(i-1))},lanczos:function(t,e){return a(2*t/(e-1)-1)},triangular:function(t,e){return 2/(e+1)*((e+1)/2-i(t-(e-1)/2))},bartlett:function(t,e){return 2/(e-1)*((e-1)/2-i(t-(e-1)/2))},gaussian:function(t,e,i){return n(o,-.5*n((t-(e-1)/2)/(i*(e-1)/2),2))},bartlettHann:function(t,n){return.62-.48*i(t/(n-1)-.5)-.38*s(e*t/(n-1))},blackman:function(i,n,r){var a=(1-r)/2,o=r/2;return a-.5*s(e*i/(n-1))+o*s(4*t*i/(n-1))}}}();t.modules.FFT=e}(timbre),function(t){function e(t){this.samplerate=t||44100,this.wave=null,this.step=1,this.frequency=0,this.value=0,this.phase=0,this.feedback=!1,this._x=0,this._lastouts=0,this._coeff=r/this.samplerate,this._radtoinc=r/(2*Math.PI)}function i(t,e,i,n){var s,r,a,o,h,u=l[e];if(void 0!==u){switch("function"==typeof u&&(u=u()),i){case"@1":for(r=512;r<1024;++r)u[r]=0;break;case"@2":for(r=512;r<1024;++r)u[r]=Math.abs(u[r]);break;case"@3":for(r=256;r<512;++r)u[r]=0;for(r=512;r<768;++r)u[r]=Math.abs(u[r]);for(r=768;r<1024;++r)u[r]=0;break;case"@4":for(s=new Float32Array(1024),r=0;r<512;++r)s[r]=u[r<<1];u=s;break;case"@5":for(s=new Float32Array(1024),r=0;r<512;++r)s[r]=Math.abs(u[r<<1]);u=s}if(void 0!==n&&50!==n){for(n*=.01,n=n<0?0:n>1?1:n,s=new Float32Array(1024),a=1024*n|0,r=0;r<a;++r)s[r]=u[r/a*512|0];for(h=1024-a,o=0;r<1024;++r,++o)s[r]=u[o/h*512+512|0];u=s}if("+"===t)for(r=0;r<1024;++r)u[r]=.5*u[r]+.5;else if("-"===t)for(r=0;r<1024;++r)u[r]*=-1;return u}}function n(t){var e=new Float32Array(1024),i=t.length>>1;if(-1!==[2,4,8,16,32,64,128,256,512,1024].indexOf(i))for(var n=0,s=0;n<i;++n){var r=parseInt(t.substr(2*n,2),16);r=128&r?(r-256)/128:r/127;for(var a=0,o=1024/i;a<o;++a)e[s++]=r}return e}function s(t){var e=new Float32Array(1024);if(8===t.length){var i,n,s=parseInt(t,16),r=new Float32Array(8);for(r[0]=1,i=0;i<7;++i)r[i+1]=.0625*(15&s),s>>=4;for(i=0;i<8;++i){var a=0,o=(i+1)/1024;for(n=0;n<1024;++n)e[n]+=Math.sin(2*Math.PI*a)*r[i],a+=o}var h,u=0;for(i=0;i<1024;++i)u<(h=Math.abs(e[i]))&&(u=h);if(u>0)for(i=0;i<1024;++i)e[i]/=u}return e}var r=1024,a=r-1,o=e.prototype;o.setWave=function(e){var i,n,s=this.wave;if(this.wave||(this.wave=new Float32Array(r+1)),"function"==typeof e)for(i=0;i<r;++i)s[i]=e(i/r);else if(t.fn.isSignalArray(e))if(e.length===s.length)s.set(e);else for(n=e.length/r,i=0;i<r;++i)s[i]=e[i*n|0];else"string"==typeof e&&void 0!==(n=h(e))&&this.wave.set(n);this.wave[r]=this.wave[0]},o.clone=function(){var t=new e(this.samplerate);return t.wave=this.wave,t.step=this.step,t.frequency=this.frequency,t.value=this.value,t.phase=this.phase,t.feedback=this.feedback,t},o.reset=function(){this._x=0},o.next=function(){var t=this._x,e=t+this.phase*this._radtoinc|0;return this.value=this.wave[e&a],t+=this.frequency*this._coeff*this.step,t>r&&(t-=r),this._x=t,this.value},o.process=function(t){var e,i,n,s,o,h,u=this.wave,l=this._radtoinc,c=this._x,f=this.frequency*this._coeff,p=this.step;if(this.feedback){var d=this._lastouts;for(l*=this.phase,h=0;h<p;++h)e=c+d*l,i=0|e,n=e-i,i&=a,s=u[i],o=u[i+1],t[h]=d=s+n*(o-s),c+=f;this._lastouts=d}else{var v=this.phase*l;for(h=0;h<p;++h)e=c+v,i=0|e,n=e-i,i&=a,s=u[i],o=u[i+1],t[h]=s+n*(o-s),c+=f}c>r&&(c-=r),this._x=c,this.value=t[t.length-1]},o.processWithFreqArray=function(t,e){var i,n,s,o,h,u,l=this.wave,c=this._radtoinc,f=this._x,p=this._coeff,d=this.step;if(this.feedback){var v=this._lastouts;for(c*=this.phase,u=0;u<d;++u)i=f+v*c,n=0|i,s=i-n,n&=a,o=l[n],h=l[n+1],t[u]=v=o+s*(h-o),f+=e[u]*p;this._lastouts=v}else{var m=this.phase*this._radtoinc;for(u=0;u<d;++u)i=f+m,n=0|i,s=i-n,n&=a,o=l[n],h=l[n+1],t[u]=o+s*(h-o),f+=e[u]*p}f>r&&(f-=r),this._x=f,this.value=t[t.length-1]},o.processWithPhaseArray=function(t,e){var i,n,s,o,h,u,l=this.wave,c=this._radtoinc,f=this._x,p=this.frequency*this._coeff,d=this.step;if(this.feedback){var v=this._lastouts;for(c*=this.phase,u=0;u<d;++u)i=f+v*c,n=0|i,s=i-n,n&=a,o=l[n],h=l[n+1],t[u]=v=o+s*(h-o),f+=p;this._lastouts=v}else for(u=0;u<d;++u)i=f+e[u]*c,n=0|i,s=i-n,n&=a,o=l[n],h=l[n+1],t[u]=o+s*(h-o),f+=p;f>r&&(f-=r),this._x=f,this.value=t[t.length-1]},o.processWithFreqAndPhaseArray=function(t,e,i){var n,s,o,h,u,l,c=this.wave,f=this._radtoinc,p=this._x,d=this._coeff,v=this.step;if(this.feedback){var m=this._lastouts;for(f*=this.phase,l=0;l<v;++l)n=p+m*f,s=0|n,o=n-s,s&=a,h=c[s],u=c[s+1],t[l]=m=h+o*(u-h),p+=e[l]*d;this._lastouts=m}else for(l=0;l<v;++l)n=p+i[l]*r,s=0|n,o=n-s,s&=a,h=c[s],u=c[s+1],t[l]=h+o*(u-h),p+=e[l]*d;p>r&&(p-=r),this._x=p,this.value=t[t.length-1]};var h=function(t){var e=l[t];if(void 0!==e)return"function"==typeof e&&(e=e()),e;var r;if(null!==(r=/^([\-+]?)(\w+)(?:\((@[0-7])?:?(\d+)?\))?$/.exec(t))){if(void 0!==(e=i(r[1],r[2],r[3],r[4])))return l[t]=e,e}return null!==(r=/^wavb\(((?:[0-9a-fA-F][0-9a-fA-F])+)\)$/.exec(t))?n(r[1]):(r=/^wavc\(([0-9a-fA-F]{8})\)$/.exec(t),null!==r?s(r[1]):void 0)};e.getWavetable=h;var u=function(e,i){var n,s,r=new Float32Array(1024);if("function"==typeof i)for(s=0;s<1024;++s)r[s]=i(s/1024);else if(t.fn.isSignalArray(i))if(i.length===r.length)r.set(i);else for(n=i.length/1024,s=0;s<1024;++s)r[s]=i[s*n|0];l[e]=r};e.setWavetable=u;var l={sin:function(){for(var t=new Float32Array(1024),e=0;e<1024;++e)t[e]=Math.sin(2*Math.PI*(e/1024));return t},cos:function(){for(var t=new Float32Array(1024),e=0;e<1024;++e)t[e]=Math.cos(2*Math.PI*(e/1024));return t},pulse:function(){for(var t=new Float32Array(1024),e=0;e<1024;++e)t[e]=e<512?1:-1;return t},tri:function(){for(var t,e=new Float32Array(1024),i=0;i<1024;++i)t=i/1024-.25,e[i]=1-4*Math.abs(Math.round(t)-t);return e},saw:function(){for(var t,e=new Float32Array(1024),i=0;i<1024;++i)t=i/1024,e[i]=2*(t-Math.round(t));return e},fami:function(){for(var t=[0,.125,.25,.375,.5,.625,.75,.875,.875,.75,.625,.5,.375,.25,.125,0,-.125,-.25,-.375,-.5,-.625,-.75,-.875,-1,-1,-.875,-.75,-.625,-.5,-.375,-.25,-.125],e=new Float32Array(1024),i=0;i<1024;++i)e[i]=t[i/1024*t.length|0];return e},konami:function(){for(var t=[-.625,-.875,-.125,.75,.5,.125,.5,.75,.25,-.125,.5,.875,.625,0,.25,.375,-.125,-.75,0,.625,.125,-.5,-.375,-.125,-.75,-1,-.625,0,-.375,-.875,-.625,-.25],e=new Float32Array(1024),i=0;i<1024;++i)e[i]=t[i/1024*t.length|0];return e}};t.modules.Oscillator=e}(timbre),function(t){function e(e,a){this.samplerate=e;var o,h,u=e/44100;for(h=2*s.length,this.comb=new Array(h),this.combout=new Array(h),o=0;o<h;++o)this.comb[o]=new i(s[o%s.length]*u),this.combout[o]=new t.fn.SignalArray(a);for(h=2*r.length,this.allpass=new Array(h),o=0;o<h;++o)this.allpass[o]=new n(r[o%r.length]*u);this.outputs=[new t.fn.SignalArray(a),new t.fn.SignalArray(a)],this.damp=0,this.wet=.33,this.setRoomSize(.5),this.setDamp(.5)}function i(e){this.buffer=new t.fn.SignalArray(0|e),this.buffersize=this.buffer.length,this.bufidx=0,this.feedback=0,this.filterstore=0,this.damp=0}function n(e){this.buffer=new t.fn.SignalArray(0|e),this.buffersize=this.buffer.length,this.bufidx=0}var s=[1116,1188,1277,1356,1422,1491,1557,1617],r=[225,556,441,341],a=e.prototype;a.setRoomSize=function(t){var e=this.comb,i=.28*t+.7;this.roomsize=t,e[0].feedback=e[1].feedback=e[2].feedback=e[3].feedback=e[4].feedback=e[5].feedback=e[6].feedback=e[7].feedback=e[8].feedback=e[9].feedback=e[10].feedback=e[11].feedback=e[12].feedback=e[13].feedback=e[14].feedback=e[15].feedback=i},a.setDamp=function(t){var e=this.comb,i=.4*t;this.damp=t,e[0].damp=e[1].damp=e[2].damp=e[3].damp=e[4].damp=e[5].damp=e[6].damp=e[7].damp=e[8].damp=e[9].damp=e[10].damp=e[11].damp=e[12].damp=e[13].damp=e[14].damp=e[15].damp=i},a.process=function(t,e){var i,n=this.comb,s=this.combout,r=this.allpass,a=this.outputs[0],o=this.outputs[1],h=this.wet,u=1-h,l=t.length;for(n[0].process(t,s[0]),n[1].process(t,s[1]),n[2].process(t,s[2]),n[3].process(t,s[3]),n[4].process(t,s[4]),n[5].process(t,s[5]),n[6].process(t,s[6]),n[7].process(t,s[7]),n[8].process(e,s[8]),n[9].process(e,s[9]),n[10].process(e,s[10]),n[11].process(e,s[11]),n[12].process(e,s[12]),n[13].process(e,s[13]),n[14].process(e,s[14]),n[15].process(e,s[15]),i=0;i<l;++i)a[i]=s[0][i]+s[1][i]+s[2][i]+s[3][i]+s[4][i]+s[5][i]+s[6][i]+s[7][i],o[i]=s[8][i]+s[9][i]+s[10][i]+s[11][i]+s[12][i]+s[13][i]+s[14][i]+s[15][i];for(r[0].process(a,a),r[1].process(a,a),r[2].process(a,a),r[3].process(a,a),r[4].process(o,o),r[5].process(o,o),r[6].process(o,o),r[7].process(o,o),i=0;i<l;++i)t[i]=a[i]*h+t[i]*u,e[i]=o[i]*h+e[i]*u},i.prototype.process=function(t,e){var i,n,s,r=this.buffer,a=this.buffersize,o=this.bufidx,h=this.filterstore,u=this.feedback,l=this.damp,c=1-l,f=t.length;for(s=0;s<f;++s)i=.015*t[s],n=r[o],h=n*c+h*l,r[o]=i+h*u,++o>=a&&(o=0),e[s]=n;this.bufidx=o,this.filterstore=h},n.prototype.process=function(t,e){var i,n,s,r,a=this.buffer,o=this.buffersize,h=this.bufidx,u=t.length;for(r=0;r<u;++r)i=t[r],s=a[h],n=-i+s,a[h]=i+.5*s,++h>=o&&(h=0),e[r]=n;this.bufidx=h},t.modules.Reverb=e}(timbre),function(t){function e(t){
return new i(t)}function i(t){if(this.fragments=[],t){var e=t.samplerate||44100,i=t.buffer[0].length/e;this.fragments.push(new n(t,0,i))}}function n(t,e,i,n,s,r,o){t||(t=a),this.buffer=t.buffer[0],this.samplerate=t.samplerate||44100,this.start=e,this._duration=i,this.reverse=n||!1,this.pitch=s||100,this.stretch=r||!1,this.pan=o||50}function s(t,e){this.tape=t,this.fragments=t.fragments,this.samplerate=e||44100,this.isEnded=!1,this.buffer=null,this.bufferIndex=0,this.bufferIndexIncr=0,this.bufferBeginIndex=0,this.bufferEndIndex=0,this.fragment=null,this.fragmentIndex=0,this.panL=.5,this.panR=.5}var r=new Float32Array(60),a={buffer:r,samplerate:1};e.silence=function(t){return new e(a).slice(0,1).fill(t)},e.join=function(t){for(var e=new i,n=0;n<t.length;n++)t[n]instanceof i&&e.add_fragments(t[n].fragments);return e},e.Tape=i,i.prototype.add_fragment=function(t){return this.fragments.push(t),this},i.prototype.add_fragments=function(t){for(var e=0;e<t.length;e++)this.fragments.push(t[e]);return this},i.prototype.duration=function(){for(var t=0,e=0;e<this.fragments.length;e++)t+=this.fragments[e].duration();return t},i.prototype.slice=function(t,e){var n=this.duration();t+e>n&&(e=n-t);for(var s=new i,r=t,a=e,o=0;o<this.fragments.length;o++){var h=this.fragments[o],u=h.create(r,a),l=u[0];if(r=u[1],a=u[2],l&&s.add_fragment(l),0===a)break}return s},i.prototype.cut=i.prototype.slice,i.prototype.concat=function(t){var e=new i;return e.add_fragments(this.fragments),e.add_fragments(t.fragments),e},i.prototype.loop=function(t){var e,n=[];for(e=0;e<this.fragments.length;e++)n.push(this.fragments[e].clone());var s=new i;for(e=0;e<t;e++)s.add_fragments(n);return s},i.prototype.times=i.prototype.loop,i.prototype.split=function(t){for(var e=this.duration()/t,i=[],n=0;n<t;n++)i.push(this.slice(n*e,e));return i},i.prototype.fill=function(t){var e=this.duration();if(0===e)throw"EmptyFragment";var i=t/e|0,n=t%e;return this.loop(i).plus(this.slice(0,n))},i.prototype.replace=function(t,n,s){var r=new i,a=t+n;r=r.plus(this.slice(0,t));var o=r.duration();o<t&&(r=r.plus(e.silence(t-o))),r=r.plus(s);var h=this.duration();return h>a&&(r=r.plus(this.slice(a,h-a))),r},i.prototype.reverse=function(){for(var t=new i,e=this.fragments.length;e--;){var n=this.fragments[e].clone();n.reverse=!n.isReversed(),t.add_fragment(n)}return t},i.prototype.pitch=function(t,e){var n=new i;e=e||!1;for(var s=0;s<this.fragments.length;s++){var r=this.fragments[s].clone();r.pitch*=.01*t,r.stretch=e,n.add_fragment(r)}return n},i.prototype.stretch=function(t){var e=1/(.01*t)*100;return this.pitch(e,!0)},i.prototype.pan=function(t){var e=new i;t>100?t=100:t<0&&(t=0);for(var n=0;n<this.fragments.length;n++){var s=this.fragments[n].clone();s.pan=t,e.add_fragment(s)}return e},i.prototype.silence=function(){return e.silence(this.duration())},i.prototype.join=function(t){for(var e=new i,n=0;n<t.length;n++)t[n]instanceof i&&e.add_fragments(t[n].fragments);return e},i.prototype.getBuffer=function(){var t=44100;this.fragments.length>0&&(t=this.fragments[0].samplerate);var e=new s(this,t),i=this.duration()*t|0;return{samplerate:t,buffer:e.fetch(i)}},n.prototype.duration=function(){return this._duration*(100/this.pitch)},n.prototype.original_duration=function(){return this._duration},n.prototype.isReversed=function(){return this.reverse},n.prototype.isStretched=function(){return this.stretched},n.prototype.create=function(t,e){var i=this.duration();if(t>=i)return[null,t-i,e];var n,s=t+e>=i;s?(n=i-t,e-=n):(n=e,e=0);var r=this.clone();return r.start=this.start+t*this.pitch*.01,r._duration=n*this.pitch*.01,r.reverse=!1,[r,0,e]},n.prototype.clone=function(){var t=new n;return t.buffer=this.buffer,t.samplerate=this.samplerate,t.start=this.start,t._duration=this._duration,t.reverse=this.reverse,t.pitch=this.pitch,t.stretch=this.stretch,t.pan=this.pan,t},e.Fragment=n,e.TapeStream=s,s.prototype.reset=function(){return this.isEnded=!1,this.buffer=null,this.bufferIndex=0,this.bufferIndexIncr=0,this.bufferBeginIndex=0,this.bufferEndIndex=0,this.fragment=null,this.fragmentIndex=0,this.panL=.5,this.panR=.5,this.isLooped=!1,this},s.prototype.fetch=function(e){var i=new t.fn.SignalArray(e),n=new t.fn.SignalArray(e),s=this.fragments;if(0===s.length)return[i,n];for(var a,o=100*this.samplerate,h=this.buffer,u=this.bufferIndex,l=this.bufferIndexIncr,c=this.bufferBeginIndex,f=this.bufferEndIndex,p=this.fragment,d=this.fragmentIndex,v=this.panL,m=this.panR,g=0;g<e;g++){for(;!h||u<c||u>=f;)if(!p||d<s.length)p=s[d++],h=p.buffer,l=p.samplerate/o*p.pitch,c=p.start*p.samplerate,f=c+p.original_duration()*p.samplerate,a=.01*p.pan,v=1-a,m=a,p.reverse?(l*=-1,u=f+l):u=c;else{if(!this.isLooped){this.isEnded=!0,h=r,l=0,u=0;break}h=null,u=0,l=0,c=0,f=0,p=null,d=0}i[g]=h[0|u]*v,n[g]=h[0|u]*m,u+=l}return this.buffer=h,this.bufferIndex=u,this.bufferIndexIncr=l,this.bufferBeginIndex=c,this.bufferEndIndex=f,this.fragment=p,this.fragmentIndex=d,this.panL=v,this.panR=m,[i,n]},t.modules.Scissor=e}(timbre),function(t){function e(e){this.samplerate=e;var i=Math.ceil(Math.log(1.5*e)*Math.LOG2E);this.buffersize=1<<i,this.buffermask=this.buffersize-1,this.writeBufferL=new t.fn.SignalArray(this.buffersize),this.writeBufferR=new t.fn.SignalArray(this.buffersize),this.readBufferL=this.writeBufferL,this.readBufferR=this.writeBufferR,this.delaytime=null,this.feedback=null,this.cross=null,this.mix=null,this.prevL=0,this.prevR=0,this.readIndex=0,this.writeIndex=0,this.setParams(125,.25,!1,.45)}var i=e.prototype;i.setParams=function(t,e,i,n){if(this.delaytime!==t){this.delaytime=t;var s=.001*t*this.samplerate|0;s>this.buffermask&&(s=this.buffermask),this.writeIndex=this.readIndex+s&this.buffermask}this.feedback!==e&&(this.feedback=e),this.cross!==i&&(this.cross=i,i?(this.readBufferL=this.writeBufferR,this.readBufferR=this.writeBufferL):(this.readBufferL=this.writeBufferL,this.readBufferR=this.writeBufferR)),this.mix!==n&&(this.mix=n)},i.process=function(t,e){var i,n,s=this.readBufferL,r=this.readBufferR,a=this.writeBufferL,o=this.writeBufferR,h=this.readIndex,u=this.writeIndex,l=this.buffermask,c=this.feedback,f=this.mix,p=1-f,d=this.prevL,v=this.prevR,m=t.length;for(n=0;n<m;++n)i=s[h],a[u]=t[n]-i*c,t[n]=d=.5*(t[n]*p+i*f+d),i=r[h],o[u]=e[n]-i*c,e[n]=v=.5*(e[n]*p+i*f+v),h+=1,u=u+1&l;this.readIndex=h&this.buffermask,this.writeIndex=u,this.prevL=d,this.prevR=v},t.modules.StereoDelay=e}(timbre),function(t){var e=t.fn,i=t.modules;e.register("audio",function(t){var i=e.getClass("buffer"),r=new i(t);return r.playbackState=e.FINISHED_STATE,r._.isLoaded=!1,Object.defineProperties(r,{isLoaded:{get:function(){return this._.isLoaded}}}),r.load=n,r.loadthis=s,r});var n=function(n){var s=this,r=this._,a=new i.Deferred(this),o=arguments,h=1;a.done(function(){s._.emit("done")}),"function"==typeof o[h]&&(a.done(o[h++]),"function"==typeof o[h]&&a.fail(o[h++])),r.loadedTime=0;var u=function(i,n){var r=s._;i?(s.playbackState=e.PLAYING_STATE,r.samplerate=i.samplerate,r.channels=i.channels,r.bufferMix=null,r.buffer=i.buffer,r.phase=0,r.phaseIncr=i.samplerate/t.samplerate,r.duration=1e3*i.duration,r.currentTime=0,r.isReversed&&(r.phaseIncr*=-1,r.phase=i.buffer[0].length+r.phaseIncr),s._.emit("loadedmetadata")):a.reject(n)},l=function(){s._.isLoaded=!0,s._.plotFlush=!0,s._.emit("loadeddata"),a.resolveWith(s)};return(new i.Decoder).decode(n,u,l),a.promise()},s=function(){return n.apply(this,arguments),this}}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.biquad=new s(n.samplerate),n.freq=t(340),n.band=t(1),n.gain=t(0),n.plotBefore=r,n.plotRange=[-18,18],n.plotFlush=!0}var i=t.fn,n=t.modules.FFT,s=t.modules.Biquad;i.extend(e);var r=function(t,e,i,n,s){t.lineWidth=1,t.strokeStyle="rgb(192, 192, 192)";for(var r=.5*this._.samplerate,a=1;a<=10;++a)for(var o=1;o<=4;o++){var h=a*Math.pow(10,o);if(!(h<=20||r<=h)){t.beginPath();var u=Math.log(h/20)/Math.log(r/20);u=.5+(u*n+e|0),t.moveTo(u,i),t.lineTo(u,i+s),t.stroke()}}var l=s/6;for(a=1;a<6;a++){t.beginPath();var c=.5+(i+a*l|0);t.moveTo(e,c),t.lineTo(e+n,c),t.stroke()}},a=e.prototype;Object.defineProperties(a,{type:{set:function(t){var e=this._;t!==e.biquad.type&&(e.biquad.setType(t),e.plotFlush=!0)},get:function(){return this._.biquad.type}},freq:{set:function(e){this._.freq=t(e)},get:function(){return this._.freq}},cutoff:{set:function(e){this._.freq=t(e)},get:function(){return this._.freq}},res:{set:function(e){this._.band=t(e)},get:function(){return this._.band}},Q:{set:function(e){this._.band=t(e)},get:function(){return this._.band}},band:{set:function(e){this._.band=t(e)},get:function(){return this._.band}},gain:{set:function(e){this._.gain=t(e)},get:function(){return this._.gain}}}),a.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this);var n=e.freq.process(t).cells[0][0],s=e.band.process(t).cells[0][0],r=e.gain.process(t).cells[0][0];e.prevFreq===n&&e.prevband===s&&e.prevGain===r||(e.prevFreq=n,e.prevband=s,e.prevGain=r,e.biquad.setParams(n,s,r),e.plotFlush=!0),e.bypassed||e.biquad.process(this.cells[1],this.cells[2]),i.outputSignalAR(this)}return this};var o=new n(2048),h=t.Object.prototype.plot;a.plot=function(t){if(this._.plotFlush){var e=new s(this._.samplerate);e.setType(this.type),e.setParams(this.freq.valueOf(),this.band.valueOf(),this.gain.valueOf());var i=new Float32Array(o.length);i[0]=1,e.process(i,i),o.forward(i);var n,r,a,u,l,c,f,p,d=new Float32Array(512),v=.5*this._.samplerate,m=new Float32Array(512);for(o.getFrequencyData(m),n=0;n<512;++n)a=20*Math.pow(v/20,n/512),r=a/(v/m.length),u=0|r,l=r-u,0===u?f=c=p=m[u]:(c=m[u-1],f=m[u],p=(1-l)*c+l*f),d[n]=p;this._.plotData=d,this._.plotFlush=null}return h.call(this,t)},i.register("biquad",e),i.register("lowpass",function(t){return new e(t).set("type","lowpass")}),i.register("highpass",function(t){return new e(t).set("type","highpass")}),i.register("bandpass",function(t){return new e(t).set("type","bandpass")}),i.register("lowshelf",function(t){return new e(t).set("type","lowshelf")}),i.register("highshelf",function(t){return new e(t).set("type","highshelf")}),i.register("peaking",function(t){return new e(t).set("type","peaking")}),i.register("notch",function(t){return new e(t).set("type","notch")}),i.register("allpass",function(t){return new e(t).set("type","allpass")}),i.alias("lpf","lowpass"),i.alias("hpf","highpass"),i.alias("bpf","bandpass"),i.alias("bef","notch"),i.alias("brf","notch"),i.alias("apf","allpass")}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this);var n=this._;n.pitch=t(1),n.samplerate=44100,n.channels=0,n.bufferMix=null,n.buffer=[],n.isLooped=!1,n.isReversed=!1,n.duration=0,n.currentTime=0,n.currentTimeObj=null,n.phase=0,n.phaseIncr=0,n.onended=i.make_onended(this,0),n.onlooped=r(this)}var i=t.fn,n=t.modules.Scissor.Tape,s=function(t){return i.isSignalArray(t)||t instanceof Float32Array};i.extend(e);var r=function(t){return function(){var e=t._;e.phase>=e.buffer[0].length?e.phase=0:e.phase<0&&(e.phase=e.buffer[0].length+e.phaseIncr),t._.emit("looped")}},a=e.prototype,o=function(e){var i=this._;if("object"===(void 0===e?"undefined":_typeof(e))){var r,a=[];s(e)?(a[0]=e,1):"object"===(void 0===e?"undefined":_typeof(e))&&(e instanceof t.Object?e=e.buffer:e instanceof n&&(e=e.getBuffer()),Array.isArray(e.buffer)?s(e.buffer[0])&&(s(e.buffer[1])&&s(e.buffer[2])?(2,a=e.buffer):(1,a=[e.buffer[0]])):s(e.buffer)&&(1,a=[e.buffer]),"number"==typeof e.samplerate&&(r=e.samplerate)),a.length&&(r>0&&(i.samplerate=e.samplerate),i.bufferMix=null,i.buffer=a,i.phase=0,i.phaseIncr=i.samplerate/t.samplerate,i.duration=1e3*i.buffer[0].length/i.samplerate,i.currentTime=0,i.plotFlush=!0,this.reverse(i.isReversed))}};Object.defineProperties(a,{buffer:{set:o,get:function(){var t=this._;return{samplerate:t.samplerate,channels:t.channels,buffer:t.buffer}}},pitch:{set:function(e){this._.pitch=t(e)},get:function(){return this._.pitch}},isLooped:{get:function(){return this._.isLooped}},isReversed:{get:function(){return this._.isReversed}},samplerate:{get:function(){return this._.samplerate}},duration:{get:function(){return this._.duration}},currentTime:{set:function(e){if("number"==typeof e){var i=this._;0<=e&&e<=i.duration&&(i.phase=e/1e3*i.samplerate,i.currentTime=e)}else e instanceof t.Object?this._.currentTimeObj=e:null===e&&(this._.currentTimeObj=null)},get:function(){return this._.currentTimeObj?this._.currentTimeObj:this._.currentTime}}}),a.clone=function(){var t=this._,e=i.clone(this);return t.buffer.length&&o.call(e,{buffer:t.buffer,samplerate:t.samplerate,channels:t.channels}),e.loop(t.isLooped),e.reverse(t.isReversed),e},a.slice=function(e,n){var s=this._,r=t(s.originkey),a=s.isReversed;if(s.buffer.length){if(e="number"==typeof e?.001*e*s.samplerate|0:0,n="number"==typeof n?.001*n*s.samplerate|0:s.buffer[0].length,e>n){var h=e;e=n,n=h,a=!a}2===s.channels?o.call(r,{buffer:[i.pointer(s.buffer[0],e,n-e),i.pointer(s.buffer[1],e,n-e),i.pointer(s.buffer[2],e,n-e)],samplerate:s.samplerate}):o.call(r,{buffer:i.pointer(s.buffer[0],e,n-e),samplerate:s.samplerate}),r.playbackState=i.PLAYING_STATE}return r.loop(s.isLooped),r.reverse(s.isReversed),r},a.reverse=function(t){var e=this._;return e.isReversed=!!t,e.isReversed?(e.phaseIncr>0&&(e.phaseIncr*=-1),0===e.phase&&e.buffer.length&&(e.phase=e.buffer[0].length+e.phaseIncr)):e.phaseIncr<0&&(e.phaseIncr*=-1),this},a.loop=function(t){return this._.isLooped=!!t,this},a.bang=function(t){return this.playbackState=!1===t?i.FINISHED_STATE:i.PLAYING_STATE,this._.phase=0,this._.emit("bang"),this},a.process=function(t){var e=this._;if(!e.buffer.length)return this;if(this.tickID!==t){this.tickID=t;var n,s,r,a=this.cells[1],o=this.cells[2],h=e.phase,u=e.cellsize;if(2===e.channels?(s=e.buffer[1],r=e.buffer[2]):s=r=e.buffer[0],e.currentTimeObj){var l,c=e.currentTimeObj.process(t).cells[0],f=.001*e.samplerate;for(n=0;n<u;++n)l=c[n],h=l*f,a[n]=s[0|h]||0,o[n]=r[0|h]||0;e.phase=h,e.currentTime=l}else{var p=e.pitch.process(t).cells[0][0],d=e.phaseIncr*p;for(n=0;n<u;++n)a[n]=s[0|h]||0,o[n]=r[0|h]||0,h+=d;h>=s.length?e.isLooped?i.nextTick(e.onlooped):i.nextTick(e.onended):h<0&&(e.isLooped?i.nextTick(e.onlooped):i.nextTick(e.onended)),e.phase=h,e.currentTime+=i.currentTimeIncr}i.outputSignalAR(this)}return this};var h=t.Object.prototype.plot;a.plot=function(t){var e,i,n=this._;if(n.plotFlush){2===n.channels?(e=n.buffer[1],i=n.buffer[2]):e=i=n.buffer[0];for(var s=new Float32Array(2048),r=0,a=e.length/2048,o=0;o<2048;o++)s[o]=.5*(e[0|r]+i[0|r]),r+=a;n.plotData=s,n.plotFlush=null}return h.call(this,t)},i.register("buffer",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var s=new n(this._.samplerate);s.setDelayTime(20),s.setRate(4),s.depth=20,s.feedback=.2,s.mix=.33,this._.chorus=s}var i=t.fn,n=t.modules.Chorus;i.extend(e);var s=e.prototype;Object.defineProperties(s,{type:{set:function(t){this._.chorus.setDelayTime(t)},get:function(){return this._.chorus.wave}},delay:{set:function(t){.5<=t&&t<=80&&this._.chorus.setDelayTime(t)},get:function(){return this._.chorus.delayTime}},rate:{set:function(t){"number"==typeof t&&t>0&&this._.chorus.setRate(t)},get:function(){return this._.chorus.rate}},depth:{set:function(t){"number"==typeof t&&0<=t&&t<=100&&(t*=this._.samplerate/44100,this._.chorus.depth=t)},get:function(){return this._.chorus.depth}},fb:{set:function(t){"number"==typeof t&&-1<=t&&t<=1&&(this._.chorus.feedback=.99996*t)},get:function(){return this._.chorus.feedback}},mix:{set:function(e){this._.mix=t(e)},get:function(){return this._.mix}}}),s.process=function(t){var e=this._;return this.tickID!==t&&(this.tickID=t,i.inputSignalAR(this),e.bypassed||e.chorus.process(this.cells[1],this.cells[2]),i.outputSignalAR(this)),this},i.register("chorus",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e);var i=this._;i.min=-.8,i.max=.8}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{minmax:{set:function(t){var e=this._;"number"==typeof t&&(e.min=-Math.abs(t),e.max=-e.min)},get:function(){return this._.max}},min:{set:function(t){var e=this._;"number"==typeof t&&(e.max<t?e.max=t:e.min=t)},get:function(){return this._.min}},max:{set:function(t){var e=this._;"number"==typeof t&&(t<e.min?e.min=t:e.max=t)},get:function(){return this._.max}}}),n.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s,r=this.cells[1],a=this.cells[2],o=r.length,h=e.min,u=e.max;if(e.ar){for(i.inputSignalAR(this),n=0;n<o;++n)s=r[n],s<h?s=h:s>u&&(s=u),r[n]=s,s=a[n],s<h?s=h:s>u&&(s=u),a[n]=s;i.outputSignalAR(this)}else s=i.inputSignalKR(this),s<h?s=h:s>u&&(s=u),this.cells[0][0]=s,i.outputSignalKR(this)}return this},i.register("clip",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.prevThresh=-24,n.prevKnee=30,n.prevRatio=12,n.thresh=t(n.prevThresh),n.knee=t(n.prevKnee),n.ratio=t(n.prevRatio),n.postGain=6,n.reduction=0,n.attack=3,n.release=25,n.comp=new s(n.samplerate),n.comp.dbPostGain=n.postGain,n.comp.setAttackTime(.001*n.attack),n.comp.setReleaseTime(.001*n.release),n.comp.setPreDelayTime(6),n.comp.setParams(n.prevThresh,n.prevKnee,n.prevRatio)}var i=t.fn,n=t.timevalue,s=t.modules.Compressor;i.extend(e);var r=e.prototype;Object.defineProperties(r,{thresh:{set:function(e){this._.thresh=t(e)},get:function(){return this._.thresh}},thre:{set:function(e){this._.thresh=t(e)},get:function(){return this._.thre}},knee:{set:function(e){this._.kne=t(e)},get:function(){return this._.knee}},ratio:{set:function(e){this._.ratio=t(e)},get:function(){return this._.ratio}},gain:{set:function(t){"number"==typeof t&&(this._.comp.dbPostGain=t)},get:function(){return this._.comp.dbPostGain}},attack:{set:function(t){"string"==typeof t&&(t=n(t)),"number"==typeof t&&(t=t<0?0:1e3<t?1e3:t,this._.attack=t,this._.comp.setAttackTime(.001*t))},get:function(){return this._.attack}},release:{set:function(t){"string"==typeof t&&(t=n(t)),"number"==typeof t&&(t=t<0?0:1e3<t?1e3:t,this._.release=t,this._.comp.setReleaseTime(.001*t))},get:function(){return this._.release}},reduction:{get:function(){return this._.reduction}}}),r.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this);var n=e.thresh.process(t).cells[0][0],s=e.knee.process(t).cells[0][0],r=e.ratio.process(t).cells[0][0];e.prevThresh===n&&e.prevKnee===s&&e.prevRatio===r||(e.prevThresh=n,e.prevKnee=s,e.prevRatio=r,e.comp.setParams(n,s,r)),e.bypassed||(e.comp.process(this.cells[1],this.cells[2]),e.reduction=e.comp.meteringGain),i.outputSignalAR(this)}return this},i.register("comp",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.time=t(100),n.fb=t(.2),n.cross=t(!1),n.mix=.33,n.delay=new s(n.samplerate)}var i=t.fn,n=t.timevalue,s=t.modules.StereoDelay;i.extend(e);var r=e.prototype;Object.defineProperties(r,{time:{set:function(e){"string"==typeof e&&(e=n(e)),this._.time=t(e)},get:function(){return this._.time}},fb:{set:function(e){this._.fb=t(e)},get:function(){return this._.fb}},cross:{set:function(e){this._.cross=t(e)},get:function(){return this._.cross}},mix:{set:function(t){"number"==typeof t&&(t=t>1?1:t<0?0:t,this._.mix=t)},get:function(){return this._.mix}}}),r.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n=e.time.process(t).cells[0][0],s=e.fb.process(t).cells[0][0],r=0!==e.cross.process(t).cells[0][0],a=e.mix;e.prevTime===n&&e.prevFb===s&&e.prevCross===r&&e.prevMix===a||(e.prevTime=n,e.prevFb=s,e.prevCross=r,e.prevMix=a,e.delay.setParams(n,s,r,a)),i.inputSignalAR(this),e.bypassed||e.delay.process(this.cells[1],this.cells[2]),i.outputSignalAR(this)}return this},i.register("delay",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.pre=t(60),n.post=t(-18),n.x1L=n.x2L=n.y1L=n.y2L=0,n.x1R=n.x2R=n.y1R=n.y2R=0,n.b0=n.b1=n.b2=n.a1=n.a2=0,n.cutoff=0,n.Q=1,n.preScale=0,n.postScale=0}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{cutoff:{set:function(t){"number"==typeof t&&t>0&&(this._.cutoff=t)},get:function(){return this._.cutoff}},pre:{set:function(e){this._.pre=t(e)},get:function(){return this._.pre}},post:{set:function(e){this._.post=t(e)},get:function(){return this._.post}}}),n.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this);var n=-e.pre.process(t).cells[0][0],r=-e.post.process(t).cells[0][0];if(e.prevPreGain===n&&e.prevPostGain===r||(e.prevPreGain=n,e.prevPostGain=r,e.preScale=Math.pow(10,.05*-n),e.postScale=Math.pow(10,.05*-r)),!e.bypassed){var a,o,h,u,l,c=this.cells[1],f=this.cells[2],p=e.preScale,d=e.postScale;if(e.cutoff){e.prevCutoff!==e.cutoff&&(e.prevCutoff=e.cutoff,s(e));var v=e.x1L,m=e.x2L,g=e.y1L,b=e.y2L,_=e.x1R,y=e.x2R,w=e.y1R,x=e.y2R,k=e.b0,S=e.b1,A=e.b2,T=e.a1,I=e.a2;for(a=0,o=c.length;a<o;++a)u=c[a]*p,l=k*u+S*v+A*m-T*g-I*b,h=l*d,h<-1?h=-1:h>1&&(h=1),c[a]=h,m=v,v=u,b=g,g=l,u=f[a]*p,l=k*u+S*_+A*y-T*w-I*x,h=l*d,h<-1?h=-1:h>1&&(h=1),f[a]=h,y=_,_=u,x=w,w=l;e.x1L=v,e.x2L=m,e.y1L=g,e.y2L=b,e.x1R=_,e.x2R=y,e.y1R=w,e.y2R=x}else for(a=0,o=c.length;a<o;++a)h=c[a]*p*d,h<-1?h=-1:h>1&&(h=1),c[a]=h,h=f[a]*p*d,h<-1?h=-1:h>1&&(h=1),f[a]=h}i.outputSignalAR(this)}return this};var s=function(t){var e=2*Math.PI*t.cutoff/t.samplerate,i=Math.cos(e),n=Math.sin(e),s=n/(2*t.Q),r=1/(1+s);t.b0=.5*(1-i)*r,t.b1=1-i*r,t.b2=.5*(1-i)*r,t.a1=-2*i*r,t.a2=1-s*r};i.register("dist",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),this._.ar=!1}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s,r,a,o,h,u=this.nodes,l=this.cells[0],c=this.cells[1],f=this.cells[2],p=u.length,d=l.length;if(e.ar){if(u.length>0)for(u[0].process(t),a=u[0].cells[1],o=u[0].cells[2],c.set(a),f.set(o),n=1;n<p;++n)for(u[n].process(t),a=u[n].cells[1],o=u[n].cells[2],s=0;s<d;++s)h=a[s],c[s]=0===h?0:c[s]/h,h=o[s],f[s]=0===h?0:f[s]/h;else for(s=0;s<d;++s)c[s]=f[n]=0;i.outputSignalAR(this)}else{if(u.length>0)for(r=u[0].process(t).cells[0][0],n=1;n<p;++n)h=u[n].process(t).cells[0][0],r=0===h?0:r/h;else r=0;l[0]=r,i.outputSignalKR(this)}}return this},i.register("/",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e);var i=this._;i.env=new r(i.samplerate),i.env.setStep(i.cellsize),i.tmp=new n.SignalArray(i.cellsize),i.ar=!1,i.plotFlush=!0,i.onended=h(this),this.on("ar",o)}function i(t,e,i,n,s,r){var a=i;return"number"==typeof t[n]?a=t[n]:"number"==typeof t[s]?a=t[s]:r&&("string"==typeof t[n]?a=r(t[n]):"string"==typeof t[s]&&(a=r(t[s]))),a<e&&(a=e),a}var n=t.fn,s=t.timevalue,r=t.modules.Envelope,a=n.isDictionary;n.extend(e);var o=function(t){this._.env.setStep(t?1:this._.cellsize)},h=function(t){return function(){t._.emit("ended")}},u=e.prototype;Object.defineProperties(u,{table:{set:function(t){Array.isArray(t)&&(l.call(this,t),this._.plotFlush=!0)},get:function(){return this._.env.table}},curve:{set:function(t){this._.env.setCurve(t)},get:function(){return this._.env.curve}},releaseNode:{set:function(t){this._.env.setReleaseNode(t),this._.plotFlush=!0},get:function(){return this._.env.releaseNode+1}},loopNode:{set:function(t){this._.env.setLoopNode(t),this._.plotFlush=!0},get:function(){return this._.env.loopNode+1}}}),u.clone=function(){var t=n.clone(this);return t._.env=this._.env.clone(),t},u.reset=function(){return this._.env.reset(),this},u.release=function(){var t=this._;return t.env.release(),t.emit("released"),this},u.bang=function(){var t=this._;return t.env.reset(),t.env.status=r.StatusGate,t.emit("bang"),this},u.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var i,s=this.cells[1],r=this.cells[2],a=e.cellsize;if(this.nodes.length)n.inputSignalAR(this);else for(i=0;i<a;++i)s[i]=r[i]=1;var o,h=null;if(e.ar){var u=e.tmp;for(e.env.process(u),i=0;i<a;++i)s[i]*=u[i],r[i]*=u[i];h=e.env.emit}else{for(o=e.env.next(),i=0;i<a;++i)s[i]*=o,r[i]*=o;h=e.env.emit}n.outputSignalAR(this),h&&("ended"===h?n.nextTick(e.onended):this._.emit(h,e.value))}return this};var l=function(t){for(var e,i,n,a,o=this._.env,h=[t[0]||f],u=1,l=t.length;u<l;++u)e=t[u][0]||f,i=t[u][1],n=t[u][2],"number"!=typeof i&&(i="string"==typeof i?s(i):10),i<10&&(i=10),"number"==typeof n?(a=n,n=r.CurveTypeCurve):(n=r.CurveTypeDict[n]||null,a=0),h.push([e,i,n,a]);o.setTable(h)},c=t.Object.prototype.plot;u.plot=function(t){if(this._.plotFlush){var e,i,n=this._.env.clone(),s=n.getInfo(1e3),a=s.totalDuration,o=s.loopBeginTime,h=s.releaseBeginTime,u=new Float32Array(256),l=0,f=a/u.length,p=!1,d=.001*a*this._.samplerate|0;for(d/=u.length,n.setStep(d),n.status=r.StatusGate,e=0,i=u.length;e<i;++e)u[e]=n.next(),l+=f,!p&&l>=h&&(n.release(),p=!0);this._.plotData=u,this._.plotBefore=function(t,e,i,n,s){var r,u;o!==1/0&&h!==1/0&&(r=e+n*(o/a),u=e+n*(h/a),u-=r,t.fillStyle="rgba(224, 224, 224, 0.8)",t.fillRect(r,0,u,s)),h!==1/0&&(r=e+n*(h/a),u=n-r,t.fillStyle="rgba(212, 212, 212, 0.8)",t.fillRect(r,0,u,s))};var v=1/0,m=-1/0;for(e=0;e<i;++e)u[e]<v?v=u[e]:u[e]>m&&(m=u[e]);m<1&&(m=1),this._.plotRange=[v,m],this._.plotData=u,this._.plotFlush=null}return c.call(this,t)},n.register("env",e);var f=r.ZERO;n.register("perc",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,10,1e3,"r","releaseTime",s),h=i(n,f,1,"lv","level");return n.table=[f,[h,r],[f,o]],new e(t)}),n.register("adsr",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,10,300,"d","decayTime",s),h=i(n,f,.5,"s","sustainLevel"),u=i(n,10,1e3,"r","decayTime",s),l=i(n,f,1,"lv","level");return n.table=[f,[l,r],[h,o],[f,u]],n.releaseNode=3,new e(t)}),n.register("adshr",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,10,300,"d","decayTime",s),h=i(n,f,.5,"s","sustainLevel"),u=i(n,10,500,"h","holdTime",s),l=i(n,10,1e3,"r","decayTime",s),c=i(n,f,1,"lv","level");return n.table=[f,[c,r],[h,o],[h,u],[f,l]],new e(t)}),n.register("asr",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,f,.5,"s","sustainLevel"),h=i(n,10,1e3,"r","releaseTime",s);return n.table=[f,[o,r],[f,h]],n.releaseNode=2,new e(t)}),n.register("dadsr",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,100,"dl","delayTime",s),o=i(n,10,10,"a","attackTime",s),h=i(n,10,300,"d","decayTime",s),u=i(n,f,.5,"s","sustainLevel"),l=i(n,10,1e3,"r","relaseTime",s),c=i(n,f,1,"lv","level");return n.table=[f,[f,r],[c,o],[u,h],[f,l]],n.releaseNode=4,new e(t)}),n.register("ahdsfr",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,10,10,"h","holdTime",s),h=i(n,10,300,"d","decayTime",s),u=i(n,f,.5,"s","sustainLevel"),l=i(n,10,5e3,"f","fadeTime",s),c=i(n,10,1e3,"r","relaseTime",s),p=i(n,f,1,"lv","level");return n.table=[f,[p,r],[p,o],[u,h],[f,l],[f,c]],n.releaseNode=5,new e(t)}),n.register("linen",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,10,"a","attackTime",s),o=i(n,10,1e3,"s","sustainTime",s),h=i(n,10,1e3,"r","releaseTime",s),u=i(n,f,1,"lv","level");return n.table=[f,[u,r],[u,o],[f,h]],new e(t)}),n.register("env.tri",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,20,1e3,"dur","duration",s),o=i(n,f,1,"lv","level");return r*=.5,n.table=[f,[o,r],[f,r]],new e(t)}),n.register("env.cutoff",function(t){a(t[0])||t.unshift({});var n=t[0],r=i(n,10,100,"r","relaseTime",s),o=i(n,f,1,"lv","level");return n.table=[o,[f,r]],new e(t)})}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.biquads=new Array(7),n.plotBefore=a,n.plotRange=[-18,18],n.plotFlush=!0}var i=t.fn,n=t.modules.FFT,s=t.modules.Biquad,r={hpf:0,lf:1,lmf:2,mf:3,hmf:4,hf:5,lpf:6};i.extend(e);var a=function(t,e,i,n,s){t.lineWidth=1,t.strokeStyle="rgb(192, 192, 192)";for(var r=.5*this._.samplerate,a=1;a<=10;++a)for(var o=1;o<=4;o++){var h=a*Math.pow(10,o);if(!(h<=20||r<=h)){t.beginPath();var u=Math.log(h/20)/Math.log(r/20);u=.5+(u*n+e|0),t.moveTo(u,i),t.lineTo(u,i+s),t.stroke()}}var l=s/6;for(a=1;a<6;a++){t.beginPath();var c=.5+(i+a*l|0);t.moveTo(e,c),t.lineTo(e+n,c),t.stroke()}},o=e.prototype;Object.defineProperties(o,{params:{set:function(t){if("object"===(void 0===t?"undefined":_typeof(t)))for(var e=Object.keys(t),i=0,n=e.length;i<n;++i){var s=t[e[i]];Array.isArray(s)?this.setParams(e[i],s[0],s[1],s[2]):this.setParams(e[i])}}}}),o.setParams=function(t,e,i,n){var a=this._;if("string"==typeof t&&(t=r[t]),0<=t&&t<a.biquads.length){if(t|=0,"number"==typeof e&&"number"==typeof i){"number"!=typeof n&&(n=0);var o=a.biquads[t];if(!o)switch(o=a.biquads[t]=new s(a.samplerate),t){case 0:o.setType("highpass");break;case a.biquads.length-1:o.setType("lowpass");break;default:o.setType("peaking")}o.setParams(e,i,n)}else a.biquads[t]=void 0;a.plotFlush=!0}return this},o.getParams=function(t){var e=this._,i=e.biquads[0|t];if(i)return{freq:i.frequency,Q:i.Q,gain:i.gain}},o.process=function(t){var e=this._;if(this.tickID!==t){if(this.tickID=t,i.inputSignalAR(this),!e.bypassed)for(var n=this.cells[1],s=this.cells[2],r=e.biquads,a=0,o=r.length;a<o;++a)r[a]&&r[a].process(n,s);i.outputSignalAR(this)}return this};var h=new n(2048),u=t.Object.prototype.plot;o.plot=function(t){if(this._.plotFlush){var e=this._,i=new Float32Array(h.length);i[0]=1;for(var n=0,r=e.biquads.length;n<r;++n){var a=this.getParams(n);if(a){var o=new s(e.samplerate);0===n?o.setType("highpass"):n===r-1?o.setType("lowpass"):o.setType("peaking"),o.setParams(a.freq,a.Q,a.gain),o.process(i,i)}}h.forward(i);var l,c,f,p,d,v,m,g=new Float32Array(512),b=.5*e.samplerate,_=new Float32Array(512);for(h.getFrequencyData(_),n=0;n<512;++n)c=20*Math.pow(b/20,n/512),l=c/(b/_.length),f=0|l,p=l-f,0===f?v=d=m=_[f]:(d=_[f-1],v=_[f],m=(1-p)*d+p*v),g[n]=m;this._.plotData=g,this._.plotFlush=null}return u.call(this,t)},i.register("eq",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.listener(this),i.fixAR(this),this.real=new t.ChannelObject(this),this.imag=new t.ChannelObject(this),this.cells[3]=this.real.cell,this.cells[4]=this.imag.cell;var s=this._;s.fft=new n(2*s.cellsize),s.fftCell=new i.SignalArray(s.fft.length),s.prevCell=new i.SignalArray(s.cellsize),s.freqs=new i.SignalArray(s.fft.length>>1),s.plotFlush=!0,s.plotRange=[0,32],s.plotBarStyle=!0}var i=t.fn,n=t.modules.FFT;i.extend(e);var s=e.prototype;Object.defineProperties(s,{window:{set:function(t){this._.fft.setWindow(t)},get:function(){return this._.fft.windowName}},spectrum:{get:function(){return this._.fft.getFrequencyData(this._.freqs)}}}),s.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this),i.outputSignalAR(this);var n=this.cells[0],s=e.cellsize;e.fftCell.set(e.prevCell),e.fftCell.set(n,s),e.fft.forward(e.fftCell),e.prevCell.set(n),e.plotFlush=!0,this.cells[3].set(e.fft.real.subarray(0,s)),this.cells[4].set(e.fft.imag.subarray(0,s))}return this};var r=t.Object.prototype.plot;s.plot=function(t){return this._.plotFlush&&(this._.plotData=this.spectrum,this._.plotFlush=null),r.call(this,t)},i.register("fft",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this);var n=this._;n.freq=t(440),n.reg=32768,n.shortFlag=!1,n.phase=0,n.lastValue=0}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{shortFlag:{set:function(t){this._.shortFlag=!!t},get:function(){return this._.shortFlag}},freq:{set:function(e){this._.freq=t(e)},get:function(){return this._.freq}}}),n.process=function(t){var e=this._,i=this.cells[0];if(this.tickID!==t){this.tickID=t;var n,s,r=e.lastValue,a=e.phase,o=e.freq.process(t).cells[0][0]/e.samplerate,h=e.reg,u=e.mul,l=e.add;if(e.shortFlag)for(n=0,s=i.length;n<s;++n)a>=1&&(h>>=1,h|=(1&(h^h>>6))<<15,r=(1&h)-.5,a-=1),i[n]=r*u+l,a+=o;else for(n=0,s=i.length;n<s;++n)a>=1&&(h>>=1,h|=(1&(h^h>>1))<<15,r=(1&h)-.5,a-=1),i[n]=r*u+l,a+=o;e.reg=h,e.phase=a,e.lastValue=r}return this},i.register("fnoise",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this),this._.selected=0,this._.outputs=[]}var i=t.fn,n=function(){function e(e){t.Object.call(this,2,[]),i.fixAR(this),this._.parent=e}return i.extend(e),e.prototype.process=function(t){return this.tickID!==t&&(this.tickID=t,
this._.parent.process(t)),this},e}();i.extend(e);var s=e.prototype;Object.defineProperties(s,{selected:{set:function(t){var e=this._;if("number"==typeof t){e.selected=t;for(var n=e.outputs,s=0,r=n.length;s<r;++s)n[s]&&(n[s].cells[0].set(i.emptycell),n[s].cells[1].set(i.emptycell),n[s].cells[2].set(i.emptycell))}},get:function(){return this._.selected}}}),s.at=function(t){var e=this._,i=e.outputs[t];return i||(e.outputs[t]=i=new n(this)),i},s.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this),i.outputSignalAR(this);var n=e.outputs[e.selected];n&&(n.cells[0].set(this.cells[0]),n.cells[1].set(this.cells[1]),n.cells[2].set(this.cells[2]))}return this},i.register("gate",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this);var s=this._;s.fft=new n(2*s.cellsize),s.fftCell=new i.SignalArray(this._.fft.length),s.realBuffer=new i.SignalArray(this._.fft.length),s.imagBuffer=new i.SignalArray(this._.fft.length)}var i=t.fn,n=t.modules.FFT;i.extend(e);var s=e.prototype;Object.defineProperties(s,{real:{set:function(e){this._.real=t(e)},get:function(){return this._.real}},imag:{set:function(e){this._.imag=t(e)},get:function(){return this._.imag}}}),s.process=function(t){var e=this._;if(this.tickID!==t&&(this.tickID=t,e.real&&e.imag)){var n=this.cells[0],s=e.realBuffer,r=e.imagBuffer,a=e.real.process(t).cells[0],o=e.imag.process(t).cells[0];s.set(a),r.set(o),n.set(e.fft.inverse(s,r).subarray(0,e.cellsize)),i.outputSignalAR(this)}return this},i.register("ifft",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.timer(this),i.fixKR(this);var n=this._;n.interval=t(1e3),n.count=0,n.delay=0,n.timeout=1/0,n.currentTime=0,n.delaySamples=0,n.countSamples=0,n.onended=i.make_onended(this),this.on("start",s)}var i=t.fn,n=t.timevalue;i.extend(e);var s=function(){var t=this._;this.playbackState=i.PLAYING_STATE,t.delaySamples=t.samplerate*(.001*t.delay)|0,t.countSamples=t.count=t.currentTime=0};Object.defineProperty(s,"unremovable",{value:!0,writable:!1});var r=e.prototype;Object.defineProperties(r,{interval:{set:function(e){"string"==typeof e&&(e=n(e))<=0&&(e=0),this._.interval=t(e)},get:function(){return this._.interval}},delay:{set:function(t){"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>=0&&(this._.delay=t,this._.delaySamples=this._.samplerate*(.001*t)|0)},get:function(){return this._.delay}},count:{set:function(t){"number"==typeof t&&(this._.count=t)},get:function(){return this._.count}},timeout:{set:function(t){"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>=0&&(this._.timeout=t)},get:function(){return this._.timeout}},currentTime:{get:function(){return this._.currentTime}}}),r.bang=function(){var t=this._;return this.playbackState=i.PLAYING_STATE,t.delaySamples=t.samplerate*(.001*t.delay)|0,t.countSamples=t.count=t.currentTime=0,t.emit("bang"),this},r.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t,n.delaySamples>0&&(n.delaySamples-=e.length);var s=n.interval.process(t).cells[0][0];if(n.delaySamples<=0&&(n.countSamples-=e.length,n.countSamples<=0)){n.countSamples+=n.samplerate*s*.001|0;for(var r=this.nodes,a=n.count,o=a*n.mul+n.add,h=0,u=e.length;h<u;++h)e[h]=o;for(var l=0,c=r.length;l<c;++l)r[l].bang(a);n.count+=1}n.currentTime+=i.currentTimeIncr,n.currentTime>=n.timeout&&i.nextTick(n.onended)}return this},i.register("interval",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this);var n=this._,s=Math.ceil(Math.log(n.samplerate)*Math.LOG2E);n.buffersize=1<<s,n.buffermask=n.buffersize-1,n.buffer=new i.SignalArray(n.buffersize),n.time=0,n.readIndex=0,n.writeIndex=0}var i=t.fn,n=t.timevalue;i.extend(e);var s=e.prototype;Object.defineProperties(s,{time:{set:function(t){if("string"==typeof t&&(t=n(t)),"number"==typeof t&&t>0){var e=this._;e.time=t;var i=.001*t*e.samplerate|0;i>e.buffermask&&(i=e.buffermask),e.writeIndex=e.readIndex+i&e.buffermask}},get:function(){return this._.time}}}),s.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this);var n,s=this.cells[0],r=e.buffer,a=e.buffermask,o=e.readIndex,h=e.writeIndex,u=s.length;for(n=0;n<u;++n)r[h]=s[n],s[n]=r[o],o+=1,h=h+1&a;e.readIndex=o&a,e.writeIndex=h,i.outputSignalAR(this)}return this},i.register("lag",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e);var i=this._;i.input=0,i.value=0,i.prev=null,i.ar=!1,i.map=n}var i=t.fn;i.extend(e);var n=function(t){return t},s=e.prototype;Object.defineProperties(s,{input:{set:function(t){"number"==typeof t&&(this._.input=t)},get:function(){return this._.input}},map:{set:function(t){"function"==typeof t&&(this._.map=t)},get:function(){return this._.map}}}),s.bang=function(){return this._.prev=null,this._.emit("bang"),this},s.at=function(t){return this._.map?this._.map(t):0},s.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t;var s,r=this.nodes.length,a=e.length;if(n.ar&&r){i.inputSignalAR(this);var o=n.map;if(o)for(s=0;s<a;++s)e[s]=o(e[s]);n.value=e[a-1],i.outputSignalAR(this)}else{var h=r?i.inputSignalKR(this):n.input;n.map&&n.prev!==h&&(n.prev=h,n.value=n.map(h));var u=n.value*n.mul+n.add;for(s=0;s<a;++s)e[s]=u}}return this},i.register("map",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e)}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t;var s,r,a,o,h=this.nodes,u=h.length,l=e.length;if(n.ar){if(h.length>0)for(a=h[0].process(t).cells[0],e.set(a),s=1;s<u;++s)for(a=h[s].process(t).cells[0],r=0;r<l;++r)o=a[r],e[r]<o&&(e[r]=o);else for(r=0;r<l;++r)e[r]=0;i.outputSignalAR(this)}else{if(h.length>0)for(a=h[0].process(t).cells[0][0],s=1;s<u;++s)o=h[s].process(t).cells[0][0],a<o&&(a=o);else a=0;e[0]=a,i.outputSignalKR(this)}}return this},i.register("max",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var s=this._;s.src=s.func=null,s.bufferL=new i.SignalArray(n),s.bufferR=new i.SignalArray(n),s.readIndex=0,s.writeIndex=0,s.totalRead=0,s.totalWrite=0}if("browser"===t.envtype){var i=t.fn,n=4096,s=n-1;i.extend(e);var r=e.prototype;r.listen=function(e){var i=a[t.env];i&&(i.set.call(this,e),i.listen.call(this))},r.unlisten=function(){var e=a[t.env];e&&e.unlisten.call(this),this.cells[0].set(i.emptycell),this.cells[1].set(i.emptycell),this.cells[2].set(i.emptycell);for(var n=this._,s=n.bufferL,r=n.bufferR,o=0,h=s.length;o<h;++o)s[o]=r[o]=0},r.process=function(t){var e=this._;if(null===e.src)return this;if(this.tickID!==t){this.tickID=t;var n=e.cellsize;if(e.totalWrite>e.totalRead+n){var r=e.readIndex,a=r+n;this.cells[1].set(e.bufferL.subarray(r,a)),this.cells[2].set(e.bufferR.subarray(r,a)),e.readIndex=a&s,e.totalRead+=n}i.outputSignalAR(this)}return this};var a={};a.webkit={set:function(t){var e=this._;if(t instanceof HTMLMediaElement){var n=i._audioContext;e.src=n.createMediaElementSource(t)}},listen:function(){var t=this._,e=i._audioContext;t.gain=e.createGainNode(),t.gain.gain.value=0,t.node=e.createJavaScriptNode(1024,2,2),t.node.onaudioprocess=o(this),t.src.connect(t.node),t.node.connect(t.gain),t.gain.connect(e.destination)},unlisten:function(){var t=this._;t.src&&t.src.disconnect(),t.gain&&t.gain.disconnect(),t.node&&t.node.disconnect()}};var o=function(t){return function(e){var i=t._,n=e.inputBuffer,r=n.length,a=i.writeIndex;i.bufferL.set(n.getChannelData(0),a),i.bufferR.set(n.getChannelData(1),a),i.writeIndex=a+r&s,i.totalWrite+=r}};a.moz={set:function(t){var e=this._;t instanceof HTMLAudioElement&&(e.src=t,e.istep=e.samplerate/t.mozSampleRate)},listen:function(){var t=this._,e=t.bufferL,i=t.bufferR,n=0,r=0;2===t.src.mozChannels?(t.x=0,t.func=function(a){var o,h,u=t.writeIndex,l=t.totalWrite,c=a.frameBuffer,f=t.istep,p=c.length;for(o=t.x,h=0;h<p;h+=2){for(o+=f;o>0;)e[u]=.5*(c[h]+n),i[u]=.5*(c[h+1]+r),u=u+1&s,++l,o-=1;n=c[h],r=c[h+1]}t.x=o,t.writeIndex=u,t.totalWrite=l}):(t.x=0,t.func=function(r){var a,o,h=t.writeIndex,u=t.totalWrite,l=r.frameBuffer,c=t.istep,f=l.length;for(a=t.x,o=0;o<f;++o){for(a+=c;a>=0;)e[h]=i[h]=.5*(l[o]+n),h=h+1&s,++u,a-=1;n=l[o]}t.x=a,t.writeIndex=h,t.totalWrite=u}),t.src.addEventListener("MozAudioAvailable",t.func)},unlisten:function(){var t=this._;t.func&&(t.src.removeEventListener("MozAudioAvailable",t.func),t.func=null)}},i.register("mediastream",e)}}(timbre),function(t){function e(e){t.Object.call(this,1,e);var i=this._;i.midi=0,i.value=0,i.prev=null,i.a4=440,i.ar=!1}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{midi:{set:function(t){"number"==typeof t&&(this._.midi=t)},get:function(){return this._.midi}},a4:{set:function(t){"number"==typeof t&&(this._.a4=t,this._.prev=null)},get:function(){return this._.a4}}}),n.bang=function(){return this._.prev=null,this._.emit("bang"),this},n.at=function(t){return this._.a4*Math.pow(2,(t-69)/12)},n.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s=this.cells[0],r=this.nodes.length,a=s.length;if(e.ar&&r){i.inputSignalAR(this);var o=e.a4;for(n=0;n<a;++n)s[n]=o*Math.pow(2,(s[n]-69)/12);e.value=s[a-1],i.outputSignalAR(this)}else{var h=r?i.inputSignalKR(this):e.midi;e.prev!==h&&(e.prev=h,e.value=e.a4*Math.pow(2,(h-69)/12)),s[0]=e.value,i.outputSignalKR(this)}}return this},i.register("midicps",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e);var i=this._;i.midi=0,i.value=0,i.prev=null,i.range=12,i.ar=!1}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{midi:{set:function(t){"number"==typeof t&&(this._.midi=t)},get:function(){return this._.midi}},range:{set:function(t){"number"==typeof t&&t>0&&(this._.range=t)},get:function(){return this._.range}}}),n.bang=function(){return this._.prev=null,this._.emit("bang"),this},n.at=function(t){var e=this._;return Math.pow(2,t/e.range)},n.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t;var s,r=this.nodes.length,a=e.length;if(n.ar&&r){i.inputSignalAR(this);var o=n.range;for(s=0;s<a;++s)e[s]=Math.pow(2,e[s]/o);n.value=e[a-1],i.outputSignalAR(this)}else{var h=this.nodes.length?i.inputSignalKR(this):n.midi;n.prev!==h&&(n.prev=h,n.value=Math.pow(2,h/n.range));var u=n.value*n.mul+n.add;for(s=0;s<a;++s)e[s]=u}}return this},i.register("midiratio",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e)}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t;var s,r,a,o,h=this.nodes,u=h.length,l=e.length;if(n.ar){if(h.length>0)for(a=h[0].process(t).cells[0],e.set(a),s=1;s<u;++s)for(a=h[s].process(t).cells[0],r=0;r<l;++r)o=a[r],e[r]>o&&(e[r]=o);else for(r=0;r<l;++r)e[r]=0;i.outputSignalAR(this)}else{if(h.length>0)for(a=h[0].process(t).cells[0][0],s=1;s<u;++s)o=h[s].process(t).cells[0][0],a>o&&(a=o);else a=0;e[0]=a,i.outputSignalKR(this)}}return this},i.register("min",e)}(timbre),function(t){function e(e){t.Object.call(this,0,e),i.timer(this),i.fixKR(this);var s=this._;s.tracks=[],s.onended=i.make_onended(this),s.currentTime=0,this.on("start",n)}var i=t.fn;i.extend(e);var n=function(){var t=this,e=this._,n=e.mml;"string"==typeof n&&(n=[n]),e.tracks=n.map(function(e,i){return new r(t,i,e)}),e.currentTime=0,this.playbackState=i.PLAYING_STATE};Object.defineProperty(n,"unremoved",{value:!0,writable:!1});var s=e.prototype;Object.defineProperties(s,{mml:{set:function(t){var e=this._;("string"==typeof t||Array.isArray(t))&&(e.mml=t)},get:function(){return this._.mml}},currentTime:{get:function(){return this._.currentTime}}}),s.on=s.addListener=function(t,e){return"mml"===t&&(t="data",console.warn("A 'mml' event listener was deprecated in ~v13.03.01. use 'data' event listener.")),this._.events.on(t,e),this},s.once=function(t,e){return"mml"===t&&(t="data",console.warn("A 'mml' event listener was deprecated in ~v13.03.01. use 'data' event listener.")),this._.events.once(t,e),this},s.off=s.removeListener=function(t,e){return"mml"===t&&(t="data",console.warn("A 'mml' event listener was deprecated in ~v13.03.01. use 'data' event listener.")),this._.events.off(t,e),this},s.removeAllListeners=function(t){return"mml"===t&&(console.warn("A 'mml' event listener was deprecated in ~v13.03.01. use 'data' event listener."),t="data"),this._.events.removeAllListeners(t),this},s.listeners=function(t){return"mml"===t&&(console.warn("A 'mml' event listener was deprecated in ~v13.03.01. use 'data' event listener."),t="data"),this._.events.listeners(t)},s.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s,r=e.tracks;for(n=0,s=r.length;n<s;++n)r[n].process();for(;n--;)r[n].ended&&r.splice(n,1);0===r.length&&i.nextTick(e.onended),e.currentTime+=i.currentTimeIncr}return this},i.register("mml",e);var r=function(){function t(t,e,i){var n=this._={};n.sequencer=t,n.trackNum=e,n.commands=a(i),n.status={t:120,l:4,o:4,v:12,q:6,dot:0,tie:!1},n.index=0,n.queue=[],n.currentTime=0,n.queueTime=0,n.segnoIndex=-1,n.loopStack=[],n.prevNote=0,n.remain=1/0,this.ended=!1,r(this)}t.prototype.process=function(){var t=this._,a=t.sequencer,o=t.trackNum,h=t.queue,u=!1;if(h.length)for(;h[0][0]<=t.currentTime;){var l=t.queue.shift();switch(l[1]){case 1:e(a,o,l[2],l[3]),t.remain=l[4],r(this);break;case 2:n(a,o,l[2],l[3]);break;case 3:s(a,l[2]);break;case 0:u=!0}if(0===h.length)break}t.remain-=i.currentTimeIncr,u&&(this.ended=!0),t.currentTime+=i.currentTimeIncr};var e=function(t,e,i,n){var s,r,a,o=t.nodes;for(r=0,a=o.length;r<a;++r)s=o[r],s.noteOn?s.noteOn(i,n):s.bang();t._.emit("data","noteOn",{trackNum:e,noteNum:i,velocity:n})},n=function(t,e,i,n){var s,r,a,o=t.nodes;for(r=0,a=o.length;r<a;++r)s=o[r],s.noteOff?s.noteOff(i,n):s.release&&s.release();t._.emit("data","noteOff",{trackNum:e,noteNum:i,velocity:n})},s=function(t,e){t._.emit("data","command",{command:e})},r=function(t){var e,i,n,s,r,a,o,h,u,l,c,f,p,d=t._,v=(d.sequencer,d.commands),m=d.queue,g=d.index,b=d.status,_=d.queueTime,y=d.loopStack;u=[];t:for(;;){if(v.length<=g){if(!(d.segnoIndex>=0))break;g=d.segnoIndex}switch(e=v[g++],e.name){case"@":m.push([_,3,e.val]);break;case"n":if(i=b.t||120,null!==e.len?(s=e.len,r=e.dot||0):(s=b.l,r=e.dot||b.dot),o=60/i*(4/s)*1e3,o*=[1,1.5,1.75,1.875][r]||1,a=b.v<<3,b.tie){for(f=m.length;f--;)if(m[f][2]){m.splice(f,1);break}n=d.prevNote}else n=d.prevNote=e.val+12*(b.o+1),m.push([_,1,n,a,o]);if(s>0){if((h=b.q/8)<1)for(l=_+o*h,m.push([l,2,n,a]),f=0,p=u.length;f<p;++f)m.push([l,2,u[f],a]);if(u=[],_+=o,!b.tie)break t}else u.push(n);b.tie=!1;break;case"r":i=b.t||120,null!==e.len?(s=e.len,r=e.dot||0):(s=b.l,r=e.dot||b.dot),s>0&&(o=60/i*(4/s)*1e3,o*=[1,1.5,1.75,1.875][r]||1,_+=o);break;case"l":b.l=e.val,b.dot=e.dot;break;case"o":b.o=e.val;break;case"<":b.o<9&&(b.o+=1);break;case">":b.o>0&&(b.o-=1);break;case"v":b.v=e.val;break;case"(":b.v<15&&(b.v+=1);break;case")":b.v>0&&(b.v-=1);break;case"q":b.q=e.val;break;case"&":b.tie=!0;break;case"$":d.segnoIndex=g;break;case"[":y.push([g,null,null]);break;case"|":c=y[y.length-1],c&&1===c[1]&&(y.pop(),g=c[2]);break;case"]":c=y[y.length-1],c&&(null===c[1]&&(c[1]=e.count,c[2]=g),c[1]-=1,0===c[1]?y.pop():g=c[0]);break;case"t":b.t=null===e.val?120:e.val;break;case"EOF":m.push([_,0])}}d.index=g,d.queueTime=_},a=function(t){var e,i,n,s,r,a,h,u,l=new Array(t.length),c=[];for(r=0,a=o.length;r<a;++r)for(e=o[r],i=e.re;n=i.exec(t);){if(!l[n.index]){for(h=0,u=n[0].length;h<u;++h)l[n.index+h]=!0;s=e.func?e.func(n):{name:n[0]},s&&(s.index=n.index,s.origin=n[0],c.push(s))}for(;i.lastIndex<t.length&&l[i.lastIndex];)++i.lastIndex}return c.sort(function(t,e){return t.index-e.index}),c.push({name:"EOF"}),c},o=[{re:/@(\d*)/g,func:function(t){return{name:"@",val:t[1]||null}}},{re:/([cdefgab])([\-+]?)(\d*)(\.*)/g,func:function(t){return{name:"n",val:{c:0,d:2,e:4,f:5,g:7,a:9,b:11}[t[1]]+({"-":-1,"+":1}[t[2]]||0),len:""===t[3]?null:Math.min(0|t[3],64),dot:t[4].length}}},{re:/r(\d*)(\.*)/g,func:function(t){return{name:"r",len:""===t[1]?null:Math.max(1,Math.min(0|t[1],64)),dot:t[2].length}}},{re:/&/g},{re:/l(\d*)(\.*)/g,func:function(t){return{name:"l",val:""===t[1]?4:Math.min(0|t[1],64),dot:t[2].length}}},{re:/o([0-9])/g,func:function(t){return{name:"o",val:""===t[1]?4:0|t[1]}}},{re:/[<>]/g},{re:/v(\d*)/g,func:function(t){return{name:"v",val:""===t[1]?12:Math.min(0|t[1],15)}}},{re:/[()]/g},{re:/q([0-8])/g,func:function(t){return{name:"q",val:""===t[1]?6:Math.min(0|t[1],8)}}},{re:/\[/g},{re:/\|/g},{re:/\](\d*)/g,func:function(t){return{name:"]",count:0|t[1]||2}}},{re:/t(\d*)/g,func:function(t){return{name:"t",val:""===t[1]?null:Math.max(5,Math.min(0|t[1],300))}}},{re:/\$/g}];return t}()}(timbre),function(t){function e(e){t.Object.call(this,1,e)}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this._;return this.tickID!==t&&(this.tickID=t,e.ar?(i.inputSignalAR(this),i.outputSignalAR(this)):(this.cells[0][0]=i.inputSignalKR(this),i.outputSignalKR(this))),this},i.register("mono",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e)}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s,r,a,o,h=this.nodes,u=this.cells[0],l=this.cells[1],c=this.cells[2],f=h.length,p=u.length;if(e.ar){if(h.length>0)for(h[0].process(t),a=h[0].cells[1],o=h[0].cells[2],l.set(a),c.set(o),n=1;n<f;++n)for(h[n].process(t),a=h[n].cells[1],o=h[n].cells[2],s=0;s<p;++s)l[s]*=a[s],c[s]*=o[s];else for(s=0;s<p;++s)l[s]=c[s]=0;i.outputSignalAR(this)}else{if(h.length>0)for(r=h[0].process(t).cells[0][0],n=1;n<f;++n)r*=h[n].process(t).cells[0][0];else r=0;u[0]=r,i.outputSignalKR(this)}}return this},i.register("*",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e);var i=this._;i.defaultValue=0,i.index=0,i.dict={},i.ar=!1}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{dict:{set:function(t){if("object"===(void 0===t?"undefined":_typeof(t)))this._.dict=t;else if("function"==typeof t){for(var e={},i=0;i<128;++i)e[i]=t(i);this._.dict=e}},get:function(){return this._.dict}},defaultValue:{set:function(t){"number"==typeof t&&(this._.defaultValue=t)},get:function(){return this._.defaultValue}},index:{set:function(t){"number"==typeof t&&(this._.index=t)},get:function(){return this._.index}}}),n.at=function(t){var e=this._;return(e.dict[0|t]||e.defaultValue)*e.mul+e.add},n.clear=function(){return this._.dict={},this},n.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){this.tickID=t;var s,r,a,o=this.nodes.length,h=n.dict,u=n.defaultValue,l=n.mul,c=n.add,f=e.length;if(n.ar&&o){for(i.inputSignalAR(this),a=0;a<f;++a)s=e[a],s=s<0?s-.5|0:s+.5|0,e[a]=(h[s]||u)*l+c;i.outputSignalAR(this)}else for(s=this.nodes.length?i.inputSignalKR(this):n.index,s=s<0?s-.5|0:s+.5|0,r=(h[s]||u)*l+c,a=0;a<f;++a)e[a]=r}return this},i.register("ndict",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e)}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this.cells[0],i=this._;if(this.tickID!==t){this.tickID=t;var n,s,r,a=i.mul,o=i.add;if(i.ar)for(n=0,s=e.length;n<s;++n)e[n]=(2*Math.random()-1)*a+o;else for(r=(2*Math.random()+1)*a+o,n=0,s=e.length;n<s;++n)e[n]=r}return this},i.register("noise",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e);var n=this._;n.freq=t(440),n.phase=t(0),n.osc=new s(n.samplerate),n.tmp=new i.SignalArray(n.cellsize),n.osc.step=n.cellsize,this.once("init",r)}var i=t.fn,n=t.timevalue,s=t.modules.Oscillator;i.extend(e);var r=function(){var t=this._;this.wave||(this.wave="sin"),t.plotData=t.osc.wave,t.plotLineWidth=2,t.plotCyclic=!0,t.plotBefore=o},a=e.prototype;Object.defineProperties(a,{wave:{set:function(t){this._.osc.setWave(t)},get:function(){return this._.osc.wave}},freq:{set:function(e){"string"==typeof e&&(e=n(e),e=e<=0?0:1e3/e),this._.freq=t(e)},get:function(){return this._.freq}},phase:{set:function(e){this._.phase=t(e),this._.osc.feedback=!1},get:function(){return this._.phase}},fb:{set:function(e){this._.phase=t(e),this._.osc.feedback=!0},get:function(){return this._.phase}}}),a.clone=function(){var t=i.clone(this);return t._.osc=this._.osc.clone(),t._.freq=this._.freq,t._.phase=this._.phase,t},a.bang=function(){return this._.osc.reset(),this._.emit("bang"),this},a.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s=this.cells[1],r=this.cells[2],a=e.cellsize;if(this.nodes.length)i.inputSignalAR(this);else for(n=0;n<a;++n)s[n]=r[n]=1;var o=e.osc,h=e.freq.process(t).cells[0],u=e.phase.process(t).cells[0];if(o.frequency=h[0],o.phase=u[0],e.ar){var l=e.tmp;for(e.freq.isAr?e.phase.isAr?o.processWithFreqAndPhaseArray(l,h,u):o.processWithFreqArray(l,h):e.phase.isAr?o.processWithPhaseArray(l,u):o.process(l),n=0;n<a;++n)s[n]*=l[n],r[n]*=l[n]}else{var c=o.next();for(n=0;n<a;++n)s[n]*=c,r[n]*=c}i.outputSignalAR(this)}return this};var o;"browser"===t.envtype&&(o=function(t,e,i,n,s){var r=.5+(s>>1);t.strokeStyle="#ccc",t.lineWidth=1,t.beginPath(),t.moveTo(e,r+i),t.lineTo(e+n,r+i),t.stroke()}),i.register("osc",e),i.register("sin",function(t){return new e(t).set("wave","sin")}),i.register("cos",function(t){return new e(t).set("wave","cos")}),i.register("pulse",function(t){return new e(t).set("wave","pulse")}),i.register("tri",function(t){return new e(t).set("wave","tri")}),i.register("saw",function(t){return new e(t).set("wave","saw")}),i.register("fami",function(t){return new e(t).set("wave","fami")}),i.register("konami",function(t){return new e(t).set("wave","konami")}),i.register("+sin",function(t){return new e(t).set("wave","+sin").kr()}),i.register("+pulse",function(t){return new e(t).set("wave","+pulse").kr()}),i.register("+tri",function(t){return new e(t).set("wave","+tri").kr()}),i.register("+saw",function(t){return new e(t).set("wave","+saw").kr()}),i.alias("square","pulse")}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.pos=t(0),n.panL=.5,n.panR=.5}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{pos:{set:function(e){this._.pos=t(e)},get:function(){return this._.pos}}}),n.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n=e.pos.process(t).cells[0][0];if(e.prevPos!==n){e.panL=1-n,e.panR=e.prevPos=n}var s,r,a,o=this.nodes,h=this.cells[1],u=this.cells[2],l=o.length,c=h.length;if(l){for(a=o[0].process(t).cells[0],r=0;r<c;++r)h[r]=u[r]=a[r];for(s=1;s<l;++s)for(a=o[s].process(t).cells[0],r=0;r<c;++r)h[r]=u[r]+=a[r];var f=e.panL,p=e.panR;for(r=0;r<c;++r)h[r]=h[r]*f,u[r]=u[r]*p}else h.set(i.emptycell),u.set(i.emptycell);i.outputSignalAR(this)}return this},i.register("pan",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e);var i=this._;i.value=0,i.env=new r(i.samplerate),i.env.step=i.cellsize,i.curve="lin",i.counter=0,i.ar=!1,i.onended=a(this),this.on("ar",o)}var i=t.fn,n=t.timevalue,s=t.modules.Envelope,r=t.modules.EnvelopeValue;i.extend(e);var a=function(t,e){return function(){if("number"==typeof e)for(var i=t.cells[0],n=t.cells[1],s=t.cells[2],r=t._.env.value,a=0,o=n.length;a<o;++a)i[0]=n[a]=s[a]=r;t._.emit("ended")}},o=function(t){this._.env.step=t?1:this._.cellsize},h=e.prototype;Object.defineProperties(h,{value:{set:function(t){"number"==typeof t&&(this._.env.value=t)},get:function(){return this._.env.value}}}),h.to=function(t,e,i){var r=this._,a=r.env;if("string"==typeof e?e=n(e):void 0===e&&(e=0),void 0===i)r.counter=a.setNext(t,e,s.CurveTypeLin),r.curve="lin";else{var o=s.CurveTypeDict[i];r.counter=void 0===o?a.setNext(t,e,s.CurveTypeCurve,i):a.setNext(t,e,o),r.curve=i}return r.plotFlush=!0,this},h.setAt=function(t,e){var i=this._;return this.to(i.env.value,e,"set"),i.atValue=t,this},h.linTo=function(t,e){return this.to(t,e,"lin")},h.expTo=function(t,e){return this.to(t,e,"exp")},h.sinTo=function(t,e){return this.to(t,e,"sin")},h.welTo=function(t,e){return this.to(t,e,"wel")},h.sqrTo=function(t,e){return this.to(t,e,"sqr")},h.cubTo=function(t,e){return this.to(t,e,"cub")},h.cancel=function(){var t=this._;return t.counter=t.env.setNext(t.env.value,0,s.CurveTypeSet),this},h.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,r,a=this.cells[1],o=this.cells[2],h=e.cellsize,u=e.env,l=e.counter;if(this.nodes.length)i.inputSignalAR(this);else for(n=0;n<h;++n)a[n]=o[n]=1;if(l<=0&&("set"===e.curve?u.setNext(e.atValue,0,s.CurveTypeSet):u.setNext(u.value,0,s.CurveTypeSet),i.nextTick(e.onended),e.counter=1/0),e.ar){for(n=0;n<h;++n)r=u.next(),a[n]*=r,o[n]*=r;e.counter-=e.cellsize}else{for(r=u.next(),n=0;n<h;++n)a[n]*=r,o[n]*=r;e.counter-=1}i.outputSignalAR(this),e.value=r}return this};var u=t.Object.prototype.plot;h.plot=function(t){var e=this._;if(e.plotFlush){var i,n,a,o=new r(128),h=new Float32Array(128);if("set"===e.curve)for(n=100,a=h.length;n<a;++n)h[n]=1;else for(i=s.CurveTypeDict[e.curve],void 0===i?o.setNext(1,1e3,s.CurveTypeCurve,e.curve):o.setNext(1,1e3,i),n=0,a=h.length;n<a;++n)h[n]=o.next();e.plotData=h,e.plotRange=[0,1],e.plotFlush=null}return u.call(this,t)},i.register("param",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.freq=t("sin",{freq:1,add:1e3,mul:250}).kr(),n.Q=t(1),n.allpass=[],this.steps=2}var i=t.fn,n=t.modules.Biquad;i.extend(e);var s=e.prototype;Object.defineProperties(s,{freq:{set:function(t){this._.freq=t},get:function(){return this._.freq}},Q:{set:function(e){this._.Q=t(e)},get:function(){return this._.Q}},steps:{set:function(t){if("number"==typeof t){if(2===(t|=0)||4===t||8===t||12===t){var e=this._.allpass;if(e.length<t)for(var i=e.length;i<t;++i)e[i]=new n(this._.samplerate),e[i].setType("allpass")}this._.steps=t}},get:function(){return this._.steps}}}),s.process=function(t){var e=this._;if(this.tickID!==t){if(this.tickID=t,i.inputSignalAR(this),!e.bypassed){var n,s=this.cells[1],r=this.cells[2],a=e.freq.process(t).cells[0][0],o=e.Q.process(t).cells[0][0],h=e.steps;for(n=0;n<h;n+=2)e.allpass[n].setParams(a,o,0),e.allpass[n].process(s,r),e.allpass[n+1].setParams(a,o,0),e.allpass[n+1].process(s,r)}i.outputSignalAR(this)}return this},i.register("phaser",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this);for(var n=new Uint8Array(5),s=0;s<5;++s)n[s]=(Math.random()*(1<<30)|0)%25;this._.whites=n,this._.key=0}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this.cells[0],i=this._;if(this.tickID!==t){this.tickID=t;var n,s,r,a,o,h,u=i.key,l=i.whites,c=i.mul,f=i.add;for(n=0,s=e.length;n<s;++n){for(a=u++,u>31&&(u=0),h=a^u,r=o=0;r<5;++r)h&1<<r&&(l[r]=(Math.random()*(1<<30)|0)%25),o+=l[r];e[n]=(.01666666*o-1)*c+f}i.key=u}return this},i.register("pink",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),this._.freq=440,this._.buffer=null,this._.index=0}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{freq:{set:function(t){"number"==typeof t&&(t<0&&(t=0),this._.freq=t)},get:function(){return this._.freq}}}),n.bang=function(){for(var t=this._,e=t.freq,n=t.samplerate/e+.5|0,s=t.buffer=new i.SignalArray(n),r=0;r<n;++r)s[r]=2*Math.random()-1;return t.index=0,t.emit("bang"),this},n.process=function(t){var e=this.cells[0],i=this._;if(this.tickID!==t){this.tickID=t;var n=i.buffer;if(n){var s,r,a,o=n.length,h=i.index,u=i.mul,l=i.add,c=e.length;for(a=0;a<c;++a)s=h,r=n[h++],h>=o&&(h=0),r=.5*(r+n[h]),n[s]=r,e[a]=r*u+l;i.index=h}}return this},i.register("pluck",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.listener(this),i.fixAR(this);var n=this._;n.timeout=5e3,n.status=s,n.writeIndex=0,n.writeIndexIncr=1,n.currentTime=0,n.currentTimeIncr=1e3/n.samplerate,n.onended=r(this)}var i=t.fn,n=t.timevalue,s=0;i.extend(e);var r=function(t){return function(){var e=t._,n=new i.SignalArray(e.buffer.subarray(0,0|e.writeIndex));e.status=s,e.writeIndex=0,e.currentTime=0,e.emit("ended",{buffer:n,samplerate:e.samplerate})}},a=e.prototype;Object.defineProperties(a,{timeout:{set:function(t){"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>0&&(this._.timeout=t)},get:function(){return this._.timeout}},samplerate:{set:function(t){"number"==typeof t&&0<t&&t<=this._.samplerate&&(this._.samplerate=t)},get:function(){return this._.samplerate}},currentTime:{get:function(){return this._.currentTime}}}),a.start=function(){var e,n=this._;return n.status===s&&(e=.01*n.timeout*n.samplerate|0,(!n.buffer||n.buffer.length<e)&&(n.buffer=new i.SignalArray(e)),n.writeIndex=0,n.writeIndexIncr=n.samplerate/t.samplerate,n.currentTime=0,n.status=1,n.emit("start"),this.listen()),this},a.stop=function(){var t=this._;return 1===t.status&&(t.status=s,t.emit("stop"),i.nextTick(t.onended),this.unlisten()),this},a.bang=function(){return this._.status===s?this.srart():1===this._.status&&this.stop(),this._.emit("bang"),this},a.process=function(t){var e=this._,n=this.cells[0];if(this.tickID!==t){if(this.tickID=t,i.inputSignalAR(this),1===e.status){var s,r=n.length,a=e.buffer,o=e.timeout,h=e.writeIndex,u=e.writeIndexIncr,l=e.currentTime,c=e.currentTimeIncr;for(s=0;s<r;++s)a[0|h]=n[s],h+=u,l+=c,o<=l&&i.nextTick(e.onended);e.writeIndex=h,e.currentTime=l}i.outputSignalAR(this)}return this},i.register("record",e),i.alias("rec","record")}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this),this._.reverb=new n(this._.samplerate,this._.cellsize)}var i=t.fn,n=t.modules.Reverb;i.extend(e);var s=e.prototype;Object.defineProperties(s,{room:{set:function(t){"number"==typeof t&&(t=t>1?1:t<0?0:t,this._.reverb.setRoomSize(t))},get:function(){return this._.reverb.roomsize}},damp:{set:function(t){"number"==typeof t&&(t=t>1?1:t<0?0:t,this._.reverb.setDamp(t))},get:function(){return this._.reverb.damp}},mix:{set:function(t){"number"==typeof t&&(t=t>1?1:t<0?0:t,this._.reverb.wet=t)},get:function(){return this._.reverb.wet}}}),s.process=function(t){var e=this._;return this.tickID!==t&&(this.tickID=t,i.inputSignalAR(this),e.bypassed||e.reverb.process(this.cells[1],this.cells[2]),i.outputSignalAR(this)),this},i.register("reverb",e)}(timbre),function(t){function e(e){t.Object.call(this,0,e),i.timer(this),i.fixKR(this);var n=this._;n.queue=[],n.currentTime=0,n.maxRemain=1e3}var i=t.fn,n=t.timevalue;i.extend(e);var s=e.prototype;Object.defineProperties(s,{queue:{get:function(){return this._.queue}},remain:{get:function(){return this._.queue.length}},maxRemain:{set:function(t){"number"==typeof t&&t>0&&(this._.maxRemain=t)},get:function(){return this._.maxRemain}},isEmpty:{get:function(){return 0===this._.queue.length}},currentTime:{get:function(){return this._.currentTime}}}),s.sched=function(t,e,i){return"string"==typeof t&&(t=n(t)),"number"==typeof t&&this.schedAbs(this._.currentTime+t,e,i),this},s.schedAbs=function(e,i,s){if("string"==typeof e&&(e=n(e)),"number"==typeof e){var r=this._,a=r.queue;if(a.length>=r.maxRemain)return this;for(var o=a.length;o--&&!(a[o][0]<e););a.splice(o+1,0,[e,t(i),s])}return this},s.advance=function(t){return"string"==typeof t&&(t=n(t)),"number"==typeof t&&(this._.currentTime+=t),this},s.clear=function(){return this._.queue.splice(0),this},s.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n=null,s=e.queue;if(s.length)for(;s[0][0]<e.currentTime;){var r=e.queue.shift();if(r[1].bang(r[2]),n="sched",0===s.length){n="empty";break}}e.currentTime+=i.currentTimeIncr,n&&e.emit(n)}return this},i.register("schedule",e),i.alias("sched","schedule")}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.listener(this),i.fixAR(this);var n=this._;n.samples=0,n.writeIndex=0,n.plotFlush=!0,this.once("init",s)}var i=t.fn,n=t.timevalue;i.extend(e);var s=function(){this._.buffer||(this.size=1024),this._.interval||(this.interval=1e3)},r=e.prototype;Object.defineProperties(r,{size:{set:function(t){var e=this._;if(!e.buffer&&"number"==typeof t){var n=t<64?64:t>2048?2048:t;e.buffer=new i.SignalArray(n),e.reservedinterval&&(this.interval=e.reservedinterval,e.reservedinterval=null)}},get:function(){return this._.buffer.length}},interval:{set:function(t){var e=this._;"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>0&&(e.buffer?(e.interval=t,e.samplesIncr=.001*t*e.samplerate/e.buffer.length,e.samplesIncr<1&&(e.samplesIncr=1)):e.reservedinterval=t)},get:function(){return this._.interval}},buffer:{get:function(){return this._.buffer}}
}),r.bang=function(){for(var t=this._,e=t.buffer,i=0,n=e.length;i<n;++i)e[i]=0;return t.samples=0,t.writeIndex=0,this._.emit("bang"),this},r.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this),i.outputSignalAR(this);var n,s=this.cells[0],r=e.cellsize,a=e.samples,o=e.samplesIncr,h=e.buffer,u=e.writeIndex,l=!1,c=h.length;for(n=0;n<r;++n)a<=0&&(h[u++]=s[n],u>=c&&(u=0),l=e.plotFlush=!0,a+=o),--a;e.samples=a,e.writeIndex=u,l&&this._.emit("data")}return this};var a=t.Object.prototype.plot;r.plot=function(t){var e=this._;if(e.plotFlush){for(var i=e.buffer,n=i.length-1,s=new Float32Array(i.length),r=e.writeIndex,o=0,h=i.length;o<h;o++)s[o]=i[++r&n];e.plotData=s,e.plotFlush=null}return a.call(this,t)},i.register("scope",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),s.fixAR(this);var i=this._;i.numberOfInputs=0,i.numberOfOutputs=0,i.bufferSize=0,i.bufferMask=0,i.duration=0,i.inputBufferL=null,i.inputBufferR=null,i.outputBufferL=null,i.outputBufferR=null,i.onaudioprocess=null,i.index=0,this.once("init",r)}function i(t,e){this.samplerate=t._.samplerate,this.length=t._.bufferSize,this.duration=t._.duration,this.numberOfChannels=e.length,this.getChannelData=function(t){return e[t]}}function n(e){var n=e._;this.node=e,this.playbackTime=t.currentTime,2===n.numberOfInputs?this.inputBuffer=new i(e,[n.inputBufferL,n.inputBufferR]):this.inputBuffer=new i(e,[n.inputBufferL]),2===n.numberOfOutputs?this.outputBuffer=new i(e,[n.outputBufferL,n.outputBufferR]):this.outputBuffer=new i(e,[n.outputBufferL])}var s=t.fn;s.extend(e);var r=function(){var t=this._;0===t.numberOfInputs&&(this.numberOfInputs=1),0===t.numberOfOutputs&&(this.numberOfOutputs=1),0===t.bufferSize&&(this.bufferSize=1024)},a=e.prototype;Object.defineProperties(a,{numberOfInputs:{set:function(t){var e=this._;0===e.numberOfInputs&&(e.numberOfInputs=2===t?2:1)},get:function(){return this._.numberOfInputs}},numberOfOutputs:{set:function(t){var e=this._;0===e.numberOfOutputs&&(e.numberOfOutputs=2===t?2:1)},get:function(){return this._.numberOfOutputs}},bufferSize:{set:function(t){var e=this._;0===e.bufferSize&&-1!==[256,512,1024,2048,4096,8192,16384].indexOf(t)&&(e.bufferSize=t,e.bufferMask=t-1,e.duration=t/e.samplerate,e.inputBufferL=new s.SignalArray(t),e.inputBufferR=new s.SignalArray(t),e.outputBufferL=new s.SignalArray(t),e.outputBufferR=new s.SignalArray(t))},get:function(){return this._.bufferSize}},onaudioprocess:{set:function(t){"function"==typeof t&&(this._.onaudioprocess=t)},get:function(){return this._.onaudioprocess}}}),a.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var i,r=e.cellsize,a=e.bufferMask,o=e.index,h=o+r,u=this.cells[1],l=this.cells[2];if(s.inputSignalAR(this),2===e.numberOfInputs)e.inputBufferL.set(u,o),e.inputBufferR.set(l,o);else{i=e.inputBufferL;for(var c=0;c<r;c++)i[o+c]=.5*(u[c]+l[c])}u.set(e.outputBufferL.subarray(o,h)),l.set(e.outputBufferR.subarray(o,h)),e.index=h&a,0===e.index&&e.onaudioprocess&&(e.onaudioprocess(new n(this)),1===e.numberOfOutputs&&e.outputBufferR.set(e.outputBufferL)),s.outputSignalAR(this)}return this},s.register("script",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),this._.selected=0,this._.background=!1}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{selected:{set:function(t){"number"==typeof t&&(this._.selected=t,this.cells[1].set(i.emptycell),this.cells[2].set(i.emptycell))},get:function(){return this._.selected}},background:{set:function(t){this._.background=!!t},get:function(){return this._.background}}}),n.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s=this.nodes,r=s.length;if(e.background)for(n=0;n<r;++n)s[n].process(t);var a=s[e.selected];a&&(e.background||a.process(t),this.cells[1].set(a.cells[1]),this.cells[2].set(a.cells[2])),i.outputSignalAR(this)}return this},i.register("selector",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.listener(this),i.fixAR(this);var n=this._;n.status=r,n.samples=0,n.samplesIncr=0,n.writeIndex=0,n.plotFlush=!0,n.plotRange=[0,32],n.plotBarStyle=!0,this.once("init",a)}var i=t.fn,n=t.timevalue,s=t.modules.FFT,r=0;i.extend(e);var a=function(){var t=this._;t.fft||(this.size=512),t.interval||(this.interval=500)},o=e.prototype;Object.defineProperties(o,{size:{set:function(t){var e=this._;if(!e.fft&&"number"==typeof t){var n=t<256?256:t>2048?2048:t;e.fft=new s(n),e.buffer=new i.SignalArray(e.fft.length),e.freqs=new i.SignalArray(e.fft.length>>1),e.reservedwindow&&(e.fft.setWindow(e.reservedwindow),e.reservedwindow=null),e.reservedinterval&&(this.interval=e.reservedinterval,e.reservedinterval=null)}},get:function(){return this._.buffer.length}},window:{set:function(t){this._.fft.setWindow(t)},get:function(){return this._.fft.windowName}},interval:{set:function(t){var e=this._;"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>0&&(e.buffer?(e.interval=t,e.samplesIncr=.001*t*e.samplerate,e.samplesIncr<e.buffer.length&&(e.samplesIncr=e.buffer.length,e.interval=1e3*e.samplesIncr/e.samplerate)):e.reservedinterval=t)},get:function(){return this._.interval}},spectrum:{get:function(){return this._.fft.getFrequencyData(this._.freqs)}},real:{get:function(){return this._.fft.real}},imag:{get:function(){return this._.fft.imag}}}),o.bang=function(){return this._.samples=0,this._.writeIndex=0,this._.emit("bang"),this},o.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t,i.inputSignalAR(this),i.outputSignalAR(this);var n,s,a=this.cells[0],o=a.length,h=e.status,u=e.samples,l=e.samplesIncr,c=e.writeIndex,f=e.buffer,p=f.length;for(n=0;n<o;++n)u<=0&&h===r&&(h=1,c=0,u+=l),1===h&&(f[c++]=a[n],p<=c&&(e.fft.forward(f),s=e.plotFlush=!0,h=r)),--u;e.samples=u,e.status=h,e.writeIndex=c,s&&this._.emit("data")}return this};var h=t.Object.prototype.plot;o.plot=function(t){return this._.plotFlush&&(this._.plotData=this.spectrum,this._.plotFlush=null),h.call(this,t)},i.register("spectrum",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),this._.ar=!1}var i=t.fn;i.extend(e),e.prototype.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n,s,r,a,o,h=this.nodes,u=this.cells[0],l=this.cells[1],c=this.cells[2],f=h.length,p=u.length;if(e.ar){if(h.length>0)for(h[0].process(t),a=h[0].cells[1],o=h[0].cells[2],l.set(a),c.set(o),n=1;n<f;++n)for(h[n].process(t),a=h[n].cells[1],o=h[n].cells[2],s=0;s<p;++s)l[s]-=a[s],c[s]-=o[s];else for(s=0;s<p;++s)l[s]=c[n]=0;i.outputSignalAR(this)}else{if(h.length>0)for(r=h[0].process(t).cells[0][0],n=1;n<f;++n)r-=h[n].process(t).cells[0][0];else r=0;u[0]=r,i.outputSignalKR(this)}}return this},i.register("-",e)}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;this.playbackState=i.FINISHED_STATE,n.poly=4,n.genList=[],n.genDict={},n.synthdef=null,n.remGen=r(this),n.onended=i.make_onended(this)}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{def:{set:function(t){"function"==typeof t&&(this._.synthdef=t)},get:function(){return this._.synthdef}},poly:{set:function(t){"number"==typeof t&&0<t&&t<=64&&(this._.poly=t)},get:function(){return this._.poly}}});var s=function(t,e){return function(){t._.remGen(e.gen)}},r=function(t){return function(e){var i=t._,n=i.genList.indexOf(e);-1!==n&&i.genList.splice(n,1),void 0!==e.noteNum&&(i.genDict[e.noteNum]=null)}},a=function(e,n,r,a){r|=0,r<=0?this.noteOff(this,e):r>127&&(r=127);var o=this._,h=o.genList,u=o.genDict,l=u[e];l&&o.remGen(l);var c={freq:n,noteNum:e,velocity:r,mul:.0078125*r};if(a)for(var f in a)c[f]=a[f];c.doneAction=s(this,c),(l=o.synthdef.call(this,c))instanceof t.Object&&(l.noteNum=e,h.push(l),u[e]=c.gen=l,this.playbackState=i.PLAYING_STATE,h.length>o.poly&&o.remGen(h[0]))},o=function(){for(var t=new Float32Array(128),e=0;e<128;++e)t[e]=440*Math.pow(2,1*(e-69)/12);return t}(),h=function(t){return t>0?Math.log(1*t/440)*Math.LOG2E*12+69:0};n.noteOn=function(t,e,i){var n=o[t]||440*Math.pow(2,(t-69)/12);return a.call(this,t+.5|0,n,e,i),this},n.noteOff=function(t){var e=this._.genDict[t];return e&&e.release&&e.release(),this},n.noteOnWithFreq=function(t,e,i){var n=h(t);return a.call(this,n+.5|0,t,e,i),this},n.noteOffWithFreq=function(t){var e=h(t);return this.noteOff(e+.5|0)},n.allNoteOff=function(){for(var t=this._.genList,e=0,i=t.length;e<i;++e)t[e].release&&t[e].release()},n.allSoundOff=function(){for(var t=this._,e=t.genList,i=t.genDict;e.length;)delete i[e.shift().noteNum]},n.synth=function(e){var n,r=this._,a=r.genList,o={};if(e)for(var h in e)o[h]=e[h];return o.doneAction=s(this,o),n=r.synthdef.call(this,o),n instanceof t.Object&&(a.push(n),o.gen=n,this.playbackState=i.PLAYING_STATE,a.length>r.poly&&r.remGen(a[0])),this},n.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){if(this.tickID=t,this.playbackState===i.PLAYING_STATE){var s,r,a,o,h,u,l=n.genList,c=this.cells[1],f=this.cells[2],p=e.length;if(l.length)for(s=l[0],s.process(t),c.set(s.cells[1]),f.set(s.cells[2]),r=1,a=l.length;r<a;++r)for(s=l[r],s.process(t),h=s.cells[1],u=s.cells[2],o=0;o<p;++o)c[o]+=h[o],f[o]+=u[o];else i.nextTick(n.onended)}i.outputSignalAR(this)}return this},i.register("SynthDef",e);var u={set:function(e){i.isDictionary(e)?"string"==typeof e.type&&(this._.env=e):e instanceof t.Object&&(this._.env=e)},get:function(){return this._.env}};i.register("OscGen",function(){var i={set:function(e){e instanceof t.Object&&(this._.osc=e)},get:function(){return this._.osc}},n={set:function(t){"string"==typeof t&&(this._.wave=t)},get:function(){return this._.wave}},s=function(e){var i,n,s,r,a=this._;return n=a.osc||null,s=a.env||{},r=s.type||"perc",n instanceof t.Object&&"function"==typeof n.clone&&(n=n.clone()),n||(n=t("osc",{wave:a.wave})),n.freq=e.freq,n.mul=n.mul*e.velocity/128,i=n,s instanceof t.Object?"function"==typeof s.clone&&(i=s.clone().append(i)):i=t(r,s,i),i.on("ended",e.doneAction).bang(),i};return function(t){var r=new e(t);return r._.wave="sin",Object.defineProperties(r,{env:u,osc:i,wave:n}),r.def=s,r}}()),i.register("PluckGen",function(){var i=function(e){var i,n,s,r=this._;return n=r.env||{},s=n.type||"perc",i=t("pluck",{freq:e.freq,mul:e.velocity/128}).bang(),n instanceof t.Object?"function"==typeof n.clone&&(i=n.clone().append(i)):i=t(s,n,i),i.on("ended",e.doneAction).bang(),i};return function(t){var n=new e(t);return Object.defineProperties(n,{env:u}),n.def=i,n}}())}(timbre),function(t){function e(e){t.Object.call(this,2,e),i.fixAR(this);var n=this._;n.isLooped=!1,n.onended=i.make_onended(this,0)}var i=t.fn,n=t.modules.Scissor,s=n.Tape,r=n.TapeStream,a=i.isSignalArray;i.extend(e);var o=e.prototype;Object.defineProperties(o,{tape:{set:function(e){e instanceof s?(this.playbackState=i.PLAYING_STATE,this._.tape=e,this._.tapeStream=new r(e,this._.samplerate),this._.tapeStream.isLooped=this._.isLooped):(e instanceof t.Object&&e.buffer&&(e=e.buffer),"object"===(void 0===e?"undefined":_typeof(e))&&Array.isArray(e.buffer)&&a(e.buffer[0])&&(this.playbackState=i.PLAYING_STATE,this._.tape=new n(e),this._.tapeStream=new r(this._.tape,this._.samplerate),this._.tapeStream.isLooped=this._.isLooped))},get:function(){return this._.tape}},isLooped:{get:function(){return this._.isLooped}},buffer:{get:function(){if(this._.tape)return this._.tape.getBuffer()}}}),o.loop=function(t){return this._.isLooped=!!t,this._.tapeStream&&(this._.tapeStream.isLooped=this._.isLooped),this},o.bang=function(){return this.playbackState=i.PLAYING_STATE,this._.tapeStream&&this._.tapeStream.reset(),this._.emit("bang"),this},o.getBuffer=function(){if(this._.tape)return this._.tape.getBuffer()},o.process=function(t){var e=this._;if(this.tickID!==t){this.tickID=t;var n=e.tapeStream;if(n){var s=this.cells[1],r=this.cells[2],a=n.fetch(s.length);s.set(a[0]),r.set(a[1]),this.playbackState===i.PLAYING_STATE&&n.isEnded&&i.nextTick(e.onended)}i.outputSignalAR(this)}return this},i.register("tape",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.timer(this);var n=this._;this.playbackState=i.FINISHED_STATE,n.task=[],n.i=0,n.j=0,n.imax=0,n.jmax=0,n.wait=0,n.count=0,n.args={},n.doNum=1,n.initFunc=i.nop,n.onended=a(this),this.on("start",r)}var i=t.fn,n=t.timevalue,s=t(function(){}).constructor;i.extend(e);var r=function(){var t,e=this._;this.playbackState=i.PLAYING_STATE,e.task=this.nodes.map(function(t){return t instanceof s&&t.func}).filter(function(t){return!!t}),e.i=e.j=0,e.imax=e.doNum,e.jmax=e.task.length,t=e.initFunc(),i.isDictionary(t)||(t={param:t}),e.args=t},a=function(t){return function(){t.playbackState=i.FINISHED_STATE;var e=t._,n=t.cells[0],s=t.cells[1],r=t.cells[2],a=e.args;if("number"==typeof a)for(var o=0,h=s.length;o<h;++o)n[0]=s[o]=r[o]=a;e.emit("ended",e.args)}},o=e.prototype;Object.defineProperties(o,{do:{set:function(t){"number"==typeof t&&t>0&&(this._.doNum=t===1/0?1/0:0|t)},get:function(){return this._.doNum}},init:{set:function(t){"function"==typeof t&&(this._.initFunc=t)},get:function(){return this._.initFunc}}}),o.bang=function(){var t=this._;return t.count=0,t.emit("bang"),this},o.wait=function(t){return"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>0&&(this._.count+=this._.samplerate*t*.001|0),this},o.process=function(t){var e,n=this.cells[0],s=this._;if(this.tickID!==t&&(this.tickID=t,s.i<s.imax)){for(;s.count<=0;){if(s.j>=s.jmax){if(++s.i>=s.imax){i.nextTick(s.onended);break}s.j=0}e=s.task[s.j++],e&&e.call(this,s.i,s.args)}s.count-=n.length}return this},i.register("task",e)}(timbre),function(t){function e(e){t.Object.call(this,0,e),i.timer(this),i.fixKR(this);var n=this._;this.playbackState=i.FINISHED_STATE,n.currentTime=0,n.samplesMax=0,n.samples=0,n.onended=i.make_onended(this),this.once("init",s),this.on("start",r)}var i=t.fn,n=t.timevalue;i.extend(e);var s=function(){this._.timeout||(this.timeout=1e3)},r=function(){this.playbackState=i.PLAYING_STATE};Object.defineProperty(r,"unremovable",{value:!0,writable:!1});var a=e.prototype;Object.defineProperties(a,{timeout:{set:function(t){var e=this._;"string"==typeof t&&(t=n(t)),"number"==typeof t&&t>=0&&(this.playbackState=i.PLAYING_STATE,e.timeout=t,e.samplesMax=e.samplerate*(.001*t)|0,e.samples=e.samplesMax)},get:function(){return this._.timeout}},currentTime:{get:function(){return this._.currentTime}}}),a.bang=function(){var t=this._;return this.playbackState=i.PLAYING_STATE,t.samples=t.samplesMax,t.currentTime=0,t.emit("bang"),this},a.process=function(t){var e=this.cells[0],n=this._;if(this.tickID!==t){if(this.tickID=t,n.samples>0&&(n.samples-=e.length),n.samples<=0){for(var s=this.nodes,r=0,a=s.length;r<a;++r)s[r].bang();i.nextTick(n.onended)}n.currentTime+=i.currentTimeIncr}return this},i.register("timeout",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e),i.fixAR(this),this._.curve=null}var i=t.fn;i.extend(e);var n=e.prototype;Object.defineProperties(n,{curve:{set:function(t){i.isSignalArray(t)&&(this._.curve=t)},get:function(){return this._.curve}}}),n.process=function(t){var e=this._;if(this.tickID!==t){if(this.tickID=t,i.inputSignalAR(this),e.curve){var n,s,r=this.cells[0],a=e.curve,o=a.length,h=e.cellsize;for(s=0;s<h;++s)n=.5*(r[s]+1)*o+.5|0,n<0?n=0:n>=o-1&&(n=o-1),r[s]=a[n]}i.outputSignalAR(this)}return this},i.register("waveshaper",e)}(timbre),function(t){function e(e){t.Object.call(this,1,e);var i=this._;i.inMin=0,i.inMax=1,i.outMin=0,i.outMax=1,i.ar=!1,this.once("init",n)}var i=t.fn;i.extend(e);var n=function(){this._.warp||(this.warp="linlin")},s=e.prototype;Object.defineProperties(s,{inMin:{set:function(t){"number"==typeof t&&(this._.inMin=t)},get:function(){return this._.inMin}},inMax:{set:function(t){"number"==typeof t&&(this._.inMax=t)},get:function(){return this._.inMax}},outMin:{set:function(t){"number"==typeof t&&(this._.outMin=t)},get:function(){return this._.outMin}},outMax:{set:function(t){"number"==typeof t&&(this._.outMax=t)},get:function(){return this._.outMax}},warp:{set:function(t){if("string"==typeof t){var e=r[t];e&&(this._.warp=e,this._.warpName=t)}},get:function(){return this._.warpName}}}),s.process=function(t){var e=this._,n=this.cells[0];if(this.tickID!==t){this.tickID=t;var s,r=e.inMin,a=e.inMax,o=e.outMin,h=e.outMax,u=e.warp,l=this.nodes.length,c=e.mul,f=e.add,p=n.length;if(e.ar&&l){for(i.inputSignalAR(this),s=0;s<p;++s)n[s]=u(n[s],r,a,o,h)*c+f;i.outputSignalAR(this)}else{var d=this.nodes.length?i.inputSignalKR(this):0,v=u(d,r,a,o,h)*c+f;for(s=0;s<p;++s)n[s]=v}}return this};var r={linlin:function(t,e,i,n,s){return t<e?n:t>i?s:i===e?n:(t-e)/(i-e)*(s-n)+n},linexp:function(t,e,i,n,s){return t<e?n:t>i?s:0===n?0:i===e?s:Math.pow(s/n,(t-e)/(i-e))*n},explin:function(t,e,i,n,s){return t<e?n:t>i?s:0===e?s:Math.log(t/e)/Math.log(i/e)*(s-n)+n},expexp:function(t,e,i,n,s){return t<e?n:t>i?s:0===e||0===n?0:Math.pow(s/n,Math.log(t/e)/Math.log(i/e))*n}};i.register("zmap",e)}(timbre)};
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],4:[function(require,module,exports){
function getValues(e){return"select-multiple"!==e.type?e.value:e.options&&e.options.length?Array.prototype.slice.call(e.options).reduce(function(e,t){return t.selected&&e.push(t.value||t.text),e},[])||void 0:e.value}module.exports=function(e){var t=Object.create(null);return Array.prototype.slice.call(e.querySelectorAll("input:not(:disabled), textarea:not(:disabled), select:not(:disabled)")).forEach(function(e){var o=e.name;if(o&&!(["file","reset","submit","button"].indexOf(e.type)>-1)&&(!(["checkbox","radio"].indexOf(e.type)>-1)||e.checked)){/\[\]$/.test(o)&&(o=o.slice(0,-2),void 0===t[o]&&(t[o]=[]));var l=getValues(e);void 0===t[o]?t[o]=l:"[object Array]"===Object.prototype.toString.call(t[o])?t[o].push(l):t[o]=[t[o],l]}}),t};
},{}],5:[function(require,module,exports){
function isEmpty(t){if(null==t)return!0;if("boolean"==typeof t)return!1;if("number"==typeof t)return 0===t;if("string"==typeof t)return 0===t.length;if("function"==typeof t)return 0===t.length;if(Array.isArray(t))return 0===t.length;if(t instanceof Error)return""===t.message;if(t.toString==toString)switch(t.toString()){case"[object File]":case"[object Map]":case"[object Set]":return 0===t.size;case"[object Object]":for(var r in t)if(has.call(t,r))return!1;return!0}return!1}var has=Object.prototype.hasOwnProperty,toString=Object.prototype.toString;module.exports=isEmpty;
},{}],6:[function(require,module,exports){
!function(e){var i=/iPhone/i,o=/iPod/i,t=/iPad/i,n=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,d=/Android/i,s=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,b=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,r=/Windows Phone/i,h=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,a=/BlackBerry/i,l=/BB10/i,p=/Opera Mini/i,f=/(CriOS|Chrome)(?=.*\bMobile\b)/i,u=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,c=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),w=function(e,i){return e.test(i)},v=function(e){var v=e||navigator.userAgent,A=v.split("[FBAN");if(void 0!==A[1]&&(v=A[0]),A=v.split("Twitter"),void 0!==A[1]&&(v=A[0]),this.apple={phone:w(i,v),ipod:w(o,v),tablet:!w(i,v)&&w(t,v),device:w(i,v)||w(o,v)||w(t,v)},this.amazon={phone:w(s,v),tablet:!w(s,v)&&w(b,v),device:w(s,v)||w(b,v)},this.android={phone:w(s,v)||w(n,v),tablet:!w(s,v)&&!w(n,v)&&(w(b,v)||w(d,v)),device:w(s,v)||w(b,v)||w(n,v)||w(d,v)},this.windows={phone:w(r,v),tablet:w(h,v),device:w(r,v)||w(h,v)},this.other={blackberry:w(a,v),blackberry10:w(l,v),opera:w(p,v),firefox:w(u,v),chrome:w(f,v),device:w(a,v)||w(l,v)||w(p,v)||w(u,v)||w(f,v)},this.seven_inch=w(c,v),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},A=function(){var e=new v;return e.Class=v,e};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=v:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=A():"function"==typeof define&&define.amd?define("isMobile",[],e.isMobile=A()):e.isMobile=A()}(this);
},{}],7:[function(require,module,exports){
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e,t,n){n=n||ue;var r,i,o=n.createElement("script");if(o.text=e,t)for(r in Te)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function r(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?he[ge.call(e)]||"object":typeof e}function i(e){var t=!!e&&"length"in e&&e.length,n=r(e);return!be(e)&&!we(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function a(e,t,n){return be(t)?Ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?Ce.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Ce.grep(e,function(e){return de.call(t,e)>-1!==n}):Ce.filter(t,e,n)}function s(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function u(e){var t={};return Ce.each(e.match(Oe)||[],function(e,n){t[n]=!0}),t}function l(e){return e}function c(e){throw e}function f(e,t,n,r){var i;try{e&&be(i=e.promise)?i.call(e).done(t).fail(n):e&&be(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}function p(){ue.removeEventListener("DOMContentLoaded",p),e.removeEventListener("load",p),Ce.ready()}function d(e,t){return t.toUpperCase()}function h(e){return e.replace(Ie,"ms-").replace(We,d)}function g(){this.expando=Ce.expando+g.uid++}function v(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:_e.test(e)?JSON.parse(e):e)}function y(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ze,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=v(n)}catch(e){}Be.set(e,t,n)}else n=void 0;return n}function m(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return Ce.css(e,t,"")},u=s(),l=n&&n[3]||(Ce.cssNumber[t]?"":"px"),c=e.nodeType&&(Ce.cssNumber[t]||"px"!==l&&+u)&&Xe.exec(Ce.css(e,t));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;a--;)Ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,Ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function x(e){var t,n=e.ownerDocument,r=e.nodeName,i=Ze[r];return i||(t=n.body.appendChild(n.createElement(r)),i=Ce.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),Ze[r]=i,i)}function b(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)r=e[o],r.style&&(n=r.style.display,t?("none"===n&&(i[o]=Fe.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&Je(r)&&(i[o]=x(r))):"none"!==n&&(i[o]="none",Fe.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}function w(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&o(e,t)?Ce.merge([e],n):n}function T(e,t){for(var n=0,r=e.length;n<r;n++)Fe.set(e[n],"globalEval",!t||Fe.get(t[n],"globalEval"))}function C(e,t,n,i,o){for(var a,s,u,l,c,f,p=t.createDocumentFragment(),d=[],h=0,g=e.length;h<g;h++)if((a=e[h])||0===a)if("object"===r(a))Ce.merge(d,a.nodeType?[a]:a);else if(it.test(a)){for(s=s||p.appendChild(t.createElement("div")),u=(tt.exec(a)||["",""])[1].toLowerCase(),l=rt[u]||rt._default,s.innerHTML=l[1]+Ce.htmlPrefilter(a)+l[2],f=l[0];f--;)s=s.lastChild;Ce.merge(d,s.childNodes),s=p.firstChild,s.textContent=""}else d.push(t.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(i&&Ce.inArray(a,i)>-1)o&&o.push(a);else if(c=Ye(a),s=w(p.appendChild(a),"script"),c&&T(s),n)for(f=0;a=s[f++];)nt.test(a.type||"")&&n.push(a);return p}function E(){return!0}function k(){return!1}function S(e,t){return e===N()==("focus"===t)}function N(){try{return ue.activeElement}catch(e){}}function A(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)A(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=k;else if(!i)return e;return 1===o&&(a=i,i=function(e){return Ce().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=Ce.guid++)),e.each(function(){Ce.event.add(this,t,i,r,n)})}function D(e,t,n){if(!n)return void(void 0===Fe.get(e,t)&&Ce.event.add(e,t,E));Fe.set(e,t,!1),Ce.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Fe.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(Ce.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=ce.call(arguments),Fe.set(this,t,o),r=n(this,t),this[t](),i=Fe.get(this,t),o!==i||r?Fe.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Fe.set(this,t,{value:Ce.event.trigger(Ce.extend(o[0],Ce.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})}function j(e,t){return o(e,"table")&&o(11!==t.nodeType?t:t.firstChild,"tr")?Ce(e).children("tbody")[0]||e:e}function q(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function L(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function H(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Fe.hasData(e)&&(o=Fe.access(e),a=Fe.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)Ce.event.add(t,i,l[i][n])}Be.hasData(e)&&(s=Be.access(e),u=Ce.extend({},s),Be.set(t,u))}}function O(e,t){var n=t.nodeName.toLowerCase();"input"===n&&et.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function P(e,t,r,i){t=fe.apply([],t);var o,a,s,u,l,c,f=0,p=e.length,d=p-1,h=t[0],g=be(h);if(g||p>1&&"string"==typeof h&&!xe.checkClone&&ct.test(h))return e.each(function(n){var o=e.eq(n);g&&(t[0]=h.call(this,n,o.html())),P(o,t,r,i)});if(p&&(o=C(t,e[0].ownerDocument,!1,e,i),a=o.firstChild,1===o.childNodes.length&&(o=a),a||i)){for(s=Ce.map(w(o,"script"),q),u=s.length;f<p;f++)l=o,f!==d&&(l=Ce.clone(l,!0,!0),u&&Ce.merge(s,w(l,"script"))),r.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,Ce.map(s,L),f=0;f<u;f++)l=s[f],nt.test(l.type||"")&&!Fe.access(l,"globalEval")&&Ce.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?Ce._evalUrl&&!l.noModule&&Ce._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):n(l.textContent.replace(ft,""),l,c))}return e}function R(e,t,n){for(var r,i=t?Ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||Ce.cleanData(w(r)),r.parentNode&&(n&&Ye(r)&&T(w(r,"script")),r.parentNode.removeChild(r));return e}function M(e,t,n){var r,i,o,a,s=e.style;return n=n||dt(e),n&&(a=n.getPropertyValue(t)||n[t],""!==a||Ye(e)||(a=Ce.style(e,t)),!xe.pixelBoxStyles()&&pt.test(a)&&ht.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function I(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function W(e){for(var t=e[0].toUpperCase()+e.slice(1),n=gt.length;n--;)if((e=gt[n]+t)in vt)return e}function $(e){var t=Ce.cssProps[e]||yt[e];return t||(e in vt?e:yt[e]=W(e)||e)}function F(e,t,n){var r=Xe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function B(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=Ce.css(e,n+Ve[a],!0,i)),r?("content"===n&&(u-=Ce.css(e,"padding"+Ve[a],!0,i)),"margin"!==n&&(u-=Ce.css(e,"border"+Ve[a]+"Width",!0,i))):(u+=Ce.css(e,"padding"+Ve[a],!0,i),"padding"!==n?u+=Ce.css(e,"border"+Ve[a]+"Width",!0,i):s+=Ce.css(e,"border"+Ve[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function _(e,t,n){var r=dt(e),i=!xe.boxSizingReliable()||n,o=i&&"border-box"===Ce.css(e,"boxSizing",!1,r),a=o,s=M(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(pt.test(s)){if(!n)return s;s="auto"}return(!xe.boxSizingReliable()&&o||"auto"===s||!parseFloat(s)&&"inline"===Ce.css(e,"display",!1,r))&&e.getClientRects().length&&(o="border-box"===Ce.css(e,"boxSizing",!1,r),(a=u in e)&&(s=e[u])),(s=parseFloat(s)||0)+B(e,t,n||(o?"border":"content"),a,r,s)+"px"}function z(e,t,n,r,i){return new z.prototype.init(e,t,n,r,i)}function U(){Ct&&(!1===ue.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(U):e.setTimeout(U,Ce.fx.interval),Ce.fx.tick())}function X(){return e.setTimeout(function(){Tt=void 0}),Tt=Date.now()}function V(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)n=Ve[r],i["margin"+n]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function G(e,t,n){for(var r,i=(J.tweeners[t]||[]).concat(J.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Y(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&Je(e),v=Fe.get(e,"fxshow");n.queue||(a=Ce._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,Ce.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],Et.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||Ce.style(e,r)}if((u=!Ce.isEmptyObject(t))||!Ce.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],l=v&&v.display,null==l&&(l=Fe.get(e,"display")),c=Ce.css(e,"display"),"none"===c&&(l?c=l:(b([e],!0),l=e.style.display||l,c=Ce.css(e,"display"),b([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===Ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(v?"hidden"in v&&(g=v.hidden):v=Fe.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&b([e],!0),p.done(function(){g||b([e]),Fe.remove(e,"fxshow");for(r in d)Ce.style(e,r,d[r])})),u=G(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}}function Q(e,t){var n,r,i,o,a;for(n in e)if(r=h(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=Ce.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function J(e,t,n){var r,i,o=0,a=J.prefilters.length,s=Ce.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Tt||X(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;a<u;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),o<1&&u?n:(u||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:Ce.extend({},t),opts:Ce.extend(!0,{specialEasing:{},easing:Ce.easing._default},n),originalProperties:t,originalOptions:n,startTime:Tt||X(),duration:n.duration,tweens:[],createTween:function(t,n){var r=Ce.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(Q(c,l.opts.specialEasing);o<a;o++)if(r=J.prefilters[o].call(l,e,c,l.opts))return be(r.stop)&&(Ce._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return Ce.map(c,G,l),be(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),Ce.fx.timer(Ce.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}function K(e){return(e.match(Oe)||[]).join(" ")}function Z(e){return e.getAttribute&&e.getAttribute("class")||""}function ee(e){return Array.isArray(e)?e:"string"==typeof e?e.match(Oe)||[]:[]}function te(e,t,n,i){var o;if(Array.isArray(t))Ce.each(t,function(t,r){n||Rt.test(e)?i(e,r):te(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==r(t))i(e,t);else for(o in t)te(e+"["+o+"]",t[o],n,i)}function ne(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(Oe)||[];if(be(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function re(e,t,n,r){function i(s){var u;return o[s]=!0,Ce.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||a||o[l]?a?!(u=l):void 0:(t.dataTypes.unshift(l),i(l),!1)}),u}var o={},a=e===Gt;return i(t.dataTypes[0])||!o["*"]&&i("*")}function ie(e,t){var n,r,i=Ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&Ce.extend(!0,e,r),e}function oe(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function ae(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if(s=i.split(" "),s[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}var se=[],ue=e.document,le=Object.getPrototypeOf,ce=se.slice,fe=se.concat,pe=se.push,de=se.indexOf,he={},ge=he.toString,ve=he.hasOwnProperty,ye=ve.toString,me=ye.call(Object),xe={},be=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},we=function(e){return null!=e&&e===e.window},Te={type:!0,src:!0,nonce:!0,noModule:!0},Ce=function(e,t){return new Ce.fn.init(e,t)},Ee=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ce.fn=Ce.prototype={jquery:"3.4.1",constructor:Ce,length:0,toArray:function(){return ce.call(this)},get:function(e){return null==e?ce.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Ce.each(this,e)},map:function(e){return this.pushStack(Ce.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(ce.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:pe,sort:se.sort,splice:se.splice},Ce.extend=Ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||be(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(Ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||Ce.isPlainObject(n)?n:{},i=!1,a[t]=Ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},Ce.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==ge.call(e))&&(!(t=le(e))||"function"==typeof(n=ve.call(t,"constructor")&&t.constructor)&&ye.call(n)===me)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){n(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(i(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Ee,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(i(Object(e))?Ce.merge(n,"string"==typeof e?[e]:e):pe.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:de.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,o,a=0,s=[];if(i(e))for(r=e.length;a<r;a++)null!=(o=t(e[a],a,n))&&s.push(o);else for(a in e)null!=(o=t(e[a],a,n))&&s.push(o);return fe.apply([],s)},guid:1,support:xe}),"function"==typeof Symbol&&(Ce.fn[Symbol.iterator]=se[Symbol.iterator]),Ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){he["[object "+t+"]"]=t.toLowerCase()});var ke=function(e){function t(e,t,n,r){var i,o,a,s,u,c,p,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:W)!==q&&j(t),t=t||q,H)){if(11!==h&&(u=ye.exec(e)))if(i=u[1]){if(9===h){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&M(t,a)&&a.id===i)return n.push(a),n}else{if(u[2])return J.apply(n,t.getElementsByTagName(e)),n;if((i=u[3])&&b.getElementsByClassName&&t.getElementsByClassName)return J.apply(n,t.getElementsByClassName(i)),n}if(b.qsa&&!U[e+" "]&&(!O||!O.test(e))&&(1!==h||"object"!==t.nodeName.toLowerCase())){if(p=e,d=t,1===h&&le.test(e)){for((s=t.getAttribute("id"))?s=s.replace(we,Te):t.setAttribute("id",s=I),c=E(e),o=c.length;o--;)c[o]="#"+s+" "+f(c[o]);p=c.join(","),d=me.test(e)&&l(t.parentNode)||t}try{return J.apply(n,d.querySelectorAll(p)),n}catch(t){U(e,!0)}finally{s===I&&t.removeAttribute("id")}}}return S(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[I]=!0,e}function i(e){var t=q.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ee(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function u(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function l(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function f(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=F++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[$,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(f=t[I]||(t[I]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===$&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function d(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function h(e,n,r){for(var i=0,o=n.length;i<o;i++)t(e,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[I]&&(i=v(i)),o&&!o[I]&&(o=v(o,a)),r(function(r,a,s,u){var l,c,f,p=[],d=[],v=a.length,y=r||h(t||"*",s.nodeType?[s]:s,[]),m=!e||!r&&t?y:g(y,p,e,s,u),x=n?o||(r?e:v||i)?[]:a:m;if(n&&n(m,x,s,u),i)for(l=g(x,d),i(l,[],s,u),c=l.length;c--;)(f=l[c])&&(x[d[c]]=!(m[d[c]]=f));if(r){if(o||e){if(o){for(l=[],c=x.length;c--;)(f=x[c])&&l.push(m[c]=f);o(null,x=[],l,u)}for(c=x.length;c--;)(f=x[c])&&(l=o?Z(r,f):p[c])>-1&&(r[l]=!(a[l]=f))}}else x=g(x===a?x.splice(v,x.length):x),o?o(null,a,x,u):J.apply(a,x)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return Z(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==N)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s<i;s++)if(n=w.relative[e[s].type])c=[p(d(c),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[I]){for(r=++s;r<i&&!w.relative[e[r].type];r++);return v(s>1&&d(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ae,"$1"),n,s<r&&y(e.slice(s,r)),r<i&&y(e=e.slice(r)),r<i&&f(e))}c.push(n)}return d(c)}function m(e,n){var i=n.length>0,o=e.length>0,a=function(r,a,s,u,l){var c,f,p,d=0,h="0",v=r&&[],y=[],m=N,x=r||o&&w.find.TAG("*",l),b=$+=null==m?1:Math.random()||.1,T=x.length;for(l&&(N=a===q||a||l);h!==T&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===q||(j(c),s=!H);p=e[f++];)if(p(c,a||q,s)){u.push(c);break}l&&($=b)}i&&((c=!p&&c)&&d--,r&&v.push(c))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(v,y,a,s);if(r){if(d>0)for(;h--;)v[h]||y[h]||(y[h]=Y.call(u));y=g(y)}J.apply(u,y),l&&!r&&y.length>0&&d+n.length>1&&t.uniqueSort(u)}return l&&($=b,N=m),v};return i?r(a):a}var x,b,w,T,C,E,k,S,N,A,D,j,q,L,H,O,P,R,M,I="sizzle"+1*new Date,W=e.document,$=0,F=0,B=n(),_=n(),z=n(),U=n(),X=function(e,t){return e===t&&(D=!0),0},V={}.hasOwnProperty,G=[],Y=G.pop,Q=G.push,J=G.push,K=G.slice,Z=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",te="[\\x20\\t\\r\\n\\f]",ne="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",re="\\["+te+"*("+ne+")(?:"+te+"*([*^$|!~]?=)"+te+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ne+"))|)"+te+"*\\]",ie=":("+ne+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+re+")*)|.*)\\)|)",oe=new RegExp(te+"+","g"),ae=new RegExp("^"+te+"+|((?:^|[^\\\\])(?:\\\\.)*)"+te+"+$","g"),se=new RegExp("^"+te+"*,"+te+"*"),ue=new RegExp("^"+te+"*([>+~]|"+te+")"+te+"*"),le=new RegExp(te+"|>"),ce=new RegExp(ie),fe=new RegExp("^"+ne+"$"),pe={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+re),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},de=/HTML$/i,he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,xe=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},we=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Te=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){j()},Ee=p(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{J.apply(G=K.call(W.childNodes),W.childNodes),G[W.childNodes.length].nodeType}catch(e){J={apply:G.length?function(e,t){Q.apply(e,K.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}b=t.support={},C=t.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!de.test(t||n&&n.nodeName||"HTML")},j=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:W;return r!==q&&9===r.nodeType&&r.documentElement?(q=r,L=q.documentElement,H=!C(q),W!==q&&(n=q.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),b.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=i(function(e){return e.appendChild(q.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=ve.test(q.getElementsByClassName),b.getById=i(function(e){return L.appendChild(e).id=I,!q.getElementsByName||!q.getElementsByName(I).length}),b.getById?(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n=t.getElementById(e);return n?[n]:[]}}):(w.filter.ID=function(e){var t=e.replace(xe,be);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&H){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),w.find.TAG=b.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):b.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=b.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&H)return t.getElementsByClassName(e)},P=[],O=[],(b.qsa=ve.test(q.querySelectorAll))&&(i(function(e){L.appendChild(e).innerHTML="<a id='"+I+"'></a><select id='"+I+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&O.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||O.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll("[id~="+I+"-]").length||O.push("~="),e.querySelectorAll(":checked").length||O.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||O.push(".#.+[+~]")}),i(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=q.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&O.push("name"+te+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&O.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&O.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),O.push(",.*:")})),(b.matchesSelector=ve.test(R=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){b.disconnectedMatch=R.call(e,"*"),R.call(e,"[s!='']:x"),P.push("!=",ie)}),O=O.length&&new RegExp(O.join("|")),P=P.length&&new RegExp(P.join("|")),t=ve.test(L.compareDocumentPosition),M=t||ve.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!b.sortDetached&&t.compareDocumentPosition(e)===n?e===q||e.ownerDocument===W&&M(W,e)?-1:t===q||t.ownerDocument===W&&M(W,t)?1:A?Z(A,e)-Z(A,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===q?-1:t===q?1:i?-1:o?1:A?Z(A,e)-Z(A,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===W?-1:u[r]===W?1:0},q):q},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==q&&j(e),b.matchesSelector&&H&&!U[n+" "]&&(!P||!P.test(n))&&(!O||!O.test(n)))try{var r=R.call(e,n);if(r||b.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){U(n,!0)}return t(n,q,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==q&&j(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==q&&j(e);var n=w.attrHandle[t.toLowerCase()],r=n&&V.call(w.attrHandle,t.toLowerCase())?n(e,t,!H):void 0;return void 0!==r?r:b.attributes||!H?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.escape=function(e){return(e+"").replace(we,Te)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(D=!b.detectDuplicates,A=!b.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return A=null,e},T=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},w=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,be),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=B[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&B(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(oe," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(v){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){for(p=v,f=p[I]||(p[I]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===$&&l[1],x=d&&l[2],p=d&&v.childNodes[d];p=++d&&p&&p[g]||(x=d=0)||h.pop();)if(1===p.nodeType&&++x&&p===t){c[e]=[$,d,x];break}}else if(m&&(p=t,f=p[I]||(p[I]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),l=c[e]||[],d=l[0]===$&&l[1],x=d),!1===x)for(;(p=++d&&p&&p[g]||(x=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++x||(m&&(f=p[I]||(p[I]={}),c=f[p.uniqueID]||(f[p.uniqueID]={}),c[e]=[$,x]),p!==t)););return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(i=[e,e,"",n],w.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=Z(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(ae,"$1"));return i[I]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){
return e=e.replace(xe,be),function(t){return(t.textContent||T(t)).indexOf(e)>-1}}),lang:r(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(xe,be).toLowerCase(),function(t){var n;do{if(n=H?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===q.activeElement&&(!q.hasFocus||q.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[n<0?n+t:n]}),even:u(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},w.pseudos.nth=w.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[x]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(x);for(x in{submit:!0,reset:!0})w.pseudos[x]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(x);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,E=t.tokenize=function(e,n){var r,i,o,a,s,u,l,c=_[e+" "];if(c)return n?0:c.slice(0);for(s=e,u=[],l=w.preFilter;s;){r&&!(i=se.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),r=!1,(i=ue.exec(s))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ae," ")}),s=s.slice(r.length));for(a in w.filter)!(i=pe[a].exec(s))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),s=s.slice(r.length));if(!r)break}return n?s.length:s?t.error(e):_(e,u).slice(0)},k=t.compile=function(e,t){var n,r=[],i=[],o=z[e+" "];if(!o){for(t||(t=E(e)),n=t.length;n--;)o=y(t[n]),o[I]?r.push(o):i.push(o);o=z(e,m(i,r)),o.selector=e}return o},S=t.select=function(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,p=!r&&E(e=c.selector||e);if(n=n||[],1===p.length){if(o=p[0]=p[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&H&&w.relative[o[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(xe,be),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(xe,be),me.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&f(o)))return J.apply(n,r),n;break}}return(c||k(e,p))(r,t,!H,n,!t||me.test(e)&&l(t.parentNode)||t),n},b.sortStable=I.split("").sort(X).join("")===I,b.detectDuplicates=!!D,j(),b.sortDetached=i(function(e){return 1&e.compareDocumentPosition(q.createElement("fieldset"))}),i(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&i(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);Ce.find=ke,Ce.expr=ke.selectors,Ce.expr[":"]=Ce.expr.pseudos,Ce.uniqueSort=Ce.unique=ke.uniqueSort,Ce.text=ke.getText,Ce.isXMLDoc=ke.isXML,Ce.contains=ke.contains,Ce.escapeSelector=ke.escape;var Se=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&Ce(e).is(n))break;r.push(e)}return r},Ne=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Ae=Ce.expr.match.needsContext,De=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?Ce.find.matchesSelector(r,e)?[r]:[]:Ce.find.matches(e,Ce.grep(t,function(e){return 1===e.nodeType}))},Ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(Ce(e).filter(function(){for(t=0;t<r;t++)if(Ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)Ce.find(e,i[t],n);return r>1?Ce.uniqueSort(n):n},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&Ae.test(e)?Ce(e):e||[],!1).length}});var je,qe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||je,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:qe.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof Ce?t[0]:t,Ce.merge(this,Ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:ue,!0)),De.test(r[1])&&Ce.isPlainObject(t))for(r in t)be(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return i=ue.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):be(e)?void 0!==n.ready?n.ready(e):e(Ce):Ce.makeArray(e,this)}).prototype=Ce.fn,je=Ce(ue);var Le=/^(?:parents|prev(?:Until|All))/,He={children:!0,contents:!0,next:!0,prev:!0};Ce.fn.extend({has:function(e){var t=Ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(Ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&Ce(e);if(!Ae.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&Ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?de.call(Ce(e),this[0]):de.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Ce.uniqueSort(Ce.merge(this.get(),Ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Se(e,"parentNode")},parentsUntil:function(e,t,n){return Se(e,"parentNode",n)},next:function(e){return s(e,"nextSibling")},prev:function(e){return s(e,"previousSibling")},nextAll:function(e){return Se(e,"nextSibling")},prevAll:function(e){return Se(e,"previousSibling")},nextUntil:function(e,t,n){return Se(e,"nextSibling",n)},prevUntil:function(e,t,n){return Se(e,"previousSibling",n)},siblings:function(e){return Ne((e.parentNode||{}).firstChild,e)},children:function(e){return Ne(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(o(e,"template")&&(e=e.content||e),Ce.merge([],e.childNodes))}},function(e,t){Ce.fn[e]=function(n,r){var i=Ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=Ce.filter(r,i)),this.length>1&&(He[e]||Ce.uniqueSort(i),Le.test(e)&&i.reverse()),this.pushStack(i)}});var Oe=/[^\x20\t\r\n\f]+/g;Ce.Callbacks=function(e){e="string"==typeof e?u(e):Ce.extend({},e);var t,n,i,o,a=[],s=[],l=-1,c=function(){for(o=o||e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l<a.length;)!1===a[l].apply(n[0],n[1])&&e.stopOnFalse&&(l=a.length,n=!1);e.memory||(n=!1),t=!1,o&&(a=n?[]:"")},f={add:function(){return a&&(n&&!t&&(l=a.length-1,s.push(n)),function t(n){Ce.each(n,function(n,i){be(i)?e.unique&&f.has(i)||a.push(i):i&&i.length&&"string"!==r(i)&&t(i)})}(arguments),n&&!t&&c()),this},remove:function(){return Ce.each(arguments,function(e,t){for(var n;(n=Ce.inArray(t,a,n))>-1;)a.splice(n,1),n<=l&&l--}),this},has:function(e){return e?Ce.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return o=s=[],n||t||(a=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!i}};return f},Ce.extend({Deferred:function(t){var n=[["notify","progress",Ce.Callbacks("memory"),Ce.Callbacks("memory"),2],["resolve","done",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),0,"resolved"],["reject","fail",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return Ce.Deferred(function(t){Ce.each(n,function(n,r){var i=be(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&be(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){function o(t,n,r,i){return function(){var s=this,u=arguments,f=function(){var e,f;if(!(t<a)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");f=e&&("object"==typeof e||"function"==typeof e)&&e.then,be(f)?i?f.call(e,o(a,n,l,i),o(a,n,c,i)):(a++,f.call(e,o(a,n,l,i),o(a,n,c,i),o(a,n,l,n.notifyWith))):(r!==l&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},p=i?f:function(){try{f()}catch(e){Ce.Deferred.exceptionHook&&Ce.Deferred.exceptionHook(e,p.stackTrace),t+1>=a&&(r!==c&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?p():(Ce.Deferred.getStackHook&&(p.stackTrace=Ce.Deferred.getStackHook()),e.setTimeout(p))}}var a=0;return Ce.Deferred(function(e){n[0][3].add(o(0,e,be(i)?i:l,e.notifyWith)),n[1][3].add(o(0,e,be(t)?t:l)),n[2][3].add(o(0,e,be(r)?r:c))}).promise()},promise:function(e){return null!=e?Ce.extend(e,i):i}},o={};return Ce.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=ce.call(arguments),o=Ce.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?ce.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(f(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||be(i[n]&&i[n].then)))return o.then();for(;n--;)f(i[n],a(n),o.reject);return o.promise()}});var Pe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ce.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&Pe.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},Ce.readyException=function(t){e.setTimeout(function(){throw t})};var Re=Ce.Deferred();Ce.fn.ready=function(e){return Re.then(e).catch(function(e){Ce.readyException(e)}),this},Ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Ce.readyWait:Ce.isReady)||(Ce.isReady=!0,!0!==e&&--Ce.readyWait>0||Re.resolveWith(ue,[Ce]))}}),Ce.ready.then=Re.then,"complete"===ue.readyState||"loading"!==ue.readyState&&!ue.documentElement.doScroll?e.setTimeout(Ce.ready):(ue.addEventListener("DOMContentLoaded",p),e.addEventListener("load",p));var Me=function(e,t,n,i,o,a,s){var u=0,l=e.length,c=null==n;if("object"===r(n)){o=!0;for(u in n)Me(e,t,u,n[u],!0,a,s)}else if(void 0!==i&&(o=!0,be(i)||(s=!0),c&&(s?(t.call(e,i),t=null):(c=t,t=function(e,t,n){return c.call(Ce(e),n)})),t))for(;u<l;u++)t(e[u],n,s?i:i.call(e[u],u,t(e[u],n)));return o?e:c?t.call(e):l?t(e[0],n):a},Ie=/^-ms-/,We=/-([a-z])/g,$e=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};g.uid=1,g.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$e(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[h(t)]=n;else for(r in t)i[h(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][h(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){Array.isArray(t)?t=t.map(h):(t=h(t),t=t in r?[t]:t.match(Oe)||[]),n=t.length;for(;n--;)delete r[t[n]]}(void 0===t||Ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Ce.isEmptyObject(t)}};var Fe=new g,Be=new g,_e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ze=/[A-Z]/g;Ce.extend({hasData:function(e){return Be.hasData(e)||Fe.hasData(e)},data:function(e,t,n){return Be.access(e,t,n)},removeData:function(e,t){Be.remove(e,t)},_data:function(e,t,n){return Fe.access(e,t,n)},_removeData:function(e,t){Fe.remove(e,t)}}),Ce.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=Be.get(o),1===o.nodeType&&!Fe.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=h(r.slice(5)),y(o,r,i[r])));Fe.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){Be.set(this,e)}):Me(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=Be.get(o,e)))return n;if(void 0!==(n=y(o,e)))return n}else this.each(function(){Be.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Be.remove(this,e)})}}),Ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Fe.get(e,t),n&&(!r||Array.isArray(n)?r=Fe.access(e,t,Ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Ce.queue(e,t),r=n.length,i=n.shift(),o=Ce._queueHooks(e,t),a=function(){Ce.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Fe.get(e,n)||Fe.access(e,n,{empty:Ce.Callbacks("once memory").add(function(){Fe.remove(e,[t+"queue",n])})})}}),Ce.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?Ce.queue(this[0],e):void 0===t?this:this.each(function(){var n=Ce.queue(this,e,t);Ce._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&Ce.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=Ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(n=Fe.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var Ue=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Xe=new RegExp("^(?:([+-])=|)("+Ue+")([a-z%]*)$","i"),Ve=["Top","Right","Bottom","Left"],Ge=ue.documentElement,Ye=function(e){return Ce.contains(e.ownerDocument,e)},Qe={composed:!0};Ge.getRootNode&&(Ye=function(e){return Ce.contains(e.ownerDocument,e)||e.getRootNode(Qe)===e.ownerDocument});var Je=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&Ye(e)&&"none"===Ce.css(e,"display")},Ke=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i},Ze={};Ce.fn.extend({show:function(){return b(this,!0)},hide:function(){return b(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Je(this)?Ce(this).show():Ce(this).hide()})}});var et=/^(?:checkbox|radio)$/i,tt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,nt=/^$|^module$|\/(?:java|ecma)script/i,rt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};rt.optgroup=rt.option,rt.tbody=rt.tfoot=rt.colgroup=rt.caption=rt.thead,rt.th=rt.td;var it=/<|&#?\w+;/;!function(){var e=ue.createDocumentFragment(),t=e.appendChild(ue.createElement("div")),n=ue.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),xe.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",xe.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ot=/^key/,at=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,st=/^([^.]*)(?:\.(.+)|)/;Ce.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Fe.get(e);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&Ce.find.matchesSelector(Ge,i),n.guid||(n.guid=Ce.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==Ce&&Ce.event.triggered!==t.type?Ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Oe)||[""],l=t.length;l--;)s=st.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d&&(f=Ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=Ce.event.special[d]||{},c=Ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&Ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),Ce.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Fe.hasData(e)&&Fe.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Oe)||[""],l=t.length;l--;)if(s=st.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=Ce.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||Ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)Ce.event.remove(e,d+t[l],n,r,!0);Ce.isEmptyObject(u)&&Fe.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Ce.event.fix(e),u=new Array(arguments.length),l=(Fe.get(this,"events")||{})[s.type]||[],c=Ce.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Ce.event.handlers.call(this,s,l),t=0;(i=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((Ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)r=t[n],i=r.selector+" ",void 0===a[i]&&(a[i]=r.needsContext?Ce(i,this).index(l)>-1:Ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(Ce.Event.prototype,e,{enumerable:!0,configurable:!0,get:be(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Ce.expando]?e:new Ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return et.test(t.type)&&t.click&&o(t,"input")&&D(t,"click",E),!1},trigger:function(e){var t=this||e;return et.test(t.type)&&t.click&&o(t,"input")&&D(t,"click"),!0},_default:function(e){var t=e.target;return et.test(t.type)&&t.click&&o(t,"input")&&Fe.get(t,"click")||o(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},Ce.Event=function(e,t){if(!(this instanceof Ce.Event))return new Ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?E:k,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[Ce.expando]=!0},Ce.Event.prototype={constructor:Ce.Event,isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=E,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=E,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=E,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ot.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&at.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Ce.event.addProp),Ce.each({focus:"focusin",blur:"focusout"},function(e,t){Ce.event.special[e]={setup:function(){return D(this,e,S),!1},trigger:function(){return D(this,e),!0},delegateType:t}}),Ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Ce.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||Ce.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),Ce.fn.extend({on:function(e,t,n,r){return A(this,e,t,n,r)},one:function(e,t,n,r){return A(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,Ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=k),this.each(function(){Ce.event.remove(this,e,n,t)})}});var ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,lt=/<script|<style|<link/i,ct=/checked\s*(?:[^=]|=\s*.checked.)/i,ft=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Ce.extend({htmlPrefilter:function(e){return e.replace(ut,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=Ye(e);if(!(xe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ce.isXMLDoc(e)))for(a=w(s),o=w(e),r=0,i=o.length;r<i;r++)O(o[r],a[r]);if(t)if(n)for(o=o||w(e),a=a||w(s),r=0,i=o.length;r<i;r++)H(o[r],a[r]);else H(e,s);return a=w(s,"script"),a.length>0&&T(a,!u&&w(e,"script")),s},cleanData:function(e){for(var t,n,r,i=Ce.event.special,o=0;void 0!==(n=e[o]);o++)if($e(n)){if(t=n[Fe.expando]){if(t.events)for(r in t.events)i[r]?Ce.event.remove(n,r):Ce.removeEvent(n,r,t.handle);n[Fe.expando]=void 0}n[Be.expando]&&(n[Be.expando]=void 0)}}}),Ce.fn.extend({detach:function(e){return R(this,e,!0)},remove:function(e){return R(this,e)},text:function(e){return Me(this,function(e){return void 0===e?Ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){j(this,e).appendChild(e)}})},prepend:function(){return P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=j(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return P(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return P(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Ce.cleanData(w(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Ce.clone(this,e,t)})},html:function(e){return Me(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!lt.test(e)&&!rt[(tt.exec(e)||["",""])[1].toLowerCase()]){e=Ce.htmlPrefilter(e);try{for(;n<r;n++)t=this[n]||{},1===t.nodeType&&(Ce.cleanData(w(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return P(this,arguments,function(t){var n=this.parentNode;Ce.inArray(this,e)<0&&(Ce.cleanData(w(this)),n&&n.replaceChild(t,this))},e)}}),Ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Ce.fn[e]=function(e){for(var n,r=[],i=Ce(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),Ce(i[a])[t](n),pe.apply(r,n.get());return this.pushStack(r)}});var pt=new RegExp("^("+Ue+")(?!px)[a-z%]+$","i"),dt=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},ht=new RegExp(Ve.join("|"),"i");!function(){function t(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Ge.appendChild(u).appendChild(l);var t=e.getComputedStyle(l);r="1%"!==t.top,s=12===n(t.marginLeft),l.style.right="60%",a=36===n(t.right),i=36===n(t.width),l.style.position="absolute",o=12===n(l.offsetWidth/3),Ge.removeChild(u),l=null}}function n(e){return Math.round(parseFloat(e))}var r,i,o,a,s,u=ue.createElement("div"),l=ue.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",xe.clearCloneStyle="content-box"===l.style.backgroundClip,Ce.extend(xe,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),s},scrollboxSize:function(){return t(),o}}))}();var gt=["Webkit","Moz","ms"],vt=ue.createElement("div").style,yt={},mt=/^(none|table(?!-c[ea]).+)/,xt=/^--/,bt={position:"absolute",visibility:"hidden",display:"block"},wt={letterSpacing:"0",fontWeight:"400"};Ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=M(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=h(t),u=xt.test(t),l=e.style;if(u||(t=$(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];o=typeof n,"string"===o&&(i=Xe.exec(n))&&i[1]&&(n=m(e,t,i),o="number"),null!=n&&n===n&&("number"!==o||u||(n+=i&&i[3]||(Ce.cssNumber[s]?"":"px")),xe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=h(t);return xt.test(t)||(t=$(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],a&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=M(e,t,r)),"normal"===i&&t in wt&&(i=wt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),Ce.each(["height","width"],function(e,t){Ce.cssHooks[t]={get:function(e,n,r){if(n)return!mt.test(Ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?_(e,t,r):Ke(e,bt,function(){return _(e,t,r)})},set:function(e,n,r){var i,o=dt(e),a=!xe.scrollboxSize()&&"absolute"===o.position,s=a||r,u=s&&"border-box"===Ce.css(e,"boxSizing",!1,o),l=r?B(e,t,r,u,o):0;return u&&a&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-B(e,t,"border",!1,o)-.5)),l&&(i=Xe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=Ce.css(e,t)),F(e,n,l)}}}),Ce.cssHooks.marginLeft=I(xe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(M(e,"marginLeft"))||e.getBoundingClientRect().left-Ke(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),Ce.each({margin:"",padding:"",border:"Width"},function(e,t){Ce.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Ve[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(Ce.cssHooks[e+t].set=F)}),Ce.fn.extend({css:function(e,t){return Me(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=dt(e),i=t.length;a<i;a++)o[t[a]]=Ce.css(e,t[a],!1,r);return o}return void 0!==n?Ce.style(e,t,n):Ce.css(e,t)},e,t,arguments.length>1)}}),Ce.Tween=z,z.prototype={constructor:z,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||Ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(Ce.cssNumber[n]?"":"px")},cur:function(){var e=z.propHooks[this.prop];return e&&e.get?e.get(this):z.propHooks._default.get(this)},run:function(e){var t,n=z.propHooks[this.prop];return this.options.duration?this.pos=t=Ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):z.propHooks._default.set(this),this}},z.prototype.init.prototype=z.prototype,z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Ce.fx.step[e.prop]?Ce.fx.step[e.prop](e):1!==e.elem.nodeType||!Ce.cssHooks[e.prop]&&null==e.elem.style[$(e.prop)]?e.elem[e.prop]=e.now:Ce.style(e.elem,e.prop,e.now+e.unit)}}},z.propHooks.scrollTop=z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Ce.fx=z.prototype.init,Ce.fx.step={};var Tt,Ct,Et=/^(?:toggle|show|hide)$/,kt=/queueHooks$/;Ce.Animation=Ce.extend(J,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return m(n.elem,e,Xe.exec(t),n),n}]},tweener:function(e,t){be(e)?(t=e,e=["*"]):e=e.match(Oe);for(var n,r=0,i=e.length;r<i;r++)n=e[r],J.tweeners[n]=J.tweeners[n]||[],J.tweeners[n].unshift(t)},prefilters:[Y],prefilter:function(e,t){t?J.prefilters.unshift(e):J.prefilters.push(e)}}),Ce.speed=function(e,t,n){
var r=e&&"object"==typeof e?Ce.extend({},e):{complete:n||!n&&t||be(e)&&e,duration:e,easing:n&&t||t&&!be(t)&&t};return Ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in Ce.fx.speeds?r.duration=Ce.fx.speeds[r.duration]:r.duration=Ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){be(r.old)&&r.old.call(this),r.queue&&Ce.dequeue(this,r.queue)},r},Ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Je).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Ce.isEmptyObject(e),o=Ce.speed(t,n,r),a=function(){var t=J(this,Ce.extend({},e),o);(i||Fe.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=Ce.timers,a=Fe.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&kt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||Ce.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=Fe.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=Ce.timers,a=r?r.length:0;for(n.finish=!0,Ce.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),Ce.each(["toggle","show","hide"],function(e,t){var n=Ce.fn[t];Ce.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(V(t,!0),e,r,i)}}),Ce.each({slideDown:V("show"),slideUp:V("hide"),slideToggle:V("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Ce.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Ce.timers=[],Ce.fx.tick=function(){var e,t=0,n=Ce.timers;for(Tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||Ce.fx.stop(),Tt=void 0},Ce.fx.timer=function(e){Ce.timers.push(e),Ce.fx.start()},Ce.fx.interval=13,Ce.fx.start=function(){Ct||(Ct=!0,U())},Ce.fx.stop=function(){Ct=null},Ce.fx.speeds={slow:600,fast:200,_default:400},Ce.fn.delay=function(t,n){return t=Ce.fx?Ce.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=ue.createElement("input"),t=ue.createElement("select"),n=t.appendChild(ue.createElement("option"));e.type="checkbox",xe.checkOn=""!==e.value,xe.optSelected=n.selected,e=ue.createElement("input"),e.value="t",e.type="radio",xe.radioValue="t"===e.value}();var St,Nt=Ce.expr.attrHandle;Ce.fn.extend({attr:function(e,t){return Me(this,Ce.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Ce.removeAttr(this,e)})}}),Ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Ce.prop(e,t,n):(1===o&&Ce.isXMLDoc(e)||(i=Ce.attrHooks[t.toLowerCase()]||(Ce.expr.match.bool.test(t)?St:void 0)),void 0!==n?null===n?void Ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=Ce.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!xe.radioValue&&"radio"===t&&o(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Oe);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),St={set:function(e,t,n){return!1===t?Ce.removeAttr(e,n):e.setAttribute(n,n),n}},Ce.each(Ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=Nt[t]||Ce.find.attr;Nt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=Nt[a],Nt[a]=i,i=null!=n(e,t,r)?a:null,Nt[a]=o),i}});var At=/^(?:input|select|textarea|button)$/i,Dt=/^(?:a|area)$/i;Ce.fn.extend({prop:function(e,t){return Me(this,Ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Ce.propFix[e]||e]})}}),Ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Ce.isXMLDoc(e)||(t=Ce.propFix[t]||t,i=Ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=Ce.find.attr(e,"tabindex");return t?parseInt(t,10):At.test(e.nodeName)||Dt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),xe.optSelected||(Ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ce.propFix[this.toLowerCase()]=this}),Ce.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(be(e))return this.each(function(t){Ce(this).addClass(e.call(this,t,Z(this)))});if(t=ee(e),t.length)for(;n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(be(e))return this.each(function(t){Ce(this).removeClass(e.call(this,t,Z(this)))});if(!arguments.length)return this.attr("class","");if(t=ee(e),t.length)for(;n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+K(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=K(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):be(e)?this.each(function(n){Ce(this).toggleClass(e.call(this,n,Z(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=Ce(this),a=ee(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=Z(this),t&&Fe.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Fe.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+K(Z(n))+" ").indexOf(t)>-1)return!0;return!1}});var jt=/\r/g;Ce.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=be(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,Ce(this).val()):e,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=Ce.map(i,function(e){return null==e?"":e+""})),(t=Ce.valHooks[this.type]||Ce.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=Ce.valHooks[i.type]||Ce.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(jt,""):null==n?"":n)}}}),Ce.extend({valHooks:{option:{get:function(e){var t=Ce.find.attr(e,"value");return null!=t?t:K(Ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,a=e.selectedIndex,s="select-one"===e.type,u=s?null:[],l=s?a+1:i.length;for(r=a<0?l:s?a:0;r<l;r++)if(n=i[r],(n.selected||r===a)&&!n.disabled&&(!n.parentNode.disabled||!o(n.parentNode,"optgroup"))){if(t=Ce(n).val(),s)return t;u.push(t)}return u},set:function(e,t){for(var n,r,i=e.options,o=Ce.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=Ce.inArray(Ce.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Ce.each(["radio","checkbox"],function(){Ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Ce.inArray(Ce(e).val(),t)>-1}},xe.checkOn||(Ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),xe.focusin="onfocusin"in e;var qt=/^(?:focusinfocus|focusoutblur)$/,Lt=function(e){e.stopPropagation()};Ce.extend(Ce.event,{trigger:function(t,n,r,i){var o,a,s,u,l,c,f,p,d=[r||ue],h=ve.call(t,"type")?t.type:t,g=ve.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=r=r||ue,3!==r.nodeType&&8!==r.nodeType&&!qt.test(h+Ce.event.triggered)&&(h.indexOf(".")>-1&&(g=h.split("."),h=g.shift(),g.sort()),l=h.indexOf(":")<0&&"on"+h,t=t[Ce.expando]?t:new Ce.Event(h,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:Ce.makeArray(n,[t]),f=Ce.event.special[h]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!we(r)){for(u=f.delegateType||h,qt.test(u+h)||(a=a.parentNode);a;a=a.parentNode)d.push(a),s=a;s===(r.ownerDocument||ue)&&d.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=d[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||h,c=(Fe.get(a,"events")||{})[t.type]&&Fe.get(a,"handle"),c&&c.apply(a,n),(c=l&&a[l])&&c.apply&&$e(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=h,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(d.pop(),n)||!$e(r)||l&&be(r[h])&&!we(r)&&(s=r[l],s&&(r[l]=null),Ce.event.triggered=h,t.isPropagationStopped()&&p.addEventListener(h,Lt),r[h](),t.isPropagationStopped()&&p.removeEventListener(h,Lt),Ce.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=Ce.extend(new Ce.Event,n,{type:e,isSimulated:!0});Ce.event.trigger(r,null,t)}}),Ce.fn.extend({trigger:function(e,t){return this.each(function(){Ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return Ce.event.trigger(e,t,n,!0)}}),xe.focusin||Ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Ce.event.simulate(t,e.target,Ce.event.fix(e))};Ce.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Fe.access(r,t);i||r.addEventListener(e,n,!0),Fe.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Fe.access(r,t)-1;i?Fe.access(r,t,i):(r.removeEventListener(e,n,!0),Fe.remove(r,t))}}});var Ht=e.location,Ot=Date.now(),Pt=/\?/;Ce.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||Ce.error("Invalid XML: "+t),n};var Rt=/\[\]$/,Mt=/\r?\n/g,It=/^(?:submit|button|image|reset|file)$/i,Wt=/^(?:input|select|textarea|keygen)/i;Ce.param=function(e,t){var n,r=[],i=function(e,t){var n=be(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!Ce.isPlainObject(e))Ce.each(e,function(){i(this.name,this.value)});else for(n in e)te(n,e[n],t,i);return r.join("&")},Ce.fn.extend({serialize:function(){return Ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ce.prop(this,"elements");return e?Ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ce(this).is(":disabled")&&Wt.test(this.nodeName)&&!It.test(e)&&(this.checked||!et.test(e))}).map(function(e,t){var n=Ce(this).val();return null==n?null:Array.isArray(n)?Ce.map(n,function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}}):{name:t.name,value:n.replace(Mt,"\r\n")}}).get()}});var $t=/%20/g,Ft=/#.*$/,Bt=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ut=/^(?:GET|HEAD)$/,Xt=/^\/\//,Vt={},Gt={},Yt="*/".concat("*"),Qt=ue.createElement("a");Qt.href=Ht.href,Ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ht.href,type:"GET",isLocal:zt.test(Ht.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Yt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ie(ie(e,Ce.ajaxSettings),t):ie(Ce.ajaxSettings,e)},ajaxPrefilter:ne(Vt),ajaxTransport:ne(Gt),ajax:function(t,n){function r(t,n,r,s){var l,p,d,b,w,T=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",C.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=oe(h,C,r)),b=ae(h,b,C,l),l?(h.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(Ce.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(Ce.etag[o]=w)),204===t||"HEAD"===h.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,d=b.error,l=!d)):(d=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(n||T)+"",l?y.resolveWith(g,[p,T,C]):y.rejectWith(g,[C,T,d]),C.statusCode(x),x=void 0,f&&v.trigger(l?"ajaxSuccess":"ajaxError",[C,h,l?p:d]),m.fireWith(g,[C,T]),f&&(v.trigger("ajaxComplete",[C,h]),--Ce.active||Ce.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=Ce.ajaxSetup({},n),g=h.context||h,v=h.context&&(g.nodeType||g.jquery)?Ce(g):Ce.event,y=Ce.Deferred(),m=Ce.Callbacks("once memory"),x=h.statusCode||{},b={},w={},T="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=_t.exec(a);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(y.promise(C),h.url=((t||h.url||Ht.href)+"").replace(Xt,Ht.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Oe)||[""],null==h.crossDomain){l=ue.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Qt.protocol+"//"+Qt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=Ce.param(h.data,h.traditional)),re(Vt,h,n,C),c)return C;f=Ce.event&&h.global,f&&0==Ce.active++&&Ce.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ut.test(h.type),o=h.url.replace(Ft,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace($t,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(Pt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Bt,"$1"),d=(Pt.test(o)?"&":"?")+"_="+Ot+++d),h.url=o+d),h.ifModified&&(Ce.lastModified[o]&&C.setRequestHeader("If-Modified-Since",Ce.lastModified[o]),Ce.etag[o]&&C.setRequestHeader("If-None-Match",Ce.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Yt+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,C,h)||c))return C.abort();if(T="abort",m.add(h.complete),C.done(h.success),C.fail(h.error),i=re(Gt,h,n,C)){if(C.readyState=1,f&&v.trigger("ajaxSend",[C,h]),c)return C;h.async&&h.timeout>0&&(u=e.setTimeout(function(){C.abort("timeout")},h.timeout));try{c=!1,i.send(b,r)}catch(e){if(c)throw e;r(-1,e)}}else r(-1,"No Transport");return C},getJSON:function(e,t,n){return Ce.get(e,t,n,"json")},getScript:function(e,t){return Ce.get(e,void 0,t,"script")}}),Ce.each(["get","post"],function(e,t){Ce[t]=function(e,n,r,i){return be(n)&&(i=i||r,r=n,n=void 0),Ce.ajax(Ce.extend({url:e,type:t,dataType:i,data:n,success:r},Ce.isPlainObject(e)&&e))}}),Ce._evalUrl=function(e,t){return Ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){Ce.globalEval(e,t)}})},Ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(be(e)&&(e=e.call(this[0])),t=Ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return be(e)?this.each(function(t){Ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=be(e);return this.each(function(n){Ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Ce(this).replaceWith(this.childNodes)}),this}}),Ce.expr.pseudos.hidden=function(e){return!Ce.expr.pseudos.visible(e)},Ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Ce.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},Kt=Ce.ajaxSettings.xhr();xe.cors=!!Kt&&"withCredentials"in Kt,xe.ajax=Kt=!!Kt,Ce.ajaxTransport(function(t){var n,r;if(xe.cors||Kt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),Ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Ce.globalEval(e),e}}}),Ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Ce.ajaxTransport("script",function(e){if(e.crossDomain||e.scriptAttrs){var t,n;return{send:function(r,i){t=Ce("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),ue.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Zt=[],en=/(=)\?(?=&|$)|\?\?/;Ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Zt.pop()||Ce.expando+"_"+Ot++;return this[e]=!0,e}}),Ce.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(en.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&en.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=be(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(en,"$1"+i):!1!==t.jsonp&&(t.url+=(Pt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||Ce.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?Ce(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Zt.push(i)),a&&be(o)&&o(a[0]),a=o=void 0}),"script"}),xe.createHTMLDocument=function(){var e=ue.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),Ce.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var r,i,o;return t||(xe.createHTMLDocument?(t=ue.implementation.createHTMLDocument(""),r=t.createElement("base"),r.href=ue.location.href,t.head.appendChild(r)):t=ue),i=De.exec(e),o=!n&&[],i?[t.createElement(i[1])]:(i=C([e],t,o),o&&o.length&&Ce(o).remove(),Ce.merge([],i.childNodes))},Ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=K(e.slice(s)),e=e.slice(0,s)),be(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&Ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?Ce("<div>").append(Ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},Ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Ce.fn[t]=function(e){return this.on(t,e)}}),Ce.expr.pseudos.animated=function(e){return Ce.grep(Ce.timers,function(t){return e===t.elem}).length},Ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=Ce.css(e,"position"),f=Ce(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=Ce.css(e,"top"),u=Ce.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),be(t)&&(t=t.call(e,n,Ce.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},Ce.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Ce.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===Ce.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===Ce.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&(i=Ce(e).offset(),i.top+=Ce.css(e,"borderTopWidth",!0),i.left+=Ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-Ce.css(r,"marginTop",!0),left:t.left-i.left-Ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Ce.css(e,"position");)e=e.offsetParent;return e||Ge})}}),Ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;Ce.fn[e]=function(r){return Me(this,function(e,r,i){var o;if(we(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),Ce.each(["top","left"],function(e,t){Ce.cssHooks[t]=I(xe.pixelPosition,function(e,n){if(n)return n=M(e,t),pt.test(n)?Ce(e).position()[t]+"px":n})}),Ce.each({Height:"height",Width:"width"},function(e,t){Ce.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){Ce.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Me(this,function(t,n,i){var o;return we(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?Ce.css(t,n,s):Ce.style(t,n,i,s)},t,a?i:void 0,a)}})}),Ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){Ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),Ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),Ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),be(e))return r=ce.call(arguments,2),i=function(){return e.apply(t||this,r.concat(ce.call(arguments)))},i.guid=e.guid=e.guid||Ce.guid++,i},Ce.holdReady=function(e){e?Ce.readyWait++:Ce.ready(!0)},Ce.isArray=Array.isArray,Ce.parseJSON=JSON.parse,Ce.nodeName=o,Ce.isFunction=be,Ce.isWindow=we,Ce.camelCase=h,Ce.type=r,Ce.now=Date.now,Ce.isNumeric=function(e){var t=Ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return Ce});var tn=e.jQuery,nn=e.$;return Ce.noConflict=function(t){return e.$===Ce&&(e.$=nn),t&&e.jQuery===Ce&&(e.jQuery=tn),Ce},t||(e.jQuery=e.$=Ce),Ce});
},{}],8:[function(require,module,exports){
function baseRange(e,t,n,r){for(var i=-1,o=nativeMax(nativeCeil((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function createRange(e){return function(t,n,r){return r&&"number"!=typeof r&&isIterateeCall(t,n,r)&&(n=r=void 0),t=toFinite(t),void 0===n?(n=t,t=0):n=toFinite(n),r=void 0===r?t<n?1:-1:toFinite(r),baseRange(t,n,r,e)}}function isIndex(e,t){return!!(t=null==t?MAX_SAFE_INTEGER:t)&&("number"==typeof e||reIsUint.test(e))&&e>-1&&e%1==0&&e<t}function isIterateeCall(e,t,n){if(!isObject(n))return!1;var r=typeof t;return!!("number"==r?isArrayLike(n)&&isIndex(t,n.length):"string"==r&&t in n)&&eq(n[t],e)}function eq(e,t){return e===t||e!==e&&t!==t}function isArrayLike(e){return null!=e&&isLength(e.length)&&!isFunction(e)}function isFunction(e){var t=isObject(e)?objectToString.call(e):"";return t==funcTag||t==genTag}function isLength(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=MAX_SAFE_INTEGER}function isObject(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function isObjectLike(e){return!!e&&"object"==typeof e}function isSymbol(e){return"symbol"==typeof e||isObjectLike(e)&&objectToString.call(e)==symbolTag}function toFinite(e){if(!e)return 0===e?e:0;if((e=toNumber(e))===INFINITY||e===-INFINITY){return(e<0?-1:1)*MAX_INTEGER}return e===e?e:0}function toNumber(e){if("number"==typeof e)return e;if(isSymbol(e))return NAN;if(isObject(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(reTrim,"");var n=reIsBinary.test(e);return n||reIsOctal.test(e)?freeParseInt(e.slice(2),n?2:8):reIsBadHex.test(e)?NAN:+e}var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e308,NAN=NaN,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reTrim=/^\s+|\s+$/g,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,freeParseInt=parseInt,objectProto=Object.prototype,objectToString=objectProto.toString,nativeCeil=Math.ceil,nativeMax=Math.max,range=createRange();module.exports=range;
},{}],9:[function(require,module,exports){
"use strict";function toObject(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=shouldUseNative()?Object.assign:function(e,r){for(var t,n,o=toObject(e),a=1;a<arguments.length;a++){t=Object(arguments[a]);for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);if(getOwnPropertySymbols){n=getOwnPropertySymbols(t);for(var c=0;c<n.length;c++)propIsEnumerable.call(t,n[c])&&(o[n[c]]=t[n[c]])}}return o};
},{}],10:[function(require,module,exports){
"use strict";function encoderForArrayFormat(r){switch(r.arrayFormat){case"index":return function(e,n,t){return null===n?[encode(e,r),"[",t,"]"].join(""):[encode(e,r),"[",encode(t,r),"]=",encode(n,r)].join("")};case"bracket":return function(e,n){return null===n?encode(e,r):[encode(e,r),"[]=",encode(n,r)].join("")};default:return function(e,n){return null===n?encode(e,r):[encode(e,r),"=",encode(n,r)].join("")}}}function parserForArrayFormat(r){var e;switch(r.arrayFormat){case"index":return function(r,n,t){if(e=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!e)return void(t[r]=n);void 0===t[r]&&(t[r]={}),t[r][e[1]]=n};case"bracket":return function(r,n,t){return e=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),e?void 0===t[r]?void(t[r]=[n]):void(t[r]=[].concat(t[r],n)):void(t[r]=n)};default:return function(r,e,n){if(void 0===n[r])return void(n[r]=e);n[r]=[].concat(n[r],e)}}}function encode(r,e){return e.encode?e.strict?strictUriEncode(r):encodeURIComponent(r):r}function keysSorter(r){return Array.isArray(r)?r.sort():"object"==typeof r?keysSorter(Object.keys(r)).sort(function(r,e){return Number(r)-Number(e)}).map(function(e){return r[e]}):r}var strictUriEncode=require("strict-uri-encode"),objectAssign=require("object-assign");exports.extract=function(r){return r.split("?")[1]||""},exports.parse=function(r,e){e=objectAssign({arrayFormat:"none"},e);var n=parserForArrayFormat(e),t=Object.create(null);return"string"!=typeof r?t:(r=r.trim().replace(/^(\?|#|&)/,""))?(r.split("&").forEach(function(r){var e=r.replace(/\+/g," ").split("="),o=e.shift(),c=e.length>0?e.join("="):void 0;c=void 0===c?null:decodeURIComponent(c),n(decodeURIComponent(o),c,t)}),Object.keys(t).sort().reduce(function(r,e){var n=t[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?r[e]=keysSorter(n):r[e]=n,r},Object.create(null))):t},exports.stringify=function(r,e){e=objectAssign({encode:!0,strict:!0,arrayFormat:"none"},e);var n=encoderForArrayFormat(e);return r?Object.keys(r).sort().map(function(t){var o=r[t];if(void 0===o)return"";if(null===o)return encode(t,e);if(Array.isArray(o)){var c=[];return o.slice().forEach(function(r){void 0!==r&&c.push(n(t,r,c.length))}),c.join("&")}return encode(t,e)+"="+encode(o,e)}).filter(function(r){return r.length>0}).join("&"):""};
},{"object-assign":9,"strict-uri-encode":11}],11:[function(require,module,exports){
"use strict";module.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})};
},{}],12:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _jquery=require("jquery"),_jquery2=_interopRequireDefault(_jquery),_formToObject=require("form-to-object"),_formToObject2=_interopRequireDefault(_formToObject),_timbrePoly=require("./timbre-poly.js"),_timbrePoly2=_interopRequireDefault(_timbrePoly),_queryString=require("query-string"),_queryString2=_interopRequireDefault(_queryString),_isEmpty=require("is-empty"),_isEmpty2=_interopRequireDefault(_isEmpty),_ismobilejs=require("ismobilejs"),_ismobilejs2=_interopRequireDefault(_ismobilejs),intervals=void 0;_ismobilejs2.default.any&&(0,_jquery2.default)("#description").hide();var params=document.querySelectorAll(".form-field");(0,_isEmpty2.default)(params)||((0,_jquery2.default)("#levels").val(params[0].value),(0,_jquery2.default)("#A").val(params[1].value),(0,_jquery2.default)("#B").val(params[2].value),(0,_jquery2.default)("#bpm").val(params[3].value)),(0,_jquery2.default)("body").fadeIn({duration:3e3,easing:"swing"}),(0,_jquery2.default)("#form").submit(function(e){e.preventDefault(),e.stopPropagation(),(0,_jquery2.default)("#start").hide(),(0,_jquery2.default)("#stop").show();var r=(0,_formToObject2.default)(this);intervals=(0,_timbrePoly2.default)(r)}),(0,_jquery2.default)("#stop").click(function(e){e.preventDefault(),e.stopPropagation(),(0,_jquery2.default)("div.dot").remove(),intervals.forEach(function(e){e.inter.stop()}),(0,_jquery2.default)("#start").show(),(0,_jquery2.default)("#stop").hide()});
},{"./timbre-poly.js":2,"form-to-object":4,"is-empty":5,"ismobilejs":6,"jquery":7,"query-string":10}]},{},[12]);